Skip to content

Instantly share code, notes, and snippets.

@harman28
Last active May 22, 2017 19:16
Show Gist options
  • Save harman28/b9a12f12038cb4f34d74fe2b9e504d66 to your computer and use it in GitHub Desktop.
Save harman28/b9a12f12038cb4f34d74fe2b9e504d66 to your computer and use it in GitHub Desktop.
Rubocop results on wikipedia-client

I added rubocop as a development dependency on my fork of wikipedia-client, and ran it once.

> 19 files inspected, 351 offenses detected

Many of these are style decisions rather than offenses, and can be filtered out by using the right preferences in a .rubocop.yml file. However, some are genuine issues, and can use some work.

An .editorconfig file is probably a good idea too.

Inspecting 19 files
..CC.WCCWCCWCCCCC..
Offenses:
install.rb:1:51: C: Final newline missing.
puts File.read(File.dirname(__FILE__) + '/README')
Rakefile:1:1: C: Prefer $LOAD_PATH over $:.
$:.push File.expand_path("../lib", __FILE__)
^^
Rakefile:1:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
$:.push File.expand_path("../lib", __FILE__)
^^^^^^^^
Rakefile:12:1: C: Extra blank line detected.
Rakefile:28:11: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rakefile:28:81: C: Line is too long. [98/80]
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
^^^^^^^^^^^^^^^^^^
Rakefile:32:6: C: Use the new Ruby 1.9 hash syntax.
task :default => :spec
^^^^^^^^^^^
Rakefile:35:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "wikipedia/version"
^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:2:1: C: Add an empty line after magic comments.
$:.push File.expand_path("../lib", __FILE__)
^
wikipedia-client.gemspec:2:1: C: Prefer $LOAD_PATH over $:.
$:.push File.expand_path("../lib", __FILE__)
^^
wikipedia-client.gemspec:2:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
$:.push File.expand_path("../lib", __FILE__)
^^^^^^^^
wikipedia-client.gemspec:3:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "wikipedia/version"
^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:5:1: W: Useless assignment to variable - spec.
spec = Gem::Specification.new do |s|
^^^^
wikipedia-client.gemspec:5:8: C: Block has too many lines. [35/25]
spec = Gem::Specification.new do |s| ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:6:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.name = "wikipedia-client"
^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:9:54: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
^^^^^^
wikipedia-client.gemspec:9:81: C: Line is too long. [105/80]
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
^^^^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:12:25: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland", "Aishwarya Subramanian", "Pietro Menna", "Sophie Rapoport"]
^^^^^^^^^^^^^
wikipedia-client.gemspec:12:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland", "Aishwarya Subramanian", "Pietro Menna", "Sophie Rapoport"]
^^^^^^^^^^^
wikipedia-client.gemspec:12:53: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland", "Aishwarya Subramanian", "Pietro Menna", "Sophie Rapoport"]
^^^^^^^^^^^^^^^
wikipedia-client.gemspec:12:70: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland", "Aishwarya Subramanian", "Pietro Menna", "Sophie Rapoport"]
^^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:12:81: C: Line is too long. [128/80]
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland", "Aishwarya Subramanian", "Pietro Menna", "Sophie Rapoport"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:12:95: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland", "Aishwarya Subramanian", "Pietro Menna", "Sophie Rapoport"]
^^^^^^^^^^^^^^
wikipedia-client.gemspec:12:111: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.authors = ["Cyril David", "Ken Pratt", "Mike Haugland", "Aishwarya Subramanian", "Pietro Menna", "Sophie Rapoport"]
^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:14:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.description = "Ruby client for the Wikipedia API"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:15:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.email = "ken@kenpratt.net"
^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:17:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.homepage = "http://github.com/kenpratt/wikipedia-client"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:18:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.rubygems_version = "1.8.23"
^^^^^^^^
wikipedia-client.gemspec:19:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.summary = "Ruby client for the Wikipedia API"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:23:63: C: Space missing to the left of {.
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
^
wikipedia-client.gemspec:23:81: C: Line is too long. [86/80]
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
^^^^^^
wikipedia-client.gemspec:37:1: C: Extra blank line detected.
wikipedia-client.gemspec:38:43: C: Do not use then for multi-line if.
if s.respond_to? :specification_version then
^^^^
wikipedia-client.gemspec:41:68: C: Do not use then for multi-line if.
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
^^^^
wikipedia-client.gemspec:42:36: C: %q-literals should be delimited by ( and ).
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:42:36: C: Use %q only for strings that contain both single quotes and double quotes.
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:42:61: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^
wikipedia-client.gemspec:44:24: C: %q-literals should be delimited by ( and ).
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:44:24: C: Use %q only for strings that contain both single quotes and double quotes.
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:44:49: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^
wikipedia-client.gemspec:47:22: C: %q-literals should be delimited by ( and ).
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:47:22: C: Use %q only for strings that contain both single quotes and double quotes.
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^^^^^^^^^^^^^^^^^
wikipedia-client.gemspec:47:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
^^^^^^
lib/wikipedia/client.rb:2:3: C: Missing top-level class documentation comment.
class Client
^^^^^
lib/wikipedia/client.rb:4:16: C: Freeze mutable objects assigned to constants.
BASE_URL = ":protocol://:domain/:path?action=:action&format=json"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:4:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
BASE_URL = ":protocol://:domain/:path?action=:action&format=json"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:12:14: C: Space inside parentheses detected.
def find( title, options = {} )
^
lib/wikipedia/client.rb:12:34: C: Space inside parentheses detected.
def find( title, options = {} )
^
lib/wikipedia/client.rb:13:15: C: Avoid using rescue in its modifier form.
title = Url.new(title).title rescue title
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:14:23: C: Space inside parentheses detected.
page = Page.new( request_page( title, options ) )
^
lib/wikipedia/client.rb:14:37: C: Space inside parentheses detected.
page = Page.new( request_page( title, options ) )
^
lib/wikipedia/client.rb:14:52: C: Space inside parentheses detected.
page = Page.new( request_page( title, options ) )
^
lib/wikipedia/client.rb:14:54: C: Space inside parentheses detected.
page = Page.new( request_page( title, options ) )
^
lib/wikipedia/client.rb:15:30: C: Use && instead of and.
while follow_redirects and page.redirect?
^^^
lib/wikipedia/client.rb:16:25: C: Space inside parentheses detected.
page = Page.new( request_page( page.redirect_title, options ) )
^
lib/wikipedia/client.rb:16:39: C: Space inside parentheses detected.
page = Page.new( request_page( page.redirect_title, options ) )
^
lib/wikipedia/client.rb:16:68: C: Space inside parentheses detected.
page = Page.new( request_page( page.redirect_title, options ) )
^
lib/wikipedia/client.rb:16:70: C: Space inside parentheses detected.
page = Page.new( request_page( page.redirect_title, options ) )
^
lib/wikipedia/client.rb:21:20: C: Space inside parentheses detected.
def find_image( title, options = {} )
^
lib/wikipedia/client.rb:21:40: C: Space inside parentheses detected.
def find_image( title, options = {} )
^
lib/wikipedia/client.rb:22:15: C: Avoid using rescue in its modifier form.
title = Url.new(title).title rescue title
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:23:16: C: Space inside parentheses detected.
Page.new( request_image( title, options ) )
^
lib/wikipedia/client.rb:23:31: C: Space inside parentheses detected.
Page.new( request_image( title, options ) )
^
lib/wikipedia/client.rb:23:46: C: Space inside parentheses detected.
Page.new( request_image( title, options ) )
^
lib/wikipedia/client.rb:23:48: C: Space inside parentheses detected.
Page.new( request_image( title, options ) )
^
lib/wikipedia/client.rb:26:21: C: Space inside parentheses detected.
def find_random( options = {} )
^
lib/wikipedia/client.rb:26:34: C: Space inside parentheses detected.
def find_random( options = {} )
^
lib/wikipedia/client.rb:28:18: C: Do not use :: for method calls.
data = JSON::load( request_random( options ) )
^^
lib/wikipedia/client.rb:28:20: C: Prefer JSON.parse over JSON.load.
data = JSON::load( request_random( options ) )
^^^^
lib/wikipedia/client.rb:28:25: C: Space inside parentheses detected.
data = JSON::load( request_random( options ) )
^
lib/wikipedia/client.rb:28:41: C: Space inside parentheses detected.
data = JSON::load( request_random( options ) )
^
lib/wikipedia/client.rb:28:49: C: Space inside parentheses detected.
data = JSON::load( request_random( options ) )
^
lib/wikipedia/client.rb:28:51: C: Space inside parentheses detected.
data = JSON::load( request_random( options ) )
^
lib/wikipedia/client.rb:29:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title = data["query"]["pages"].values[0]["title"]
^^^^^^^
lib/wikipedia/client.rb:29:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title = data["query"]["pages"].values[0]["title"]
^^^^^^^
lib/wikipedia/client.rb:29:48: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
title = data["query"]["pages"].values[0]["title"]
^^^^^^^
lib/wikipedia/client.rb:30:12: C: Space inside parentheses detected.
find( title, options )
^
lib/wikipedia/client.rb:30:27: C: Space inside parentheses detected.
find( title, options )
^
lib/wikipedia/client.rb:34:22: C: Space inside parentheses detected.
def request_page( title, options = {} )
^
lib/wikipedia/client.rb:34:42: C: Space inside parentheses detected.
def request_page( title, options = {} )
^
lib/wikipedia/client.rb:35:15: C: Space inside parentheses detected.
request( {
^
lib/wikipedia/client.rb:36:18: C: Use the new Ruby 1.9 hash syntax.
:action => "query",
^^^^^^^^^^
lib/wikipedia/client.rb:36:18: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
:action => "query",
^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:36:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:action => "query",
^^^^^^^
lib/wikipedia/client.rb:37:18: C: Use the new Ruby 1.9 hash syntax.
:prop => %w{ info revisions links extlinks images categories coordinates templates extracts },
^^^^^^^^
lib/wikipedia/client.rb:37:27: C: %w-literals should be delimited by [ and ].
:prop => %w{ info revisions links extlinks images categories coordinates templates extracts },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:37:30: C: Do not use spaces inside percent literal delimiters.
:prop => %w{ info revisions links extlinks images categories coordinates templates extracts },
^
lib/wikipedia/client.rb:37:81: C: Line is too long. [111/80]
:prop => %w{ info revisions links extlinks images categories coordinates templates extracts },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:37:109: C: Do not use spaces inside percent literal delimiters.
:prop => %w{ info revisions links extlinks images categories coordinates templates extracts },
^
lib/wikipedia/client.rb:38:18: C: Use the new Ruby 1.9 hash syntax.
:rvprop => "content",
^^^^^^^^^^
lib/wikipedia/client.rb:38:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:rvprop => "content",
^^^^^^^^^
lib/wikipedia/client.rb:39:18: C: Use the new Ruby 1.9 hash syntax.
:inprop => "url",
^^^^^^^^^^
lib/wikipedia/client.rb:39:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:inprop => "url",
^^^^^
lib/wikipedia/client.rb:40:18: C: Use the new Ruby 1.9 hash syntax.
:explaintext => "",
^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:40:34: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:explaintext => "",
^^
lib/wikipedia/client.rb:41:18: C: Use the new Ruby 1.9 hash syntax.
:titles => title
^^^^^^^^^^
lib/wikipedia/client.rb:42:16: C: Indent the right brace the same as the start of the line where the left brace is.
}.merge( options ) )
^
lib/wikipedia/client.rb:42:24: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:42:32: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:42:34: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:46:23: C: Space inside parentheses detected.
def request_image( title, options = {} )
^
lib/wikipedia/client.rb:46:43: C: Space inside parentheses detected.
def request_image( title, options = {} )
^
lib/wikipedia/client.rb:47:15: C: Space inside parentheses detected.
request( {
^
lib/wikipedia/client.rb:48:18: C: Use the new Ruby 1.9 hash syntax.
:action => "query",
^^^^^^^^^^
lib/wikipedia/client.rb:48:18: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
:action => "query",
^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:48:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:action => "query",
^^^^^^^
lib/wikipedia/client.rb:49:18: C: Use the new Ruby 1.9 hash syntax.
:prop => "imageinfo",
^^^^^^^^
lib/wikipedia/client.rb:49:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:prop => "imageinfo",
^^^^^^^^^^^
lib/wikipedia/client.rb:50:18: C: Use the new Ruby 1.9 hash syntax.
:iiprop => "url",
^^^^^^^^^^
lib/wikipedia/client.rb:50:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:iiprop => "url",
^^^^^
lib/wikipedia/client.rb:51:18: C: Use the new Ruby 1.9 hash syntax.
:titles => title
^^^^^^^^^^
lib/wikipedia/client.rb:52:16: C: Indent the right brace the same as the start of the line where the left brace is.
}.merge( options ) )
^
lib/wikipedia/client.rb:52:24: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:52:32: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:52:34: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:56:24: C: Space inside parentheses detected.
def request_random( options = {} )
^
lib/wikipedia/client.rb:56:37: C: Space inside parentheses detected.
def request_random( options = {} )
^
lib/wikipedia/client.rb:57:15: C: Space inside parentheses detected.
request( {
^
lib/wikipedia/client.rb:58:18: C: Use the new Ruby 1.9 hash syntax.
:action => "query",
^^^^^^^^^^
lib/wikipedia/client.rb:58:18: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
:action => "query",
^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:58:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:action => "query",
^^^^^^^
lib/wikipedia/client.rb:59:18: C: Use the new Ruby 1.9 hash syntax.
:generator => "random",
^^^^^^^^^^^^^
lib/wikipedia/client.rb:59:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:generator => "random",
^^^^^^^^
lib/wikipedia/client.rb:60:18: C: Use the new Ruby 1.9 hash syntax.
:grnnamespace => "0",
^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:60:35: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:grnnamespace => "0",
^^^
lib/wikipedia/client.rb:61:18: C: Use the new Ruby 1.9 hash syntax.
:prop => "info"
^^^^^^^^
lib/wikipedia/client.rb:61:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
:prop => "info"
^^^^^^
lib/wikipedia/client.rb:62:16: C: Indent the right brace the same as the start of the line where the left brace is.
}.merge( options ) )
^
lib/wikipedia/client.rb:62:24: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:62:32: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:62:34: C: Space inside parentheses detected.
}.merge( options ) )
^
lib/wikipedia/client.rb:65:17: C: Space inside parentheses detected.
def request( options )
^
lib/wikipedia/client.rb:65:25: C: Space inside parentheses detected.
def request( options )
^
lib/wikipedia/client.rb:67:17: C: Space inside parentheses detected.
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^
lib/wikipedia/client.rb:67:26: C: Space inside parentheses detected.
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^
lib/wikipedia/client.rb:67:34: C: Space inside parentheses detected.
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^
lib/wikipedia/client.rb:67:36: C: Space inside parentheses detected.
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^
lib/wikipedia/client.rb:67:44: C: Space inside parentheses detected.
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^
lib/wikipedia/client.rb:67:45: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^^^^^^^^^^^^
lib/wikipedia/client.rb:67:81: C: Line is too long. [88/80]
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^^^^^^^^
lib/wikipedia/client.rb:67:87: C: Space inside parentheses detected.
URI.parse( url_for( options ) ).read( "User-Agent" => Configuration[:user_agent] )
^
lib/wikipedia/client.rb:70:5: C: Keep a blank line before and after protected.
protected
^^^^^^^^^
lib/wikipedia/client.rb:71:7: C: Inconsistent indentation detected.
def configuration_options ...
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:73:11: C: Use the new Ruby 1.9 hash syntax.
:protocol => Configuration[:protocol],
^^^^^^^^^^^^^^
lib/wikipedia/client.rb:74:11: C: Use the new Ruby 1.9 hash syntax.
:domain => Configuration[:domain],
^^^^^^^^^^^^^^
lib/wikipedia/client.rb:75:11: C: Use the new Ruby 1.9 hash syntax.
:path => Configuration[:path],
^^^^^^^^^^^^^^
lib/wikipedia/client.rb:75:46: C: Avoid comma after the last item of a hash.
:path => Configuration[:path],
^
lib/wikipedia/client.rb:79:7: C: Method has too many lines. [11/10]
def url_for( options ) ...
^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:79:7: C: Inconsistent indentation detected.
def url_for( options ) ...
^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:79:19: C: Space inside parentheses detected.
def url_for( options )
^
lib/wikipedia/client.rb:79:27: C: Space inside parentheses detected.
def url_for( options )
^
lib/wikipedia/client.rb:81:47: C: Space inside parentheses detected.
options = configuration_options.merge( options )
^
lib/wikipedia/client.rb:81:55: C: Space inside parentheses detected.
options = configuration_options.merge( options )
^
lib/wikipedia/client.rb:83:32: C: Space inside parentheses detected.
value = urlify_value( val )
^
lib/wikipedia/client.rb:83:36: C: Space inside parentheses detected.
value = urlify_value( val )
^
lib/wikipedia/client.rb:84:27: C: Space inside parentheses detected.
if url.include?( ":#{key}" )
^
lib/wikipedia/client.rb:84:37: C: Space inside parentheses detected.
if url.include?( ":#{key}" )
^
lib/wikipedia/client.rb:93:7: C: Inconsistent indentation detected.
def urlify_value( val ) ...
^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:93:24: C: Space inside parentheses detected.
def urlify_value( val )
^
lib/wikipedia/client.rb:93:28: C: Space inside parentheses detected.
def urlify_value( val )
^
lib/wikipedia/client.rb:96:18: C: Space inside parentheses detected.
encode( val.flatten.join( '|' ) )
^
lib/wikipedia/client.rb:96:36: C: Space inside parentheses detected.
encode( val.flatten.join( '|' ) )
^
lib/wikipedia/client.rb:96:40: C: Space inside parentheses detected.
encode( val.flatten.join( '|' ) )
^
lib/wikipedia/client.rb:96:42: C: Space inside parentheses detected.
encode( val.flatten.join( '|' ) )
^
lib/wikipedia/client.rb:98:18: C: Space inside parentheses detected.
encode( val )
^
lib/wikipedia/client.rb:98:22: C: Space inside parentheses detected.
encode( val )
^
lib/wikipedia/client.rb:102:7: C: Inconsistent indentation detected.
def encode( val ) ...
^^^^^^^^^^^^^^^^^
lib/wikipedia/client.rb:102:18: C: Space inside parentheses detected.
def encode( val )
^
lib/wikipedia/client.rb:102:22: C: Space inside parentheses detected.
def encode( val )
^
lib/wikipedia/client.rb:105:22: C: Space inside parentheses detected.
URI.encode( val ).gsub( '&', '%26' )
^
lib/wikipedia/client.rb:105:26: C: Space inside parentheses detected.
URI.encode( val ).gsub( '&', '%26' )
^
lib/wikipedia/client.rb:105:34: C: Space inside parentheses detected.
URI.encode( val ).gsub( '&', '%26' )
^
lib/wikipedia/client.rb:105:45: C: Space inside parentheses detected.
URI.encode( val ).gsub( '&', '%26' )
^
lib/wikipedia/configuration.rb:4:3: C: Missing top-level class documentation comment.
class Configuration
^^^^^
lib/wikipedia/configuration.rb:10:11: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if args.empty?
^^
lib/wikipedia/page.rb:2:3: C: Class has too many lines. [107/100]
class Page ...
^^^^^^^^^^
lib/wikipedia/page.rb:2:3: C: Missing top-level class documentation comment.
class Page
^^^^^
lib/wikipedia/page.rb:6:19: C: Do not use :: for method calls.
@data = JSON::load(json)
^^
lib/wikipedia/page.rb:6:21: C: Prefer JSON.parse over JSON.load.
@data = JSON::load(json)
^^^^
lib/wikipedia/page.rb:26:7: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if matches = redirect?
^^
lib/wikipedia/page.rb:26:18: W: Assignment in condition - you probably meant to use ==.
if matches = redirect?
^
lib/wikipedia/page.rb:48:7: C: Don't use parentheses around a method call.
(page['extract'].split("=="))[0].strip if page['extract'] && page['extract'] != ''
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/page.rb:48:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
(page['extract'].split("=="))[0].strip if page['extract'] && page['extract'] != ''
^^^^
lib/wikipedia/page.rb:48:81: C: Line is too long. [88/80]
(page['extract'].split("=="))[0].strip if page['extract'] && page['extract'] != ''
^^^^^^^^
lib/wikipedia/page.rb:52:30: C: Space between { and | missing.
page['categories'].map {|c| c['title'] } if page['categories']
^^
lib/wikipedia/page.rb:56:25: C: Space between { and | missing.
page['links'].map {|c| c['title'] } if page['links']
^^
lib/wikipedia/page.rb:60:28: C: Space between { and | missing.
page['extlinks'].map {|c| c['*'] } if page['extlinks']
^^
lib/wikipedia/page.rb:64:26: C: Space between { and | missing.
page['images'].map {|c| c['title'] } if page['images']
^^
lib/wikipedia/page.rb:76:26: C: Space between { and | missing.
image_metadata.map {|img| img.image_url }
^^
lib/wikipedia/page.rb:76:26: C: Pass &:image_url as an argument to map instead of a block.
image_metadata.map {|img| img.image_url }
^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/page.rb:80:26: C: Space between { and | missing.
image_metadata.map {|img| img.image_descriptionurl }
^^
lib/wikipedia/page.rb:80:26: C: Pass &:image_descriptionurl as an argument to map instead of a block.
image_metadata.map {|img| img.image_descriptionurl }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/page.rb:93:17: W: Assignment in condition - you probably meant to use ==.
if list = images
^
lib/wikipedia/page.rb:94:34: C: Space between { and | missing.
filtered = list.select {|i| i =~ /:.+\.(jpg|jpeg|png|gif|svg)$/i && !i.include?("LinkFA-star") }
^^
lib/wikipedia/page.rb:94:81: C: Line is too long. [106/80]
filtered = list.select {|i| i =~ /:.+\.(jpg|jpeg|png|gif|svg)$/i && !i.include?("LinkFA-star") }
^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/page.rb:94:91: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
filtered = list.select {|i| i =~ /:.+\.(jpg|jpeg|png|gif|svg)$/i && !i.include?("LinkFA-star") }
^^^^^^^^^^^^^
lib/wikipedia/page.rb:95:49: C: Space between { and | missing.
@cached_image_metadata = filtered.map {|title| Wikipedia.find_image(title) }
^^
lib/wikipedia/page.rb:95:81: C: Line is too long. [86/80]
@cached_image_metadata = filtered.map {|title| Wikipedia.find_image(title) }
^^^^^^
lib/wikipedia/page.rb:102:29: C: Space between { and | missing.
page['templates'].map {|c| c['title'] } if page['templates']
^^
lib/wikipedia/page.rb:105:5: C: Use attr_reader to define trivial reader methods.
def json
^^^
lib/wikipedia/page.rb:109:5: C: Assignment Branch Condition size for sanitize is too high. [21.42/15]
def self.sanitize( s )
^^^
lib/wikipedia/page.rb:109:5: C: Method has too many lines. [23/10]
def self.sanitize( s ) ...
^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/page.rb:109:23: C: Space inside parentheses detected.
def self.sanitize( s )
^
lib/wikipedia/page.rb:109:25: C: Space inside parentheses detected.
def self.sanitize( s )
^
lib/wikipedia/page.rb:110:7: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if s
^^
lib/wikipedia/page.rb:114:9: C: Favor modifier while usage when having a single-line body.
while s =~ /\{\{[^\{\}]+?\}\}/
^^^^^
lib/wikipedia/page.rb:135:17: C: Use %r around regular expression.
s.gsub!(/<ref[^<>]*>[\s\S]*?<\/ref>/, '')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/wikipedia/page.rb:143:28: C: Space between { and | missing.
s = sections.map {|paragraph| "<p>#{paragraph.strip}</p>" }.join("\n")
^^
lib/wikipedia/url.rb:2:3: C: Missing top-level class documentation comment.
class Url
^^^^^
lib/wikipedia/url.rb:6:1: C: Trailing whitespace detected.
lib/wikipedia/url.rb:9:1: C: Trailing whitespace detected.
lib/wikipedia/url.rb:10:27: C: Space inside parentheses detected.
uri = URI.parse( @wiki_url )
^
lib/wikipedia/url.rb:10:37: C: Space inside parentheses detected.
uri = URI.parse( @wiki_url )
^
lib/wikipedia/url.rb:11:28: C: Space inside parentheses detected.
@title = URI.decode( uri.path.split('/').last )
^
lib/wikipedia/url.rb:11:53: C: Space inside parentheses detected.
@title = URI.decode( uri.path.split('/').last )
^
lib/wikipedia/version.rb:2:13: C: Freeze mutable objects assigned to constants.
VERSION = "1.6.3"
^^^^^^^
lib/wikipedia/version.rb:2:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
VERSION = "1.6.3"
^^^^^^^
lib/wikipedia.rb:5:1: C: Missing top-level module documentation comment.
module Wikipedia
^^^^^^
lib/wikipedia.rb:16:17: C: Space inside parentheses detected.
def self.find( page, options = {} )
^
lib/wikipedia.rb:16:36: C: Space inside parentheses detected.
def self.find( page, options = {} )
^
lib/wikipedia.rb:17:17: C: Space inside parentheses detected.
client.find( page, options )
^
lib/wikipedia.rb:17:31: C: Space inside parentheses detected.
client.find( page, options )
^
lib/wikipedia.rb:20:23: C: Space inside parentheses detected.
def self.find_image( title, options = {} )
^
lib/wikipedia.rb:20:43: C: Space inside parentheses detected.
def self.find_image( title, options = {} )
^
lib/wikipedia.rb:21:23: C: Space inside parentheses detected.
client.find_image( title, options )
^
lib/wikipedia.rb:21:38: C: Space inside parentheses detected.
client.find_image( title, options )
^
lib/wikipedia.rb:24:24: C: Space inside parentheses detected.
def self.find_random( options = {} )
^
lib/wikipedia.rb:24:37: C: Space inside parentheses detected.
def self.find_random( options = {} )
^
lib/wikipedia.rb:25:24: C: Space inside parentheses detected.
client.find_random( options )
^
lib/wikipedia.rb:25:32: C: Space inside parentheses detected.
client.find_random( options )
^
lib/wikipedia.rb:28:12: C: Use snake_case for method names.
def self.Configure(&block)
^^^^^^^^^
lib/wikipedia.rb:32:13: C: Avoid using {...} for multi-line blocks.
Configure {
^
lib/wikipedia.rb:41:3: W: Useless private access modifier.
private
^^^^^^^
lib/wikipedia.rb:43:3: W: private (on line 41) does not make singleton methods private. Use private_class_method or private inside a class << self block instead.
def self.client
^^^
script/add_sanitization_test:3:54: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib")
^^^^
script/add_sanitization_test:3:60: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib")
^^^^^
script/add_sanitization_test:4:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "wikipedia"
^^^^^^^^^^^
script/add_sanitization_test:6:62: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
SANITIZATION_SAMPLE_PATH = File.join(File.dirname(__FILE__), "..", "spec", "fixtures", "sanitization_samples")
^^^^
script/add_sanitization_test:6:68: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
SANITIZATION_SAMPLE_PATH = File.join(File.dirname(__FILE__), "..", "spec", "fixtures", "sanitization_samples")
^^^^^^
script/add_sanitization_test:6:76: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
SANITIZATION_SAMPLE_PATH = File.join(File.dirname(__FILE__), "..", "spec", "fixtures", "sanitization_samples")
^^^^^^^^^^
script/add_sanitization_test:6:81: C: Line is too long. [110/80]
SANITIZATION_SAMPLE_PATH = File.join(File.dirname(__FILE__), "..", "spec", "fixtures", "sanitization_samples")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
script/add_sanitization_test:6:88: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
SANITIZATION_SAMPLE_PATH = File.join(File.dirname(__FILE__), "..", "spec", "fixtures", "sanitization_samples")
^^^^^^^^^^^^^^^^^^^^^^
script/add_sanitization_test:10:32: C: Use the new Ruby 1.9 hash syntax.
page = Wikipedia.find(title, :rvsection => 0)
^^^^^^^^^^^^^
script/add_sanitization_test:11:75: C: Space between { and | missing.
File.open(File.join(SANITIZATION_SAMPLE_PATH, "#{title}-raw.txt"), 'w') {|f| f << page.content }
^^
script/add_sanitization_test:11:81: C: Line is too long. [98/80]
File.open(File.join(SANITIZATION_SAMPLE_PATH, "#{title}-raw.txt"), 'w') {|f| f << page.content }
^^^^^^^^^^^^^^^^^^
script/add_sanitization_test:12:81: C: Line is too long. [114/80]
File.open(File.join(SANITIZATION_SAMPLE_PATH, "#{title}-sanitized.txt"), 'w') {|f| f << page.sanitized_content }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
script/add_sanitization_test:12:81: C: Space between { and | missing.
File.open(File.join(SANITIZATION_SAMPLE_PATH, "#{title}-sanitized.txt"), 'w') {|f| f << page.sanitized_content }
^^
script/add_sanitization_test:15:16: C: Prefer $PROGRAM_NAME over $0.
if __FILE__ == $0
^^
script/add_sanitization_test:17:20: C: Prefer $PROGRAM_NAME over $0.
puts "Usage: #{$0} http://en.wikipedia.org/wiki/Social_Democratic_Party_of_Kyrgyzstan"
^^
script/add_sanitization_test:17:90: C: Line is too long. [90/80]
puts "Usage: #{$0} http://en.wikipedia.org/wiki/Social_Democratic_Party_of_Kyrgyzstan"
^
spec/lib/client_spec.rb:4:1: C: Block has too many lines. [40/25]
describe Wikipedia::Client, ".find page (mocked)" do ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:4:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Client, ".find page (mocked)" do
^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:7:81: C: Line is too long. [94/80]
@edsger_dijkstra = File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_Dijkstra.json')
^^^^^^^^^^^^^^
spec/lib/client_spec.rb:8:28: C: Do not use :: for method calls.
@edsger_content = JSON::load(File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_content.txt'))['content']
^^
spec/lib/client_spec.rb:8:30: C: Prefer JSON.parse over JSON.load.
@edsger_content = JSON::load(File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_content.txt'))['content']
^^^^
spec/lib/client_spec.rb:8:81: C: Line is too long. [115/80]
@edsger_content = JSON::load(File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_content.txt'))['content']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:12:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should execute a request for the page" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:16:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page object" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:20:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with the correct content" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:25:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with a title of Edsger W. Dijkstra" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:30:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with the correct URL" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:35:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with the correct plain text extract" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:40:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with categories" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:57: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:81: C: Line is too long. [446/80]
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:81: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:119: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:172: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:233: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:263: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:301: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:330: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:42:385: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.categories.should == ["Category:1930 births", "Category:2002 deaths", "Category:All pages needing cleanup", "Category:Articles needing cleanup from April 2009", "Category:Articles with close paraphrasing from April 2009", "Category:Computer pioneers", "Category:Dutch computer scientists", "Category:Dutch physicists", "Category:Eindhoven University of Technology faculty", "Category:Fellows of the Association for Computing Machinery"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:45:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with links" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:47:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:47:48: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^
spec/lib/client_spec.rb:47:57: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^
spec/lib/client_spec.rb:47:69: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^^
spec/lib/client_spec.rb:47:81: C: Line is too long. [194/80]
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:47:83: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:47:110: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:47:140: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^
spec/lib/client_spec.rb:47:152: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^^^
spec/lib/client_spec.rb:47:167: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^
spec/lib/client_spec.rb:47:180: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.links.should == ["ACM Turing Award", "ALGOL", "ALGOL 60", "Adi Shamir", "Adriaan van Wijngaarden", "Agile software development", "Alan Kay", "Alan Perlis", "Algorithm", "Allen Newell"]
^^^^^^^^^^^^^^
spec/lib/client_spec.rb:50:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with images" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:52:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.images.should == ["File:Copyright-problem.svg", "File:Dijkstra.ogg", "File:Edsger Wybe Dijkstra.jpg", "File:Speaker Icon.svg", "File:Wikiquote-logo-en.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:52:59: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.images.should == ["File:Copyright-problem.svg", "File:Dijkstra.ogg", "File:Edsger Wybe Dijkstra.jpg", "File:Speaker Icon.svg", "File:Wikiquote-logo-en.svg"]
^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:52:80: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.images.should == ["File:Copyright-problem.svg", "File:Dijkstra.ogg", "File:Edsger Wybe Dijkstra.jpg", "File:Speaker Icon.svg", "File:Wikiquote-logo-en.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:52:81: C: Line is too long. [166/80]
@page.images.should == ["File:Copyright-problem.svg", "File:Dijkstra.ogg", "File:Edsger Wybe Dijkstra.jpg", "File:Speaker Icon.svg", "File:Wikiquote-logo-en.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:52:113: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.images.should == ["File:Copyright-problem.svg", "File:Dijkstra.ogg", "File:Edsger Wybe Dijkstra.jpg", "File:Speaker Icon.svg", "File:Wikiquote-logo-en.svg"]
^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:52:138: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.images.should == ["File:Copyright-problem.svg", "File:Dijkstra.ogg", "File:Edsger Wybe Dijkstra.jpg", "File:Speaker Icon.svg", "File:Wikiquote-logo-en.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:56:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Client, ".find page with one section (mocked)" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:59:81: C: Line is too long. [104/80]
@edsger_dijkstra = File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_Dijkstra_section_0.json')
^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:60:81: C: Line is too long. [131/80]
@edsger_content = File.read(File.dirname(__FILE__) + '/../fixtures/sanitization_samples/Edsger_W_Dijkstra-sanitized.txt').strip
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:64:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should have the correct sanitized intro" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:65:45: C: Use the new Ruby 1.9 hash syntax.
@page = @client.find('Edsger_Dijkstra', :rvsection => 0)
^^^^^^^^^^^^^
spec/lib/client_spec.rb:70:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Client, ".find image (mocked)" do
^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:73:81: C: Line is too long. [108/80]
@edsger_dijkstra = File.read(File.dirname(__FILE__) + '/../fixtures/File_Edsger_Wybe_Dijkstra_jpg.json')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:77:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should execute a request for the image" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:81:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page object" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:82:81: C: Line is too long. [97/80]
@client.find_image('File:Edsger Wybe Dijkstra.jpg').should be_an_instance_of(Wikipedia::Page)
^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:85:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with a title of File:Edsger Wybe Dijkstra.jpg" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:90:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a page with an image url" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:92:31: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_url.should == "http://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:92:107: C: Line is too long. [107/80]
@page.image_url.should == "http://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg"
^
spec/lib/client_spec.rb:96:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Client, ".find page (Edsger_Dijkstra)" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:102:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should get a redirect when trying Edsger Dijkstra" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:107:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should get a final page when follow_redirects is true" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:113:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should collect the image urls" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:81: C: Line is too long. [725/80]
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:100: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:178: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:257: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:337: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:417: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:493: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:581: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:116:653: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@page.image_urls.should == ["https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg", "https://upload.wikimedia.org/wikipedia/commons/5/57/Dijkstra_Animation.gif", "https://upload.wikimedia.org/wikipedia/commons/6/6a/Dining_philosophers.png", "https://upload.wikimedia.org/wikipedia/commons/c/c9/Edsger_Dijkstra_1994.jpg", "https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg", "https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/7/7b/Rail-semaphore-signal-Dave-F.jpg", "https://upload.wikimedia.org/wikipedia/commons/2/21/Speaker_Icon.svg", "https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:120:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Client, ".find page (Rails) at jp" do
^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:122:34: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Wikipedia.Configure { domain "ja.wikipedia.org" }
^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:127:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should get a redirect when trying Rails" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:132:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should get a final page when follow_redirects is true" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:139:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Client, ".find random page" do
^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:144:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should get random pages" do
^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:145:33: C: Do not use parentheses for method calls with no arguments.
@page1 = @client.find_random().title
^
spec/lib/client_spec.rb:146:33: C: Do not use parentheses for method calls with no arguments.
@page2 = @client.find_random().title
^
spec/lib/client_spec.rb:151:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Client, "page.summary (mocked)" do
^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:154:81: C: Line is too long. [94/80]
@edsger_dijkstra = File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_Dijkstra.json')
^^^^^^^^^^^^^^
spec/lib/client_spec.rb:155:28: C: Do not use :: for method calls.
@edsger_content = JSON::load(File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_content.txt'))['content']
^^
spec/lib/client_spec.rb:155:30: C: Prefer JSON.parse over JSON.load.
@edsger_content = JSON::load(File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_content.txt'))['content']
^^^^
spec/lib/client_spec.rb:155:81: C: Line is too long. [115/80]
@edsger_content = JSON::load(File.read(File.dirname(__FILE__) + '/../fixtures/Edsger_content.txt'))['content']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:159:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return only the summary" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:161:81: C: Line is too long. [386/80]
@page.summary.should == 'Edsger Wybe Dijkstra (Dutch pronunciation: [ˈɛtsxər ˈʋibə ˈdɛikstra] ( ); 11 May 1930 – 6 August 2002) was a Dutch computer scientist. He received the 1972 Turing Award for fundamental contributions to developing programming languages, and was the Schlumberger Centennial Chair of Computer Sciences at The University of Texas at Austin from 1984 until 2000.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/client_spec.rb:162:81: C: Line is too long. [250/80]
Shortly before his death in 2002, he received the ACM PODC Influential Paper Award in distributed computing for his work on self-stabilization of program computation. This annual award was renamed the Dijkstra Prize the following year, in his honor.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/sanitize_spec.rb:4:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Page, ".sanitize wiki markup" do
^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/sanitize_spec.rb:5:81: C: Line is too long. [100/80]
Dir[File.dirname(__FILE__) + '/../fixtures/sanitization_samples/*-raw.txt'].each do |raw_filename|
^^^^^^^^^^^^^^^^^^^^
spec/lib/sanitize_spec.rb:6:29: C: Use %r around regular expression.
name = raw_filename.sub(/\/(.+?)\-raw\.txt$/, '\1')
^^^^^^^^^^^^^^^^^^^^
spec/lib/url_spec.rb:3:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia::Url, "like http://en.wikipedia.org/wiki/Getting_Things_Done" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/url_spec.rb:3:81: C: Line is too long. [83/80]
describe Wikipedia::Url, "like http://en.wikipedia.org/wiki/Getting_Things_Done" do
^^^
spec/lib/url_spec.rb:4:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should have a title of Getting_Things_Done" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/url_spec.rb:8:4: C: Final newline missing.
end
spec/lib/wikipedia_spec.rb:3:21: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
describe Wikipedia, ".find" do
^^^^^^^
spec/lib/wikipedia_spec.rb:4:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a Wikipedia::Page instance" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/wikipedia_spec.rb:8:1: C: Trailing whitespace detected.
spec/lib/wikipedia_spec.rb:9:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a Page with a title" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/wikipedia_spec.rb:13:1: C: Trailing whitespace detected.
spec/lib/wikipedia_spec.rb:14:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
it "should return a Page given a URL" do
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/lib/wikipedia_spec.rb:16:1: C: Trailing whitespace detected.
19 files inspected, 351 offenses detected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment