Last modified: 2014-04-11 09:28:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65609, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63609 - mediawiki_api Ruby gem outputs a lot of information to terminal
mediawiki_api Ruby gem outputs a lot of information to terminal
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
wmf-deployment
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-07 11:54 UTC by Željko Filipin
Modified: 2014-04-11 09:28 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Željko Filipin 2014-04-07 11:54:01 UTC
mediawiki_api Ruby gem[1] outputs a lot of information to terminal during normal usage. By default, it should not output anything. Current output is appropriate when debugging, it too verbose for normal usage.

1: https://rubygems.org/gems/mediawiki_api

For example, this is output when running tests:

$ rspec
I, [2014-04-07T13:49:28.477723 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.477808 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.479501 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.479533 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.481032 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.481072 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.486290 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.486330 #4333] DEBUG -- response: set-cookie: "prefixSession=789; path=/; domain=localhost; HttpOnly"
I, [2014-04-07T13:49:28.486556 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.486598 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.487556 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.487584 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.488282 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.488315 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.489691 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.489723 #4333] DEBUG -- response: set-cookie: "prefixSession=789; path=/; domain=localhost; HttpOnly"
I, [2014-04-07T13:49:28.489863 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.489902 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.490762 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.490788 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.492586 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.492636 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.493536 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.493564 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.494100 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.494134 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.495106 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.495138 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.495890 #4333]  INFO -- : get http://localhost/api.php?action=tokens&format=json&type=edit
D, [2014-04-07T13:49:28.495923 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
I, [2014-04-07T13:49:28.498195 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.498222 #4333] DEBUG -- response: 
I, [2014-04-07T13:49:28.498369 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.498400 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.499316 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.499343 #4333] DEBUG -- response: 
.*I, [2014-04-07T13:49:28.500330 #4333]  INFO -- : get http://localhost/api.php?action=tokens&format=json&type=delete
D, [2014-04-07T13:49:28.500366 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
I, [2014-04-07T13:49:28.502782 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.502812 #4333] DEBUG -- response: 
I, [2014-04-07T13:49:28.502969 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.503001 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.504005 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.504033 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.504866 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.504902 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.505835 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.505863 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.506544 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.506579 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.507961 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.508003 #4333] DEBUG -- response: set-cookie: "prefixSession=789; path=/; domain=localhost; HttpOnly"
I, [2014-04-07T13:49:28.508177 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.508207 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.509064 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.509116 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.509760 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.509795 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.511144 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.511176 #4333] DEBUG -- response: set-cookie: "prefixSession=789; path=/; domain=localhost; HttpOnly"
I, [2014-04-07T13:49:28.511332 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.511367 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.512227 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.512260 #4333] DEBUG -- response: 
.I, [2014-04-07T13:49:28.513269 #4333]  INFO -- : post http://localhost/api.php
D, [2014-04-07T13:49:28.513304 #4333] DEBUG -- request: User-Agent: "Faraday v0.9.0"
Content-Type: "application/x-www-form-urlencoded"
I, [2014-04-07T13:49:28.514313 #4333]  INFO -- Status: 200
D, [2014-04-07T13:49:28.514340 #4333] DEBUG -- response: 
.

Pending:
  MediawikiApi::Client#create_page when API returns Success returns a MediawikiApi::Page
    # Not yet implemented
    # ./spec/client_spec.rb:83

Finished in 0.05047 seconds
12 examples, 0 failures, 1 pending
Comment 1 Željko Filipin 2014-04-11 09:28:34 UTC
Resolved in https://gerrit.wikimedia.org/r/#/c/124384/

$ rspec
......*......

Pending:
  MediawikiApi::Client#create_page when API returns Success returns a MediawikiApi::Page
    # Not yet implemented
    # ./spec/client_spec.rb:83

Finished in 0.08044 seconds
13 examples, 0 failures, 1 pending

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links