Advertisement
Guest User

Untitled

a guest
Jun 8th, 2016
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.84 KB | None | 0 0
  1. Inspecting 13 files
  2. CCCCCCCCCWC..
  3.  
  4. Offenses:
  5.  
  6. config.ru:3:13: C: Final newline missing.
  7. run Api::App
  8.  
  9. Gemfile:36:4: C: Final newline missing.
  10. end
  11.  
  12. Guardfile:25:9: C: Use // around regular expression.
  13. watch(%r{^app\.rb}) { 'spec' }
  14. ^^^^^^^^^^^^
  15. Rakefile:4:12: C: Use %w or %W for an array of words.
  16. t.libs = ["lib", "spec"]
  17. ^^^^^^^^^^^^^^^
  18. Rakefile:4:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  19. t.libs = ["lib", "spec"]
  20. ^^^^^
  21. Rakefile:4:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  22. t.libs = ["lib", "spec"]
  23. ^^^^^^
  24. Rakefile:5:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  25. t.name = "spec"
  26. ^^^^^^
  27. Rakefile:12:12: C: Use %w or %W for an array of words.
  28. t.libs = ["lib", "spec"]
  29. ^^^^^^^^^^^^^^^
  30. Rakefile:12:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  31. t.libs = ["lib", "spec"]
  32. ^^^^^
  33. Rakefile:12:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  34. t.libs = ["lib", "spec"]
  35. ^^^^^^
  36. Rakefile:15:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  37. t.name = "spec:stories"
  38. ^^^^^^^^^^^^^^
  39. Rakefile:20:12: C: Use %w or %W for an array of words.
  40. t.libs = ["lib", "spec"]
  41. ^^^^^^^^^^^^^^^
  42. Rakefile:20:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  43. t.libs = ["lib", "spec"]
  44. ^^^^^
  45. Rakefile:20:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  46. t.libs = ["lib", "spec"]
  47. ^^^^^^
  48. Rakefile:21:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  49. t.name = "spec:units"
  50. ^^^^^^^^^^^^
  51. Rakefile:27:6: C: Use the new Ruby 1.9 hash syntax.
  52. task :default => :spec
  53. ^^^^^^^^^^^
  54. Rakefile:27:23: C: Final newline missing.
  55. task :default => :spec
  56.  
  57. service.rb:15:1: C: Extra empty line detected at module body beginning.
  58. service.rb:16:3: C: Missing top-level class documentation comment.
  59. class App < ::Sinatra::Base
  60. ^^^^^
  61. service.rb:17:1: C: Extra empty line detected at class body beginning.
  62. service.rb:22:11: C: Indent the first parameter one step more than the start of the previous line.
  63. database_conf['connection'],
  64. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  65. service.rb:31:1: C: Extra empty line detected at block body beginning.
  66. service.rb:38:13: C: Use the new Ruby 1.9 hash syntax.
  67. :username => params[:username],
  68. ^^^^^^^^^^^^
  69. 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.
  70. :username => params[:username],
  71. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  72. service.rb:39:13: C: Use the new Ruby 1.9 hash syntax.
  73. :password => params[:password],
  74. ^^^^^^^^^^^^
  75. service.rb:40:13: C: Use the new Ruby 1.9 hash syntax.
  76. :email => params[:email],
  77. ^^^^^^^^^
  78. service.rb:41:13: C: Use the new Ruby 1.9 hash syntax.
  79. :active => true,
  80. ^^^^^^^^^^
  81. service.rb:41:28: C: Avoid comma after the last item of a hash.
  82. :active => true,
  83. ^
  84. service.rb:45:21: C: Do not use parentheses for method calls with no arguments.
  85. if user.save()
  86. ^
  87. service.rb:46:17: C: Space inside { missing.
  88. [201, {'Content-Type' => 'application/json'}, 'OK'.to_json]
  89. ^
  90. service.rb:46:54: C: Space inside } missing.
  91. [201, {'Content-Type' => 'application/json'}, 'OK'.to_json]
  92. ^
  93. service.rb:48:17: C: Space inside { missing.
  94. [400, {'Content-Type' => 'application/json'}, user.errors.to_json]
  95. ^
  96. service.rb:48:54: C: Space inside } missing.
  97. [400, {'Content-Type' => 'application/json'}, user.errors.to_json]
  98. ^
  99. service.rb:56:15: C: Use the new Ruby 1.9 hash syntax.
  100. :authenticated => 'KO',
  101. ^^^^^^^^^^^^^^^^^
  102. 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.
  103. :authenticated => 'KO',
  104. ^^^^^^^^^^^^^^^^^^^^^^
  105. service.rb:57:15: C: Use the new Ruby 1.9 hash syntax.
  106. :user => '',
  107. ^^^^^^^^
  108. service.rb:58:15: C: Use the new Ruby 1.9 hash syntax.
  109. :username => ''
  110. ^^^^^^^^^^^^
  111. service.rb:62:15: C: Use the new Ruby 1.9 hash syntax.
  112. :authenticated => 'OK',
  113. ^^^^^^^^^^^^^^^^^
  114. 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.
  115. :authenticated => 'OK',
  116. ^^^^^^^^^^^^^^^^^^^^^^
  117. service.rb:63:15: C: Use the new Ruby 1.9 hash syntax.
  118. :user => user.id,
  119. ^^^^^^^^
  120. service.rb:64:15: C: Use the new Ruby 1.9 hash syntax.
  121. :username => user.username
  122. ^^^^^^^^^^^^
  123. service.rb:68:15: C: Space inside { missing.
  124. [200, {'Content-Type' => 'application/json'}, user_data.to_json]
  125. ^
  126. service.rb:68:52: C: Space inside } missing.
  127. [200, {'Content-Type' => 'application/json'}, user_data.to_json]
  128. ^
  129. service.rb:72:4: C: Final newline missing.
  130. end
  131.  
  132. config/puma.rb:6:5: C: Unnecessary spacing detected.
  133. bind 'unix:///var/www/user-service/tmp/sockets/puma.sock'
  134. ^
  135. config/puma.rb:6:5: C: Put one space between the method name and the first argument.
  136. bind 'unix:///var/www/user-service/tmp/sockets/puma.sock'
  137. ^^
  138. config/puma.rb:9:53: C: Final newline missing.
  139. stdout_redirect '/var/www/user-service/log/puma.log'
  140.  
  141. models/user.rb:1:1: C: Missing top-level class documentation comment.
  142. class User
  143. ^^^^^
  144. models/user.rb:2:1: C: Extra empty line detected at class body beginning.
  145. models/user.rb:5:26: C: Use the new Ruby 1.9 hash syntax.
  146. key :username, String, :key => true, :unique => true, :length => 5..25
  147. ^^^^^^^
  148. models/user.rb:5:40: C: Use the new Ruby 1.9 hash syntax.
  149. key :username, String, :key => true, :unique => true, :length => 5..25
  150. ^^^^^^^^^^
  151. models/user.rb:5:57: C: Use the new Ruby 1.9 hash syntax.
  152. key :username, String, :key => true, :unique => true, :length => 5..25
  153. ^^^^^^^^^^
  154. models/user.rb:8:23: C: Use the new Ruby 1.9 hash syntax.
  155. key :email, String, :unique => true
  156. ^^^^^^^^^^
  157. models/user.rb:10:14: C: Unnecessary spacing detected.
  158. timestamps! # adds created_at and updated_at fields
  159. ^^
  160. models/user.rb:20:44: C: Redundant self detected.
  161. return BCrypt::Password.new(secret) if self.secret
  162. ^^^^^^^^^^^
  163. models/user.rb:25:9: C: Redundant self detected.
  164. u = self.find_by_username(requested_username)
  165. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  166. models/user.rb:28:4: C: Final newline missing.
  167. end
  168.  
  169. spec/spec_helper.rb:23:4: C: Final newline missing.
  170. end
  171.  
  172. spec/stories/users_spec.rb:4:1: C: Extra empty line detected at block body beginning.
  173. spec/stories/users_spec.rb:8:11: C: Indent the first parameter one step more than the start of the previous line.
  174. '/v1/register',
  175. ^^^^^^^^^^^^^^
  176. spec/stories/users_spec.rb:9:11: C: Redundant curly braces around a hash parameter.
  177. { ...
  178. ^
  179. spec/stories/users_spec.rb:10:15: C: Use the new Ruby 1.9 hash syntax.
  180. :username => 'johnsmith',
  181. ^^^^^^^^^^^^
  182. 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.
  183. :username => 'johnsmith',
  184. ^^^^^^^^^^^^^^^^^^^^^^^^
  185. spec/stories/users_spec.rb:11:15: C: Use the new Ruby 1.9 hash syntax.
  186. :password => '123456',
  187. ^^^^^^^^^^^^
  188. spec/stories/users_spec.rb:12:15: C: Use the new Ruby 1.9 hash syntax.
  189. :telephone => '5555555',
  190. ^^^^^^^^^^^^^
  191. spec/stories/users_spec.rb:13:15: C: Use the new Ruby 1.9 hash syntax.
  192. :email => 'johnsmith@test.com'
  193. ^^^^^^^^^
  194. spec/stories/users_spec.rb:30:11: C: Use the new Ruby 1.9 hash syntax.
  195. :username => 'johnsmith',
  196. ^^^^^^^^^^^^
  197. 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.
  198. :username => 'johnsmith',
  199. ^^^^^^^^^^^^^^^^^^^^^^^^
  200. spec/stories/users_spec.rb:31:11: C: Use the new Ruby 1.9 hash syntax.
  201. :password => '123456',
  202. ^^^^^^^^^^^^
  203. spec/stories/users_spec.rb:32:11: C: Use the new Ruby 1.9 hash syntax.
  204. :telephone => '5555555',
  205. ^^^^^^^^^^^^^
  206. spec/stories/users_spec.rb:33:11: C: Use the new Ruby 1.9 hash syntax.
  207. :email => 'johnsmith@test.com'
  208. ^^^^^^^^^
  209. spec/stories/users_spec.rb:40:48: C: Space missing inside }.
  210. let(:json) { json_parse(last_response.body)}
  211. ^
  212. spec/stories/users_spec.rb:58:4: C: Final newline missing.
  213. end
  214.  
  215. 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.
  216. register_spec_type(self) do |desc, *addl|
  217. ^^^^
  218. spec/support/story_helpers.rb:9:26: C: Unnecessary spacing detected.
  219. post(url, json(data), 'CONTENT_TYPE' => 'application/json')
  220. ^
  221. spec/support/story_helpers.rb:31:9: C: Indent the first parameter one step more than the start of the previous line.
  222. database_conf['connection'],
  223. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  224. spec/support/story_helpers.rb:35:26: C: Redundant curly braces around a hash parameter.
  225. user = User.find_one({:username => username})
  226. ^^^^^^^^^^^^^^^^^^^^^^^
  227. spec/support/story_helpers.rb:35:26: C: Space inside { missing.
  228. user = User.find_one({:username => username})
  229. ^
  230. spec/support/story_helpers.rb:35:27: C: Use the new Ruby 1.9 hash syntax.
  231. user = User.find_one({:username => username})
  232. ^^^^^^^^^^^^
  233. spec/support/story_helpers.rb:35:48: C: Space inside } missing.
  234. user = User.find_one({:username => username})
  235. ^
  236.  
  237. 13 files inspected, 80 offenses detected
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement