Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Inspecting 13 files
- CCCCCCCCCWC..
- Offenses:
- config.ru:3:13: C: Final newline missing.
- run Api::App
- Gemfile:36:4: C: Final newline missing.
- end
- Guardfile:25:9: C: Use // around regular expression.
- watch(%r{^app\.rb}) { 'spec' }
- ^^^^^^^^^^^^
- Rakefile:4:12: C: Use %w or %W for an array of words.
- t.libs = ["lib", "spec"]
- ^^^^^^^^^^^^^^^
- Rakefile:4:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.libs = ["lib", "spec"]
- ^^^^^
- Rakefile:4:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.libs = ["lib", "spec"]
- ^^^^^^
- Rakefile:5:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.name = "spec"
- ^^^^^^
- Rakefile:12:12: C: Use %w or %W for an array of words.
- t.libs = ["lib", "spec"]
- ^^^^^^^^^^^^^^^
- Rakefile:12:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.libs = ["lib", "spec"]
- ^^^^^
- Rakefile:12:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.libs = ["lib", "spec"]
- ^^^^^^
- Rakefile:15:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.name = "spec:stories"
- ^^^^^^^^^^^^^^
- Rakefile:20:12: C: Use %w or %W for an array of words.
- t.libs = ["lib", "spec"]
- ^^^^^^^^^^^^^^^
- Rakefile:20:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.libs = ["lib", "spec"]
- ^^^^^
- Rakefile:20:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.libs = ["lib", "spec"]
- ^^^^^^
- Rakefile:21:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
- t.name = "spec:units"
- ^^^^^^^^^^^^
- Rakefile:27:6: C: Use the new Ruby 1.9 hash syntax.
- task :default => :spec
- ^^^^^^^^^^^
- Rakefile:27:23: C: Final newline missing.
- task :default => :spec
- service.rb:15:1: C: Extra empty line detected at module body beginning.
- service.rb:16:3: C: Missing top-level class documentation comment.
- class App < ::Sinatra::Base
- ^^^^^
- service.rb:17:1: C: Extra empty line detected at class body beginning.
- service.rb:22:11: C: Indent the first parameter one step more than the start of the previous line.
- database_conf['connection'],
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- service.rb:31:1: C: Extra empty line detected at block body beginning.
- service.rb:38:13: C: Use the new Ruby 1.9 hash syntax.
- :username => params[:username],
- ^^^^^^^^^^^^
- service.rb:38:13: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
- :username => params[:username],
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- service.rb:39:13: C: Use the new Ruby 1.9 hash syntax.
- :password => params[:password],
- ^^^^^^^^^^^^
- service.rb:40:13: C: Use the new Ruby 1.9 hash syntax.
- :email => params[:email],
- ^^^^^^^^^
- service.rb:41:13: C: Use the new Ruby 1.9 hash syntax.
- :active => true,
- ^^^^^^^^^^
- service.rb:41:28: C: Avoid comma after the last item of a hash.
- :active => true,
- ^
- service.rb:45:21: C: Do not use parentheses for method calls with no arguments.
- if user.save()
- ^
- service.rb:46:17: C: Space inside { missing.
- [201, {'Content-Type' => 'application/json'}, 'OK'.to_json]
- ^
- service.rb:46:54: C: Space inside } missing.
- [201, {'Content-Type' => 'application/json'}, 'OK'.to_json]
- ^
- service.rb:48:17: C: Space inside { missing.
- [400, {'Content-Type' => 'application/json'}, user.errors.to_json]
- ^
- service.rb:48:54: C: Space inside } missing.
- [400, {'Content-Type' => 'application/json'}, user.errors.to_json]
- ^
- service.rb:56:15: C: Use the new Ruby 1.9 hash syntax.
- :authenticated => 'KO',
- ^^^^^^^^^^^^^^^^^
- service.rb:56:15: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
- :authenticated => 'KO',
- ^^^^^^^^^^^^^^^^^^^^^^
- service.rb:57:15: C: Use the new Ruby 1.9 hash syntax.
- :user => '',
- ^^^^^^^^
- service.rb:58:15: C: Use the new Ruby 1.9 hash syntax.
- :username => ''
- ^^^^^^^^^^^^
- service.rb:62:15: C: Use the new Ruby 1.9 hash syntax.
- :authenticated => 'OK',
- ^^^^^^^^^^^^^^^^^
- service.rb:62:15: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
- :authenticated => 'OK',
- ^^^^^^^^^^^^^^^^^^^^^^
- service.rb:63:15: C: Use the new Ruby 1.9 hash syntax.
- :user => user.id,
- ^^^^^^^^
- service.rb:64:15: C: Use the new Ruby 1.9 hash syntax.
- :username => user.username
- ^^^^^^^^^^^^
- service.rb:68:15: C: Space inside { missing.
- [200, {'Content-Type' => 'application/json'}, user_data.to_json]
- ^
- service.rb:68:52: C: Space inside } missing.
- [200, {'Content-Type' => 'application/json'}, user_data.to_json]
- ^
- service.rb:72:4: C: Final newline missing.
- end
- config/puma.rb:6:5: C: Unnecessary spacing detected.
- bind 'unix:///var/www/user-service/tmp/sockets/puma.sock'
- ^
- config/puma.rb:6:5: C: Put one space between the method name and the first argument.
- bind 'unix:///var/www/user-service/tmp/sockets/puma.sock'
- ^^
- config/puma.rb:9:53: C: Final newline missing.
- stdout_redirect '/var/www/user-service/log/puma.log'
- models/user.rb:1:1: C: Missing top-level class documentation comment.
- class User
- ^^^^^
- models/user.rb:2:1: C: Extra empty line detected at class body beginning.
- models/user.rb:5:26: C: Use the new Ruby 1.9 hash syntax.
- key :username, String, :key => true, :unique => true, :length => 5..25
- ^^^^^^^
- models/user.rb:5:40: C: Use the new Ruby 1.9 hash syntax.
- key :username, String, :key => true, :unique => true, :length => 5..25
- ^^^^^^^^^^
- models/user.rb:5:57: C: Use the new Ruby 1.9 hash syntax.
- key :username, String, :key => true, :unique => true, :length => 5..25
- ^^^^^^^^^^
- models/user.rb:8:23: C: Use the new Ruby 1.9 hash syntax.
- key :email, String, :unique => true
- ^^^^^^^^^^
- models/user.rb:10:14: C: Unnecessary spacing detected.
- timestamps! # adds created_at and updated_at fields
- ^^
- models/user.rb:20:44: C: Redundant self detected.
- return BCrypt::Password.new(secret) if self.secret
- ^^^^^^^^^^^
- models/user.rb:25:9: C: Redundant self detected.
- u = self.find_by_username(requested_username)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- models/user.rb:28:4: C: Final newline missing.
- end
- spec/spec_helper.rb:23:4: C: Final newline missing.
- end
- spec/stories/users_spec.rb:4:1: C: Extra empty line detected at block body beginning.
- spec/stories/users_spec.rb:8:11: C: Indent the first parameter one step more than the start of the previous line.
- '/v1/register',
- ^^^^^^^^^^^^^^
- spec/stories/users_spec.rb:9:11: C: Redundant curly braces around a hash parameter.
- { ...
- ^
- spec/stories/users_spec.rb:10:15: C: Use the new Ruby 1.9 hash syntax.
- :username => 'johnsmith',
- ^^^^^^^^^^^^
- spec/stories/users_spec.rb:10:15: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
- :username => 'johnsmith',
- ^^^^^^^^^^^^^^^^^^^^^^^^
- spec/stories/users_spec.rb:11:15: C: Use the new Ruby 1.9 hash syntax.
- :password => '123456',
- ^^^^^^^^^^^^
- spec/stories/users_spec.rb:12:15: C: Use the new Ruby 1.9 hash syntax.
- :telephone => '5555555',
- ^^^^^^^^^^^^^
- spec/stories/users_spec.rb:13:15: C: Use the new Ruby 1.9 hash syntax.
- :email => 'johnsmith@test.com'
- ^^^^^^^^^
- spec/stories/users_spec.rb:30:11: C: Use the new Ruby 1.9 hash syntax.
- :username => 'johnsmith',
- ^^^^^^^^^^^^
- spec/stories/users_spec.rb:30:11: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is.
- :username => 'johnsmith',
- ^^^^^^^^^^^^^^^^^^^^^^^^
- spec/stories/users_spec.rb:31:11: C: Use the new Ruby 1.9 hash syntax.
- :password => '123456',
- ^^^^^^^^^^^^
- spec/stories/users_spec.rb:32:11: C: Use the new Ruby 1.9 hash syntax.
- :telephone => '5555555',
- ^^^^^^^^^^^^^
- spec/stories/users_spec.rb:33:11: C: Use the new Ruby 1.9 hash syntax.
- :email => 'johnsmith@test.com'
- ^^^^^^^^^
- spec/stories/users_spec.rb:40:48: C: Space missing inside }.
- let(:json) { json_parse(last_response.body)}
- ^
- spec/stories/users_spec.rb:58:4: C: Final newline missing.
- end
- spec/story_helper.rb:10:32: W: Unused block argument - desc. If it's necessary, use _ or _desc as an argument name to indicate that it won't be used.
- register_spec_type(self) do |desc, *addl|
- ^^^^
- spec/support/story_helpers.rb:9:26: C: Unnecessary spacing detected.
- post(url, json(data), 'CONTENT_TYPE' => 'application/json')
- ^
- spec/support/story_helpers.rb:31:9: C: Indent the first parameter one step more than the start of the previous line.
- database_conf['connection'],
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- spec/support/story_helpers.rb:35:26: C: Redundant curly braces around a hash parameter.
- user = User.find_one({:username => username})
- ^^^^^^^^^^^^^^^^^^^^^^^
- spec/support/story_helpers.rb:35:26: C: Space inside { missing.
- user = User.find_one({:username => username})
- ^
- spec/support/story_helpers.rb:35:27: C: Use the new Ruby 1.9 hash syntax.
- user = User.find_one({:username => username})
- ^^^^^^^^^^^^
- spec/support/story_helpers.rb:35:48: C: Space inside } missing.
- user = User.find_one({:username => username})
- ^
- 13 files inspected, 80 offenses detected
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement