orcid 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +10 -0
- data/.hound.yml +793 -0
- data/.travis.yml +14 -0
- data/Gemfile +14 -0
- data/README.md +107 -6
- data/Rakefile +17 -9
- data/app/assets/images/orcid/.keep +0 -0
- data/app/controllers/orcid/application_controller.rb +13 -4
- data/app/controllers/orcid/profile_connections_controller.rb +34 -6
- data/app/controllers/orcid/profile_requests_controller.rb +18 -15
- data/app/models/orcid/profile.rb +15 -5
- data/app/models/orcid/profile_connection.rb +20 -20
- data/app/models/orcid/profile_request.rb +39 -20
- data/app/models/orcid/work.rb +45 -55
- data/app/models/orcid/work/xml_parser.rb +45 -0
- data/app/models/orcid/work/xml_renderer.rb +29 -0
- data/app/services/orcid/remote/profile_creation_service.rb +40 -32
- data/app/services/orcid/remote/profile_query_service.rb +82 -0
- data/app/services/orcid/remote/profile_query_service/query_parameter_builder.rb +43 -0
- data/app/services/orcid/remote/profile_query_service/search_response.rb +31 -0
- data/app/services/orcid/remote/service.rb +16 -13
- data/app/services/orcid/remote/work_service.rb +58 -43
- data/app/templates/orcid/work.template.v1.1.xml.erb +32 -1
- data/app/views/orcid/profile_connections/_orcid_connector.html.erb +14 -0
- data/app/views/orcid/profile_connections/new.html.erb +4 -4
- data/bin/rails +8 -0
- data/config/{application.yml → application.yml.example} +3 -13
- data/config/locales/orcid.en.yml +5 -1
- data/config/routes.rb +4 -2
- data/lib/generators/orcid/install/install_generator.rb +46 -7
- data/lib/orcid.rb +23 -11
- data/lib/orcid/configuration.rb +32 -13
- data/lib/orcid/configuration/provider.rb +27 -13
- data/lib/orcid/engine.rb +20 -4
- data/lib/orcid/exceptions.rb +33 -4
- data/lib/orcid/named_callbacks.rb +3 -1
- data/lib/orcid/spec_support.rb +19 -9
- data/lib/orcid/version.rb +1 -1
- data/lib/tasks/orcid_tasks.rake +3 -3
- data/orcid.gemspec +51 -0
- data/rubocop.txt +1164 -0
- data/script/fast_specs +22 -0
- data/spec/controllers/orcid/profile_connections_controller_spec.rb +101 -0
- data/spec/controllers/orcid/profile_requests_controller_spec.rb +116 -0
- data/spec/factories/orcid_profile_requests.rb +11 -0
- data/spec/factories/users.rb +9 -0
- data/spec/fast_helper.rb +12 -0
- data/spec/features/batch_profile_spec.rb +31 -0
- data/spec/features/non_ui_based_interactions_spec.rb +117 -0
- data/spec/features/profile_connection_feature_spec.rb +19 -0
- data/spec/features/public_api_query_spec.rb +36 -0
- data/spec/fixtures/orcid_works.xml +55 -0
- data/spec/lib/orcid/configuration/provider_spec.rb +40 -0
- data/spec/lib/orcid/configuration_spec.rb +38 -0
- data/spec/lib/orcid/named_callbacks_spec.rb +28 -0
- data/spec/lib/orcid_spec.rb +97 -0
- data/spec/models/orcid/profile_connection_spec.rb +81 -0
- data/spec/models/orcid/profile_request_spec.rb +131 -0
- data/spec/models/orcid/profile_spec.rb +76 -0
- data/spec/models/orcid/work/xml_parser_spec.rb +40 -0
- data/spec/models/orcid/work/xml_renderer_spec.rb +18 -0
- data/spec/models/orcid/work_spec.rb +53 -0
- data/spec/services/orcid/remote/profile_creation_service_spec.rb +40 -0
- data/spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb +44 -0
- data/spec/services/orcid/remote/profile_query_service/search_response_spec.rb +14 -0
- data/spec/services/orcid/remote/profile_query_service_spec.rb +118 -0
- data/spec/services/orcid/remote/service_spec.rb +26 -0
- data/spec/services/orcid/remote/work_service_spec.rb +44 -0
- data/spec/spec_helper.rb +99 -0
- data/spec/support/non_orcid_models.rb +11 -0
- data/spec/support/stub_callback.rb +25 -0
- data/spec/test_app_templates/Gemfile.extra +3 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +36 -0
- data/spec/views/orcid/profile_connections/new.html.erb_spec.rb +25 -0
- data/spec/views/orcid/profile_requests/new.html.erb_spec.rb +23 -0
- metadata +119 -29
- data/app/runners/orcid/profile_lookup_runner.rb +0 -33
- data/app/runners/orcid/runner.rb +0 -15
- data/app/services/orcid/remote/profile_lookup_service.rb +0 -56
- data/app/services/orcid/remote/profile_lookup_service/search_response.rb +0 -23
- data/lib/orcid/query_parameter_builder.rb +0 -38
data/rubocop.txt
ADDED
@@ -0,0 +1,1164 @@
|
|
1
|
+
Inspecting 93 files
|
2
|
+
.....CC...C.C..C..C....C.CCWCWCCCC.WCWCCCCC....W...C.C...WC..CC..C.C..CCCCCCCCCCCCCCCCCCCWC..
|
3
|
+
|
4
|
+
Offenses:
|
5
|
+
|
6
|
+
app/models/orcid/profile_request.rb:76:5: C: Method has too many lines. [21/10]
|
7
|
+
def xml_payload(input = attributes)
|
8
|
+
^^^
|
9
|
+
app/models/orcid/profile_request.rb:81:141: C: Line is too long. [149/140]
|
10
|
+
xmlns:xsi="http://www.orcid.org/ns/orcid https://raw.github.com/ORCID/ORCID-Source/master/orcid-model/src/main/resources/orcid-message-1.1.xsd"
|
11
|
+
^^^^^^^^^
|
12
|
+
app/models/orcid/work/xml_parser.rb:27:7: C: Method has too many lines. [14/10]
|
13
|
+
def transform(node)
|
14
|
+
^^^
|
15
|
+
app/services/orcid/remote/profile_query_service/query_parameter_builder.rb:7:1: C: Extra empty line detected at body beginning.
|
16
|
+
app/services/orcid/remote/profile_query_service/query_parameter_builder.rb:14:9: C: Cyclomatic complexity for call is too high. [7/6]
|
17
|
+
def call(input = {})
|
18
|
+
^^^
|
19
|
+
app/services/orcid/remote/profile_query_service/query_parameter_builder.rb:14:9: C: Method has too many lines. [23/10]
|
20
|
+
def call(input = {})
|
21
|
+
^^^
|
22
|
+
app/services/orcid/remote/profile_query_service.rb:56:7: C: Method has too many lines. [20/10]
|
23
|
+
def parse(document)
|
24
|
+
^^^
|
25
|
+
app/services/orcid/remote/profile_query_service.rb:69:59: C: Space between { and | missing.
|
26
|
+
emails = (contact_details['email'] || []).map {|email| email.fetch('value') }
|
27
|
+
^^
|
28
|
+
app/services/orcid/remote/profile_query_service.rb:79:1: C: Extra empty line detected at body end.
|
29
|
+
app/services/orcid/remote.rb:2:3: C: Missing top-level module documentation comment.
|
30
|
+
module Remote
|
31
|
+
^^^^^^
|
32
|
+
app/services/orcid/remote.rb:4:4: C: Final newline missing.
|
33
|
+
end
|
34
|
+
|
35
|
+
db/migrate/20140205185338_create_orcid_profile_requests.rb:1:1: C: Missing top-level class documentation comment.
|
36
|
+
class CreateOrcidProfileRequests < ActiveRecord::Migration
|
37
|
+
^^^^^
|
38
|
+
lib/orcid/exceptions.rb:2:1: C: Extra empty line detected at body beginning.
|
39
|
+
lib/orcid/exceptions.rb:3:3: C: Missing top-level class documentation comment.
|
40
|
+
class ConfigurationError < RuntimeError
|
41
|
+
^^^^^
|
42
|
+
lib/orcid/exceptions.rb:14:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
43
|
+
text << "-- Client --"
|
44
|
+
^^^^^^^^^^^^^^
|
45
|
+
lib/orcid/spec_support.rb:2:1: C: Missing top-level class documentation comment.
|
46
|
+
class RequestSandboxAuthorizationCode
|
47
|
+
^^^^^
|
48
|
+
lib/orcid/spec_support.rb:3:1: C: Extra empty line detected at body beginning.
|
49
|
+
lib/orcid/spec_support.rb:52:35: C: Redundant curly braces around a hash parameter.
|
50
|
+
RestClient.get(authorize_url, { params: parameters, cookies: cookies })
|
51
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
52
|
+
lib/orcid/spec_support.rb:57:53: C: Redundant curly braces around a hash parameter.
|
53
|
+
authorize_url, { user_oauth_approval: true }, { cookies: cookies }
|
54
|
+
^^^^^^^^^^^^^^^^^^^^
|
55
|
+
lib/orcid/spec_support.rb:63:1: C: Extra empty line detected at body end.
|
56
|
+
lib/orcid/version.rb:1:1: C: Missing top-level module documentation comment.
|
57
|
+
module Orcid
|
58
|
+
^^^^^^
|
59
|
+
lib/orcid.rb:13:1: C: Missing top-level module documentation comment.
|
60
|
+
module Orcid
|
61
|
+
^^^^^^
|
62
|
+
lib/orcid.rb:14:1: C: Extra empty line detected at body beginning.
|
63
|
+
lib/orcid.rb:62:13: W: Assignment in condition - you probably meant to use ==.
|
64
|
+
if auth = authentication_model.where(provider: 'orcid', user: user).first
|
65
|
+
^
|
66
|
+
lib/orcid.rb:85:1: C: Extra empty line detected at body end.
|
67
|
+
orcid.gemspec:1:1: C: Prefer $LOAD_PATH over $:.
|
68
|
+
$:.push File.expand_path("../lib", __FILE__)
|
69
|
+
^^
|
70
|
+
orcid.gemspec:1:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
71
|
+
$:.push File.expand_path("../lib", __FILE__)
|
72
|
+
^^^^^^^^
|
73
|
+
orcid.gemspec:21:34: C: Use %r only for regular expressions matching more than 1 '/' character.
|
74
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
75
|
+
^^^^^^^^^
|
76
|
+
orcid.gemspec:22:34: C: Use %r only for regular expressions matching more than 1 '/' character.
|
77
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
78
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
79
|
+
orcid.gemspec:23:22: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
80
|
+
s.require_paths = ["lib"]
|
81
|
+
^^^^^
|
82
|
+
Rakefile:9:1: C: Extra blank line detected.
|
83
|
+
Rakefile:11:35: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
84
|
+
APP_RAKEFILE = File.expand_path("../spec/internal/Rakefile", __FILE__)
|
85
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
86
|
+
Rakefile:21:39: W: Unused block argument - t. You can omit the argument if you don't care about it.
|
87
|
+
RSpec::Core::RakeTask.new(:all) do |t|
|
88
|
+
^
|
89
|
+
Rakefile:26:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
90
|
+
t.rspec_opts = "--tag ~requires_net_connect"
|
91
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
92
|
+
Rakefile:31:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
93
|
+
t.rspec_opts = "--tag requires_net_connect"
|
94
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
95
|
+
Rakefile:37:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
96
|
+
ENV['SPEC_OPTS'] = "--profile 20"
|
97
|
+
^^^^^^^^^^^^^^
|
98
|
+
Rakefile:45:1: C: Avoid using rescue in its modifier form.
|
99
|
+
Rake::Task["default"].clear rescue nil
|
100
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
101
|
+
Rakefile:45:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
102
|
+
Rake::Task["default"].clear rescue nil
|
103
|
+
^^^^^^^^^
|
104
|
+
Rakefile:46:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
105
|
+
Rake::Task["spec"].clear
|
106
|
+
^^^^^^
|
107
|
+
Rakefile:48:6: C: Use the new Ruby 1.9 hash syntax.
|
108
|
+
task :spec => 'spec:offline'
|
109
|
+
^^^^^^^^
|
110
|
+
Rakefile:49:6: C: Use the new Ruby 1.9 hash syntax.
|
111
|
+
task :default => 'spec:travis'
|
112
|
+
^^^^^^^^^^^
|
113
|
+
Rakefile:49:31: C: Final newline missing.
|
114
|
+
task :default => 'spec:travis'
|
115
|
+
|
116
|
+
script/fast_specs:5:1: C: Missing top-level module documentation comment.
|
117
|
+
module Fast
|
118
|
+
^^^^^^
|
119
|
+
script/fast_specs:12:51: C: Avoid using {...} for multi-line blocks.
|
120
|
+
fast_specs = FileList['spec/**/*_spec.rb'].select { |fn|
|
121
|
+
^
|
122
|
+
script/fast_specs:18:8: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
123
|
+
puts "Unable to find any fast specs"
|
124
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
125
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:3:1: C: Missing top-level module documentation comment.
|
126
|
+
module Orcid
|
127
|
+
^^^^^^
|
128
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:14:5: C: Method has too many lines. [12/10]
|
129
|
+
def self.it_redirects_if_user_has_previously_connected_to_orcid_profile(method, action)
|
130
|
+
^^^
|
131
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:18:34: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
132
|
+
orcid_profile = double("Orcid::Profile", orcid_profile_id: '1234-5678-0001-0002')
|
133
|
+
^^^^^^^^^^^^^^^^
|
134
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:25:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
135
|
+
I18n.t("orcid.requests.messages.previously_connected_profile", orcid_profile_id: orcid_profile.orcid_profile_id)
|
136
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
137
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:42:45: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
138
|
+
expect(flash[:notice]).to eq(I18n.t("orcid.connections.messages.profile_connection_not_found"))
|
139
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
140
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:48:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
141
|
+
orcid_profile = double("Orcid::Profile", orcid_profile_id: '1234-5678-0001-0002', verified_authentication?: false)
|
142
|
+
^^^^^^^^^^^^^^^^
|
143
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:52:69: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
144
|
+
expect(response).to redirect_to(user_omniauth_authorize_url("orcid"))
|
145
|
+
^^^^^^^
|
146
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:57:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
147
|
+
orcid_profile = double("Orcid::Profile", orcid_profile_id: '1234-5678-0001-0002', verified_authentication?: true)
|
148
|
+
^^^^^^^^^^^^^^^^
|
149
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:63:45: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
150
|
+
expect(flash[:notice]).to eq(I18n.t("orcid.connections.messages.verified_profile_connection_exists", orcid_profile_id: orcid_profile.orcid_profile_id))
|
151
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
152
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:63:141: C: Line is too long. [159/140]
|
153
|
+
expect(flash[:notice]).to eq(I18n.t("orcid.connections.messages.verified_profile_connection_exists", orcid_profile_id: orcid_profile.orcid_profile_id))
|
154
|
+
^^^^^^^^^^^^^^^^^^^
|
155
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:88:33: C: Space missing inside {.
|
156
|
+
let(:orcid_profile_id) {'0000-0001-8025-637X'}
|
157
|
+
^
|
158
|
+
spec/controllers/orcid/profile_connections_controller_spec.rb:88:54: C: Space missing inside }.
|
159
|
+
let(:orcid_profile_id) {'0000-0001-8025-637X'}
|
160
|
+
^
|
161
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:3:1: C: Missing top-level module documentation comment.
|
162
|
+
module Orcid
|
163
|
+
^^^^^^
|
164
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:7:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
165
|
+
it "should redirect for sign in" do
|
166
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
167
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:14:5: C: Method has too many lines. [12/10]
|
168
|
+
def self.it_redirects_if_user_has_previously_connected_to_orcid_profile(method, action)
|
169
|
+
^^^
|
170
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:18:34: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
171
|
+
orcid_profile = double("Orcid::Profile", orcid_profile_id: '1234-5678-0001-0002')
|
172
|
+
^^^^^^^^^^^^^^^^
|
173
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:25:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
174
|
+
I18n.t("orcid.requests.messages.previously_connected_profile", orcid_profile_id: orcid_profile.orcid_profile_id)
|
175
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
176
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:42:94: C: Space missing inside }.
|
177
|
+
let(:profile_request) { FactoryGirl.build_stubbed(:orcid_profile_request, user: user)}
|
178
|
+
^
|
179
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:45:62: C: Place the . on the next line, together with the method name.
|
180
|
+
Orcid::ProfileRequest.should_receive(:find_by_user).
|
181
|
+
^
|
182
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:56:62: C: Place the . on the next line, together with the method name.
|
183
|
+
Orcid::ProfileRequest.should_receive(:find_by_user).
|
184
|
+
^
|
185
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:61:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
186
|
+
expect(flash[:notice]).to eq(I18n.t("orcid.requests.messages.existing_request_not_found"))
|
187
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
188
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:85:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
189
|
+
expect(flash[:notice]).to eq(I18n.t("orcid.requests.messages.existing_request"))
|
190
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
191
|
+
spec/controllers/orcid/profile_requests_controller_spec.rb:109:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
192
|
+
expect(flash[:notice]).to eq(I18n.t("orcid.requests.messages.existing_request"))
|
193
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
194
|
+
spec/factories/orcid_profile_requests.rb:4:35: C: Use the new Ruby 1.9 hash syntax.
|
195
|
+
factory :orcid_profile_request, :class => 'Orcid::ProfileRequest' do
|
196
|
+
^^^^^^^^^
|
197
|
+
spec/fast_helper.rb:2:22: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
198
|
+
Dir[File.expand_path("../../app/*", __FILE__)].each do |dir|
|
199
|
+
^^^^^^^^^^^^^
|
200
|
+
spec/fast_helper.rb:5:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
201
|
+
$LOAD_PATH << File.expand_path("../../lib", __FILE__)
|
202
|
+
^^^^^^^^^^^
|
203
|
+
spec/fast_helper.rb:10:13: W: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the * if it should be a multiplication.
|
204
|
+
require *files
|
205
|
+
^
|
206
|
+
spec/features/batch_profile_spec.rb:10:18: C: Avoid using {...} for multi-line blocks.
|
207
|
+
Given(:runner) {
|
208
|
+
^
|
209
|
+
spec/features/batch_profile_spec.rb:11:12: C: Avoid using {...} for multi-line blocks.
|
210
|
+
lambda { |person|
|
211
|
+
^
|
212
|
+
spec/features/batch_profile_spec.rb:12:46: C: Avoid using {...} for multi-line blocks.
|
213
|
+
Orcid::Remote::ProfileQueryService.new {|on|
|
214
|
+
^
|
215
|
+
spec/features/batch_profile_spec.rb:13:18: C: Space between { and | missing.
|
216
|
+
on.found {|results| person.found(results) }
|
217
|
+
^^
|
218
|
+
spec/features/batch_profile_spec.rb:18:18: C: Avoid using {...} for multi-line blocks.
|
219
|
+
Given(:person) {
|
220
|
+
^
|
221
|
+
spec/features/non_ui_based_interactions_spec.rb:5:21: C: Space between { and | missing.
|
222
|
+
Mappy.configure {|b|}
|
223
|
+
^^
|
224
|
+
spec/features/non_ui_based_interactions_spec.rb:5:23: W: Unused block argument - b. You can omit the argument if you don't care about it.
|
225
|
+
Mappy.configure {|b|}
|
226
|
+
^
|
227
|
+
spec/features/non_ui_based_interactions_spec.rb:5:25: C: Space missing inside }.
|
228
|
+
Mappy.configure {|b|}
|
229
|
+
^
|
230
|
+
spec/features/non_ui_based_interactions_spec.rb:12:39: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
231
|
+
let(:work) { Orcid::Work.new(title: "Test Driven Orcid Integration", work_type: 'test') }
|
232
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
233
|
+
spec/features/non_ui_based_interactions_spec.rb:21:27: C: Avoid using {...} for multi-line blocks.
|
234
|
+
let(:profile_request) {
|
235
|
+
^
|
236
|
+
spec/features/non_ui_based_interactions_spec.rb:51:67: C: Space missing inside }.
|
237
|
+
let(:orcid_profile_id) { ENV.fetch('ORCID_CLAIMED_PROFILE_ID')}
|
238
|
+
^
|
239
|
+
spec/features/non_ui_based_interactions_spec.rb:52:79: C: Space missing inside }.
|
240
|
+
let(:orcid_profile_password) { ENV.fetch('ORCID_CLAIMED_PROFILE_PASSWORD')}
|
241
|
+
^
|
242
|
+
spec/features/non_ui_based_interactions_spec.rb:61:49: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
243
|
+
replacement_work = Orcid::Work.new(title: "Test Driven Orcid Integration", work_type: 'test')
|
244
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
245
|
+
spec/features/non_ui_based_interactions_spec.rb:62:46: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
246
|
+
appended_work = Orcid::Work.new(title: "Another Test Drive", work_type: 'test')
|
247
|
+
^^^^^^^^^^^^^^^^^^^^
|
248
|
+
spec/features/non_ui_based_interactions_spec.rb:66:14: C: Avoid using {...} for multi-line blocks.
|
249
|
+
expect {
|
250
|
+
^
|
251
|
+
spec/features/non_ui_based_interactions_spec.rb:77:24: C: Space inside { missing.
|
252
|
+
normalized_token = {provider: 'orcid', uid: orcid_profile_id, credentials: {token: token.token, refresh_token: token.refresh_token }}
|
253
|
+
^
|
254
|
+
spec/features/non_ui_based_interactions_spec.rb:77:80: C: Space inside { missing.
|
255
|
+
normalized_token = {provider: 'orcid', uid: orcid_profile_id, credentials: {token: token.token, refresh_token: token.refresh_token }}
|
256
|
+
^
|
257
|
+
spec/features/non_ui_based_interactions_spec.rb:77:137: C: Space inside } missing.
|
258
|
+
normalized_token = {provider: 'orcid', uid: orcid_profile_id, credentials: {token: token.token, refresh_token: token.refresh_token }}
|
259
|
+
^
|
260
|
+
spec/features/non_ui_based_interactions_spec.rb:82:3: C: Method has too many lines. [28/10]
|
261
|
+
def claim_the_orcid!(email_prefix)
|
262
|
+
^^^
|
263
|
+
spec/features/non_ui_based_interactions_spec.rb:101:36: C: Prefer map over collect.
|
264
|
+
href = page.all('.mailview a').collect { |a| a[:href] }.find {|href| href = /\/claim\//}
|
265
|
+
^^^^^^^
|
266
|
+
spec/features/non_ui_based_interactions_spec.rb:101:66: C: Space between { and | missing.
|
267
|
+
href = page.all('.mailview a').collect { |a| a[:href] }.find {|href| href = /\/claim\//}
|
268
|
+
^^
|
269
|
+
spec/features/non_ui_based_interactions_spec.rb:101:68: W: Shadowing outer local variable - href.
|
270
|
+
href = page.all('.mailview a').collect { |a| a[:href] }.find {|href| href = /\/claim\//}
|
271
|
+
^^^^
|
272
|
+
spec/features/non_ui_based_interactions_spec.rb:101:68: W: Unused block argument - href. You can omit the argument if you don't care about it.
|
273
|
+
href = page.all('.mailview a').collect { |a| a[:href] }.find {|href| href = /\/claim\//}
|
274
|
+
^^^^
|
275
|
+
spec/features/non_ui_based_interactions_spec.rb:101:74: W: Useless assignment to variable - href.
|
276
|
+
href = page.all('.mailview a').collect { |a| a[:href] }.find {|href| href = /\/claim\//}
|
277
|
+
^^^^
|
278
|
+
spec/features/non_ui_based_interactions_spec.rb:101:81: C: Use %r for regular expressions matching more than 1 '/' character.
|
279
|
+
href = page.all('.mailview a').collect { |a| a[:href] }.find {|href| href = /\/claim\//}
|
280
|
+
^^^^^^^^^^^
|
281
|
+
spec/features/non_ui_based_interactions_spec.rb:101:92: C: Space missing inside }.
|
282
|
+
href = page.all('.mailview a').collect { |a| a[:href] }.find {|href| href = /\/claim\//}
|
283
|
+
^
|
284
|
+
spec/features/non_ui_based_interactions_spec.rb:114:29: C: Space between { and | missing.
|
285
|
+
page.all('button').find {|i| i.text == 'Claim' }.click
|
286
|
+
^^
|
287
|
+
spec/features/profile_connection_feature_spec.rb:3:1: C: Missing top-level module documentation comment.
|
288
|
+
module Orcid
|
289
|
+
^^^^^^
|
290
|
+
spec/features/public_api_query_spec.rb:10:18: C: Avoid using {...} for multi-line blocks.
|
291
|
+
Given(:runner) {
|
292
|
+
^
|
293
|
+
spec/features/public_api_query_spec.rb:32:35: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
294
|
+
Given(:parameters) { { email: "nobody@gmail.com", text: '"Jeremy+Friesen"' } }
|
295
|
+
^^^^^^^^^^^^^^^^^^
|
296
|
+
spec/internal/app/controllers/application_controller.rb:1:1: C: Missing top-level class documentation comment.
|
297
|
+
class ApplicationController < ActionController::Base
|
298
|
+
^^^^^
|
299
|
+
spec/internal/app/controllers/application_controller.rb:2:1: C: Use 2 (not 6) spaces for indentation.
|
300
|
+
def index
|
301
|
+
^^^^^^
|
302
|
+
spec/internal/app/controllers/application_controller.rb:5:1: C: Trailing whitespace detected.
|
303
|
+
spec/internal/app/controllers/application_controller.rb:8:3: C: Inconsistent indentation detected.
|
304
|
+
protect_from_forgery with: :exception
|
305
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
306
|
+
spec/internal/app/helpers/application_helper.rb:1:1: C: Missing top-level module documentation comment.
|
307
|
+
module ApplicationHelper
|
308
|
+
^^^^^^
|
309
|
+
spec/internal/app/models/user.rb:1:1: C: Missing top-level class documentation comment.
|
310
|
+
class User < ActiveRecord::Base
|
311
|
+
^^^^^
|
312
|
+
spec/internal/app/models/user.rb:5:80: C: Use the new Ruby 1.9 hash syntax.
|
313
|
+
:recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:orcid]
|
314
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
315
|
+
spec/internal/config/boot.rb:4:33: W: File.exists? is deprecated in favor of File.exist?.
|
316
|
+
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
317
|
+
^^^^^^^
|
318
|
+
spec/internal/config/environments/test.rb:17:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
319
|
+
config.static_cache_control = "public, max-age=3600"
|
320
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
321
|
+
spec/internal/config/initializers/devise.rb:4:1: C: Use 2 (not 8) spaces for indentation.
|
322
|
+
config.omniauth(:orcid, Orcid.provider.id, Orcid.provider.secret,
|
323
|
+
^^^^^^^^
|
324
|
+
spec/internal/config/initializers/devise.rb:12:1: C: Trailing whitespace detected.
|
325
|
+
spec/internal/config/initializers/devise.rb:16:141: C: Line is too long. [154/140]
|
326
|
+
# config.secret_key = '07af7d8750d7a05a59152b6d5b201a354a4dbfe4f45a261a7ed4e2cf5fdb414dc8358389db71e46075f5d021f46a267018d4940763b53953acb3587673431e52'
|
327
|
+
^^^^^^^^^^^^^^
|
328
|
+
spec/internal/config/initializers/devise.rb:22:3: C: Inconsistent indentation detected.
|
329
|
+
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
|
330
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
331
|
+
spec/internal/config/initializers/devise.rb:31:3: C: Inconsistent indentation detected.
|
332
|
+
require 'devise/orm/active_record'
|
333
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
334
|
+
spec/internal/config/initializers/devise.rb:53:3: C: Inconsistent indentation detected.
|
335
|
+
config.case_insensitive_keys = [ :email ]
|
336
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
337
|
+
spec/internal/config/initializers/devise.rb:53:35: C: Space inside square brackets detected.
|
338
|
+
config.case_insensitive_keys = [ :email ]
|
339
|
+
^
|
340
|
+
spec/internal/config/initializers/devise.rb:53:42: C: Space inside square brackets detected.
|
341
|
+
config.case_insensitive_keys = [ :email ]
|
342
|
+
^
|
343
|
+
spec/internal/config/initializers/devise.rb:58:3: C: Inconsistent indentation detected.
|
344
|
+
config.strip_whitespace_keys = [ :email ]
|
345
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
346
|
+
spec/internal/config/initializers/devise.rb:58:35: C: Space inside square brackets detected.
|
347
|
+
config.strip_whitespace_keys = [ :email ]
|
348
|
+
^
|
349
|
+
spec/internal/config/initializers/devise.rb:58:42: C: Space inside square brackets detected.
|
350
|
+
config.strip_whitespace_keys = [ :email ]
|
351
|
+
^
|
352
|
+
spec/internal/config/initializers/devise.rb:89:3: C: Inconsistent indentation detected.
|
353
|
+
config.skip_session_storage = [:http_auth]
|
354
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
355
|
+
spec/internal/config/initializers/devise.rb:106:3: C: Inconsistent indentation detected.
|
356
|
+
config.stretches = Rails.env.test? ? 1 : 10
|
357
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
358
|
+
spec/internal/config/initializers/devise.rb:109:141: C: Line is too long. [150/140]
|
359
|
+
# config.pepper = 'e56b0df2ccfc96613a3aa4857d0c63b28e04df50e2b5a6e14197301f86f84b01801341f654687ba1ffd855ac1b1f79d0e680a0cafbf985b8a86817a599fa6e77'
|
360
|
+
^^^^^^^^^^
|
361
|
+
spec/internal/config/initializers/devise.rb:131:3: C: Inconsistent indentation detected.
|
362
|
+
config.reconfirmable = true
|
363
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
364
|
+
spec/internal/config/initializers/devise.rb:149:3: C: Inconsistent indentation detected.
|
365
|
+
config.password_length = 8..128
|
366
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
367
|
+
spec/internal/config/initializers/devise.rb:198:3: C: Inconsistent indentation detected.
|
368
|
+
config.reset_password_within = 6.hours
|
369
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
370
|
+
spec/internal/config/initializers/devise.rb:236:3: C: Inconsistent indentation detected.
|
371
|
+
config.sign_out_via = :delete
|
372
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
373
|
+
spec/internal/config/initializers/orcid_initializer.rb:1:21: W: Unused block argument - config. You can omit the argument if you don't care about it.
|
374
|
+
Orcid.configure do |config|
|
375
|
+
^^^^^^
|
376
|
+
spec/internal/config/initializers/orcid_initializer.rb:8:1: C: Extra blank line detected.
|
377
|
+
spec/internal/config/initializers/secret_token.rb:12:141: C: Line is too long. [177/140]
|
378
|
+
Internal::Application.config.secret_key_base = 'b36c55ad14ec419975fe7e83398b431303efacdae50928fed47e4395d80876ef2f5498fd148f03ffe31b3e6e031050eeb7a290d020d0404e364cd0f811cc5e68'
|
379
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
380
|
+
spec/internal/config/routes.rb:2:8: C: Use the new Ruby 1.9 hash syntax.
|
381
|
+
root :to => "application#index"
|
382
|
+
^^^^^^
|
383
|
+
spec/internal/config/routes.rb:2:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
384
|
+
root :to => "application#index"
|
385
|
+
^^^^^^^^^^^^^^^^^^^
|
386
|
+
spec/internal/config/routes.rb:3:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
387
|
+
mount Orcid::Engine => "/orcid"
|
388
|
+
^^^^^^^^
|
389
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:1:1: C: Missing top-level class documentation comment.
|
390
|
+
class DeviseCreateUsers < ActiveRecord::Migration
|
391
|
+
^^^^^
|
392
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:2:3: C: Method has too many lines. [15/10]
|
393
|
+
def change
|
394
|
+
^^^
|
395
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:5:59: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
396
|
+
t.string :email, null: false, default: ""
|
397
|
+
^^
|
398
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:6:59: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
399
|
+
t.string :encrypted_password, null: false, default: ""
|
400
|
+
^^
|
401
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:9:15: C: Put one space between the method name and the first argument.
|
402
|
+
t.string :reset_password_token
|
403
|
+
^^^
|
404
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:16:16: C: Put one space between the method name and the first argument.
|
405
|
+
t.integer :sign_in_count, default: 0, null: false
|
406
|
+
^^
|
407
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:19:15: C: Put one space between the method name and the first argument.
|
408
|
+
t.string :current_sign_in_ip
|
409
|
+
^^^
|
410
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:20:15: C: Put one space between the method name and the first argument.
|
411
|
+
t.string :last_sign_in_ip
|
412
|
+
^^^
|
413
|
+
spec/internal/db/migrate/20140430033740_devise_create_users.rb:33:1: C: Extra blank line detected.
|
414
|
+
spec/internal/db/schema.rb:14:38: C: Separate every 3 digits in the integer portion of a number with underscores(_).
|
415
|
+
ActiveRecord::Schema.define(version: 20140430033747) do
|
416
|
+
^^^^^^^^^^^^^^
|
417
|
+
spec/internal/db/schema.rb:16:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
418
|
+
create_table "devise_multi_auth_authentications", force: true do |t|
|
419
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
420
|
+
spec/internal/db/schema.rb:17:14: C: Put one space between the method name and the first argument.
|
421
|
+
t.integer "user_id", null: false
|
422
|
+
^^
|
423
|
+
spec/internal/db/schema.rb:17:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
424
|
+
t.integer "user_id", null: false
|
425
|
+
^^^^^^^^^
|
426
|
+
spec/internal/db/schema.rb:18:13: C: Put one space between the method name and the first argument.
|
427
|
+
t.string "provider", null: false
|
428
|
+
^^^
|
429
|
+
spec/internal/db/schema.rb:18:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
430
|
+
t.string "provider", null: false
|
431
|
+
^^^^^^^^^^
|
432
|
+
spec/internal/db/schema.rb:19:13: C: Put one space between the method name and the first argument.
|
433
|
+
t.string "uid", null: false
|
434
|
+
^^^
|
435
|
+
spec/internal/db/schema.rb:19:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
436
|
+
t.string "uid", null: false
|
437
|
+
^^^^^
|
438
|
+
spec/internal/db/schema.rb:20:13: C: Put one space between the method name and the first argument.
|
439
|
+
t.string "access_token"
|
440
|
+
^^^
|
441
|
+
spec/internal/db/schema.rb:20:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
442
|
+
t.string "access_token"
|
443
|
+
^^^^^^^^^^^^^^
|
444
|
+
spec/internal/db/schema.rb:21:13: C: Put one space between the method name and the first argument.
|
445
|
+
t.string "refresh_token"
|
446
|
+
^^^
|
447
|
+
spec/internal/db/schema.rb:21:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
448
|
+
t.string "refresh_token"
|
449
|
+
^^^^^^^^^^^^^^^
|
450
|
+
spec/internal/db/schema.rb:22:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
451
|
+
t.datetime "expires_at"
|
452
|
+
^^^^^^^^^^^^
|
453
|
+
spec/internal/db/schema.rb:23:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
454
|
+
t.datetime "created_at"
|
455
|
+
^^^^^^^^^^^^
|
456
|
+
spec/internal/db/schema.rb:24:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
457
|
+
t.datetime "updated_at"
|
458
|
+
^^^^^^^^^^^^
|
459
|
+
spec/internal/db/schema.rb:27:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
460
|
+
add_index "devise_multi_auth_authentications", ["provider", "uid"], name: "index_devise_multi_auth_authentications_on_provider_and_uid", unique: true
|
461
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
462
|
+
spec/internal/db/schema.rb:27:50: C: Use %w or %W for array of words.
|
463
|
+
add_index "devise_multi_auth_authentications", ["provider", "uid"], name: "index_devise_multi_auth_authentications_on_provider_and_uid", unique: true
|
464
|
+
^^^^^^^^^^^^^^^^^^^
|
465
|
+
spec/internal/db/schema.rb:27:51: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
466
|
+
add_index "devise_multi_auth_authentications", ["provider", "uid"], name: "index_devise_multi_auth_authentications_on_provider_and_uid", unique: true
|
467
|
+
^^^^^^^^^^
|
468
|
+
spec/internal/db/schema.rb:27:63: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
469
|
+
add_index "devise_multi_auth_authentications", ["provider", "uid"], name: "index_devise_multi_auth_authentications_on_provider_and_uid", unique: true
|
470
|
+
^^^^^
|
471
|
+
spec/internal/db/schema.rb:27:77: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
472
|
+
add_index "devise_multi_auth_authentications", ["provider", "uid"], name: "index_devise_multi_auth_authentications_on_provider_and_uid", unique: true
|
473
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
474
|
+
spec/internal/db/schema.rb:27:141: C: Line is too long. [151/140]
|
475
|
+
add_index "devise_multi_auth_authentications", ["provider", "uid"], name: "index_devise_multi_auth_authentications_on_provider_and_uid", unique: true
|
476
|
+
^^^^^^^^^^^
|
477
|
+
spec/internal/db/schema.rb:29:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
478
|
+
create_table "orcid_profile_requests", force: true do |t|
|
479
|
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
480
|
+
spec/internal/db/schema.rb:30:14: C: Put one space between the method name and the first argument.
|
481
|
+
t.integer "user_id", null: false
|
482
|
+
^^
|
483
|
+
spec/internal/db/schema.rb:30:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
484
|
+
t.integer "user_id", null: false
|
485
|
+
^^^^^^^^^
|
486
|
+
spec/internal/db/schema.rb:31:13: C: Put one space between the method name and the first argument.
|
487
|
+
t.string "given_names", null: false
|
488
|
+
^^^
|
489
|
+
spec/internal/db/schema.rb:31:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
490
|
+
t.string "given_names", null: false
|
491
|
+
^^^^^^^^^^^^^
|
492
|
+
spec/internal/db/schema.rb:32:13: C: Put one space between the method name and the first argument.
|
493
|
+
t.string "family_name", null: false
|
494
|
+
^^^
|
495
|
+
spec/internal/db/schema.rb:32:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
496
|
+
t.string "family_name", null: false
|
497
|
+
^^^^^^^^^^^^^
|
498
|
+
spec/internal/db/schema.rb:33:13: C: Put one space between the method name and the first argument.
|
499
|
+
t.string "primary_email", null: false
|
500
|
+
^^^
|
501
|
+
spec/internal/db/schema.rb:33:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
502
|
+
t.string "primary_email", null: false
|
503
|
+
^^^^^^^^^^^^^^^
|
504
|
+
spec/internal/db/schema.rb:34:13: C: Put one space between the method name and the first argument.
|
505
|
+
t.string "orcid_profile_id"
|
506
|
+
^^^
|
507
|
+
spec/internal/db/schema.rb:34:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
508
|
+
t.string "orcid_profile_id"
|
509
|
+
^^^^^^^^^^^^^^^^^^
|
510
|
+
spec/internal/db/schema.rb:35:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
511
|
+
t.datetime "created_at"
|
512
|
+
^^^^^^^^^^^^
|
513
|
+
spec/internal/db/schema.rb:36:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
514
|
+
t.datetime "updated_at"
|
515
|
+
^^^^^^^^^^^^
|
516
|
+
spec/internal/db/schema.rb:39:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
517
|
+
create_table "users", force: true do |t|
|
518
|
+
^^^^^^^
|
519
|
+
spec/internal/db/schema.rb:40:13: C: Put one space between the method name and the first argument.
|
520
|
+
t.string "email", default: "", null: false
|
521
|
+
^^^
|
522
|
+
spec/internal/db/schema.rb:40:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
523
|
+
t.string "email", default: "", null: false
|
524
|
+
^^^^^^^
|
525
|
+
spec/internal/db/schema.rb:40:51: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
526
|
+
t.string "email", default: "", null: false
|
527
|
+
^^
|
528
|
+
spec/internal/db/schema.rb:41:13: C: Put one space between the method name and the first argument.
|
529
|
+
t.string "encrypted_password", default: "", null: false
|
530
|
+
^^^
|
531
|
+
spec/internal/db/schema.rb:41:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
532
|
+
t.string "encrypted_password", default: "", null: false
|
533
|
+
^^^^^^^^^^^^^^^^^^^^
|
534
|
+
spec/internal/db/schema.rb:41:51: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
535
|
+
t.string "encrypted_password", default: "", null: false
|
536
|
+
^^
|
537
|
+
spec/internal/db/schema.rb:42:13: C: Put one space between the method name and the first argument.
|
538
|
+
t.string "reset_password_token"
|
539
|
+
^^^
|
540
|
+
spec/internal/db/schema.rb:42:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
541
|
+
t.string "reset_password_token"
|
542
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
543
|
+
spec/internal/db/schema.rb:43:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
544
|
+
t.datetime "reset_password_sent_at"
|
545
|
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
546
|
+
spec/internal/db/schema.rb:44:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
547
|
+
t.datetime "remember_created_at"
|
548
|
+
^^^^^^^^^^^^^^^^^^^^^
|
549
|
+
spec/internal/db/schema.rb:45:14: C: Put one space between the method name and the first argument.
|
550
|
+
t.integer "sign_in_count", default: 0, null: false
|
551
|
+
^^
|
552
|
+
spec/internal/db/schema.rb:45:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
553
|
+
t.integer "sign_in_count", default: 0, null: false
|
554
|
+
^^^^^^^^^^^^^^^
|
555
|
+
spec/internal/db/schema.rb:46:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
556
|
+
t.datetime "current_sign_in_at"
|
557
|
+
^^^^^^^^^^^^^^^^^^^^
|
558
|
+
spec/internal/db/schema.rb:47:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
559
|
+
t.datetime "last_sign_in_at"
|
560
|
+
^^^^^^^^^^^^^^^^^
|
561
|
+
spec/internal/db/schema.rb:48:13: C: Put one space between the method name and the first argument.
|
562
|
+
t.string "current_sign_in_ip"
|
563
|
+
^^^
|
564
|
+
spec/internal/db/schema.rb:48:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
565
|
+
t.string "current_sign_in_ip"
|
566
|
+
^^^^^^^^^^^^^^^^^^^^
|
567
|
+
spec/internal/db/schema.rb:49:13: C: Put one space between the method name and the first argument.
|
568
|
+
t.string "last_sign_in_ip"
|
569
|
+
^^^
|
570
|
+
spec/internal/db/schema.rb:49:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
571
|
+
t.string "last_sign_in_ip"
|
572
|
+
^^^^^^^^^^^^^^^^^
|
573
|
+
spec/internal/db/schema.rb:50:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
574
|
+
t.datetime "created_at"
|
575
|
+
^^^^^^^^^^^^
|
576
|
+
spec/internal/db/schema.rb:51:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
577
|
+
t.datetime "updated_at"
|
578
|
+
^^^^^^^^^^^^
|
579
|
+
spec/internal/db/schema.rb:54:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
580
|
+
add_index "users", ["email"], name: "index_users_on_email", unique: true
|
581
|
+
^^^^^^^
|
582
|
+
spec/internal/db/schema.rb:54:23: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
583
|
+
add_index "users", ["email"], name: "index_users_on_email", unique: true
|
584
|
+
^^^^^^^
|
585
|
+
spec/internal/db/schema.rb:54:39: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
586
|
+
add_index "users", ["email"], name: "index_users_on_email", unique: true
|
587
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
588
|
+
spec/internal/db/schema.rb:55:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
589
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
590
|
+
^^^^^^^
|
591
|
+
spec/internal/db/schema.rb:55:23: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
592
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
593
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
594
|
+
spec/internal/db/schema.rb:55:54: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
595
|
+
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
596
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
597
|
+
spec/internal/lib/generators/test_app_generator.rb:3:1: C: Missing top-level class documentation comment.
|
598
|
+
class TestAppGenerator < Rails::Generators::Base
|
599
|
+
^^^^^
|
600
|
+
spec/internal/lib/generators/test_app_generator.rb:4:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
601
|
+
source_root "spec/test_app_templates"
|
602
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^
|
603
|
+
spec/internal/lib/generators/test_app_generator.rb:7:45: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
604
|
+
application_yml_file = File.expand_path("../../../../../config/application.yml", __FILE__)
|
605
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
606
|
+
spec/internal/lib/generators/test_app_generator.rb:8:53: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
607
|
+
application_yml_example_file = File.expand_path("../../../../../config/application.yml.example", __FILE__)
|
608
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
609
|
+
spec/internal/lib/generators/test_app_generator.rb:10:75: C: Space missing after colon.
|
610
|
+
create_link 'config/application.yml', application_yml_file, symbolic:true
|
611
|
+
^
|
612
|
+
spec/internal/lib/generators/test_app_generator.rb:12:83: C: Space missing after colon.
|
613
|
+
create_link 'config/application.yml', application_yml_example_file, symbolic:true
|
614
|
+
^
|
615
|
+
spec/internal/lib/generators/test_app_generator.rb:24:1: C: Extra empty line detected at body end.
|
616
|
+
spec/internal/test/test_helper.rb:1:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
617
|
+
ENV["RAILS_ENV"] ||= "test"
|
618
|
+
^^^^^^^^^^^
|
619
|
+
spec/internal/test/test_helper.rb:1:22: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
620
|
+
ENV["RAILS_ENV"] ||= "test"
|
621
|
+
^^^^^^
|
622
|
+
spec/internal/test/test_helper.rb:5:1: C: Missing top-level class documentation comment.
|
623
|
+
class ActiveSupport::TestCase
|
624
|
+
^^^^^
|
625
|
+
spec/internal/test/test_helper.rb:5:7: C: Use nested module/class definitions instead of compact style.
|
626
|
+
class ActiveSupport::TestCase
|
627
|
+
^^^^^^^^^^^^^^^^^^^^^^^
|
628
|
+
spec/lib/orcid/configuration/provider_spec.rb:4:1: C: Missing top-level module documentation comment.
|
629
|
+
module Orcid
|
630
|
+
^^^^^^
|
631
|
+
spec/lib/orcid/configuration/provider_spec.rb:7:19: C: Avoid using {...} for multi-line blocks.
|
632
|
+
let(:storage) {
|
633
|
+
^
|
634
|
+
spec/lib/orcid/configuration/provider_spec.rb:15:44: C: Avoid comma after the last item of a hash.
|
635
|
+
'ORCID_APP_SECRET' => '_APP_SECRET',
|
636
|
+
^
|
637
|
+
spec/lib/orcid/configuration_spec.rb:3:1: C: Missing top-level module documentation comment.
|
638
|
+
module Orcid
|
639
|
+
^^^^^^
|
640
|
+
spec/lib/orcid/configuration_spec.rb:16:20: C: Avoid using {...} for multi-line blocks.
|
641
|
+
let(:legend) {
|
642
|
+
^
|
643
|
+
spec/lib/orcid/configuration_spec.rb:19:12: C: Use the new lambda literal syntax ->(params) {...}.
|
644
|
+
[lambda{|*| 'spaghetti'}, :work_type]
|
645
|
+
^^^^^^
|
646
|
+
spec/lib/orcid/configuration_spec.rb:19:18: C: Space missing to the left of {.
|
647
|
+
[lambda{|*| 'spaghetti'}, :work_type]
|
648
|
+
^
|
649
|
+
spec/lib/orcid/configuration_spec.rb:19:18: C: Space between { and | missing.
|
650
|
+
[lambda{|*| 'spaghetti'}, :work_type]
|
651
|
+
^^
|
652
|
+
spec/lib/orcid/configuration_spec.rb:19:34: C: Space missing inside }.
|
653
|
+
[lambda{|*| 'spaghetti'}, :work_type]
|
654
|
+
^
|
655
|
+
spec/lib/orcid/configuration_spec.rb:23:58: C: Space missing inside }.
|
656
|
+
let(:article) { NonOrcid::Article.new(title: title)}
|
657
|
+
^
|
658
|
+
spec/lib/orcid/named_callbacks_spec.rb:4:1: C: Missing top-level module documentation comment.
|
659
|
+
module Orcid
|
660
|
+
^^^^^^
|
661
|
+
spec/lib/orcid/named_callbacks_spec.rb:7:24: C: Space inside square brackets detected.
|
662
|
+
Given(:context) { [ ] }
|
663
|
+
^
|
664
|
+
spec/lib/orcid/named_callbacks_spec.rb:10:14: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
665
|
+
describe "with a named callback" do
|
666
|
+
^^^^^^^^^^^^^^^^^^^^^^^
|
667
|
+
spec/lib/orcid/named_callbacks_spec.rb:12:52: C: Space missing after comma.
|
668
|
+
When { named_callback.call(callback_name, 'a',:hello) }
|
669
|
+
^
|
670
|
+
spec/lib/orcid/named_callbacks_spec.rb:16:14: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
671
|
+
describe "with a named callback called by a string" do
|
672
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
673
|
+
spec/lib/orcid/named_callbacks_spec.rb:18:52: C: Space missing after comma.
|
674
|
+
When { named_callback.call(callback_name, 'a',:hello) }
|
675
|
+
^
|
676
|
+
spec/lib/orcid/named_callbacks_spec.rb:22:14: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
677
|
+
describe "with a undeclared callback" do
|
678
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
679
|
+
spec/lib/orcid_spec.rb:27:13: C: Space missing to the left of {.
|
680
|
+
expect{|b| Orcid.configure(&b) }.to yield_with_args(Orcid::Configuration)
|
681
|
+
^
|
682
|
+
spec/lib/orcid_spec.rb:27:13: C: Space between { and | missing.
|
683
|
+
expect{|b| Orcid.configure(&b) }.to yield_with_args(Orcid::Configuration)
|
684
|
+
^^
|
685
|
+
spec/lib/orcid_spec.rb:37:48: C: Space missing after comma.
|
686
|
+
Orcid.connect_user_and_orcid_profile(user,orcid_profile_id)
|
687
|
+
^
|
688
|
+
spec/lib/orcid_spec.rb:56:14: C: Avoid using {...} for multi-line blocks.
|
689
|
+
expect {
|
690
|
+
^
|
691
|
+
spec/lib/orcid_spec.rb:63:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
692
|
+
let(:client) { double("Client")}
|
693
|
+
^^^^^^^^
|
694
|
+
spec/lib/orcid_spec.rb:63:36: C: Space missing inside }.
|
695
|
+
let(:client) { double("Client")}
|
696
|
+
^
|
697
|
+
spec/lib/orcid_spec.rb:65:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
698
|
+
let(:tokenizer) { double("Tokenizer") }
|
699
|
+
^^^^^^^^^^^
|
700
|
+
spec/lib/orcid_spec.rb:88:1: C: Do not use block comments.
|
701
|
+
=begin
|
702
|
+
^^^^^^
|
703
|
+
spec/models/orcid/profile_connection_spec.rb:3:1: C: Missing top-level module documentation comment.
|
704
|
+
module Orcid
|
705
|
+
^^^^^^
|
706
|
+
spec/models/orcid/profile_connection_spec.rb:5:35: C: Space missing inside }.
|
707
|
+
let(:email) { 'test@hello.com'}
|
708
|
+
^
|
709
|
+
spec/models/orcid/profile_connection_spec.rb:7:42: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
710
|
+
let(:profile_query_service) { double("Profile Lookup Service") }
|
711
|
+
^^^^^^^^^^^^^^^^^^^^^^^^
|
712
|
+
spec/models/orcid/profile_connection_spec.rb:9:13: C: Avoid using {...} for multi-line blocks.
|
713
|
+
subject {
|
714
|
+
^
|
715
|
+
spec/models/orcid/profile_connection_spec.rb:10:66: C: Avoid using {...} for multi-line blocks.
|
716
|
+
Orcid::ProfileConnection.new(email: email, user: user).tap { |pc|
|
717
|
+
^
|
718
|
+
spec/models/orcid/profile_connection_spec.rb:27:71: C: Space missing inside }.
|
719
|
+
subject { Orcid::ProfileConnection.new(email: email, user: user)}
|
720
|
+
^
|
721
|
+
spec/models/orcid/profile_connection_spec.rb:37:73: C: Space missing inside }.
|
722
|
+
subject { Orcid::ProfileConnection.new(email: email, user: user)}
|
723
|
+
^
|
724
|
+
spec/models/orcid/profile_connection_spec.rb:44:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
725
|
+
let(:persister) { double("Persister") }
|
726
|
+
^^^^^^^^^^^
|
727
|
+
spec/models/orcid/profile_connection_spec.rb:55:16: C: Avoid using {...} for multi-line blocks.
|
728
|
+
expect {
|
729
|
+
^
|
730
|
+
spec/models/orcid/profile_connection_spec.rb:67:18: C: Space between { and | missing.
|
731
|
+
expect {|b| subject.with_orcid_profile_candidates(&b) }.to yield_with_args(:query_response)
|
732
|
+
^^
|
733
|
+
spec/models/orcid/profile_connection_spec.rb:75:18: C: Space between { and | missing.
|
734
|
+
expect {|b| subject.with_orcid_profile_candidates(&b) }.to_not yield_control
|
735
|
+
^^
|
736
|
+
spec/models/orcid/profile_request_spec.rb:3:1: C: Missing top-level module documentation comment.
|
737
|
+
module Orcid
|
738
|
+
^^^^^^
|
739
|
+
spec/models/orcid/profile_request_spec.rb:5:51: C: Space missing inside }.
|
740
|
+
let(:orcid_profile_id) { '0000-0001-8025-637X'}
|
741
|
+
^
|
742
|
+
spec/models/orcid/profile_request_spec.rb:7:22: C: Avoid using {...} for multi-line blocks.
|
743
|
+
let(:attributes) {
|
744
|
+
^
|
745
|
+
spec/models/orcid/profile_request_spec.rb:42:16: C: Avoid using {...} for multi-line blocks.
|
746
|
+
expect {
|
747
|
+
^
|
748
|
+
spec/models/orcid/profile_request_spec.rb:66:18: C: Avoid using {...} for multi-line blocks.
|
749
|
+
expect {
|
750
|
+
^
|
751
|
+
spec/models/orcid/profile_request_spec.rb:81:18: C: Avoid using {...} for multi-line blocks.
|
752
|
+
expect {
|
753
|
+
^
|
754
|
+
spec/models/orcid/profile_request_spec.rb:97:56: C: Place the . on the next line, together with the method name.
|
755
|
+
validator.should_receive(:call).with(subject).
|
756
|
+
^
|
757
|
+
spec/models/orcid/profile_request_spec.rb:99:77: C: Place the . on the next line, together with the method name.
|
758
|
+
payload_xml_builder.should_receive(:call).with(subject.attributes).
|
759
|
+
^
|
760
|
+
spec/models/orcid/profile_request_spec.rb:101:75: C: Place the . on the next line, together with the method name.
|
761
|
+
profile_creation_service.should_receive(:call).with(xml_payload).
|
762
|
+
^
|
763
|
+
spec/models/orcid/profile_request_spec.rb:116:56: C: Place the . on the next line, together with the method name.
|
764
|
+
validator.should_receive(:call).with(subject).
|
765
|
+
^
|
766
|
+
spec/models/orcid/profile_spec.rb:3:1: C: Missing top-level module documentation comment.
|
767
|
+
module Orcid
|
768
|
+
^^^^^^
|
769
|
+
spec/models/orcid/profile_spec.rb:7:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
770
|
+
let(:mapper) { double("Mapper") }
|
771
|
+
^^^^^^^^
|
772
|
+
spec/models/orcid/profile_spec.rb:8:35: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
773
|
+
let(:non_orcid_work) { double("A non-ORCID Work") }
|
774
|
+
^^^^^^^^^^^^^^^^^^
|
775
|
+
spec/models/orcid/profile_spec.rb:9:31: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
776
|
+
let(:orcid_work) { double("Orcid::Work") }
|
777
|
+
^^^^^^^^^^^^^
|
778
|
+
spec/models/orcid/profile_spec.rb:10:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
779
|
+
let(:xml_renderer) { double("Renderer") }
|
780
|
+
^^^^^^^^^^
|
781
|
+
spec/models/orcid/profile_spec.rb:11:31: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
782
|
+
let(:xml_parser) { double("Parser") }
|
783
|
+
^^^^^^^^
|
784
|
+
spec/models/orcid/profile_spec.rb:12:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
785
|
+
let(:xml) { double("XML Payload")}
|
786
|
+
^^^^^^^^^^^^^
|
787
|
+
spec/models/orcid/profile_spec.rb:12:38: C: Space missing inside }.
|
788
|
+
let(:xml) { double("XML Payload")}
|
789
|
+
^
|
790
|
+
spec/models/orcid/profile_spec.rb:14:13: C: Avoid using {...} for multi-line blocks.
|
791
|
+
subject {
|
792
|
+
^
|
793
|
+
spec/models/orcid/profile_spec.rb:29:36: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
794
|
+
let(:parsed_object) { double("Parsed Object")}
|
795
|
+
^^^^^^^^^^^^^^^
|
796
|
+
spec/models/orcid/profile_spec.rb:29:52: C: Space missing inside }.
|
797
|
+
let(:parsed_object) { double("Parsed Object")}
|
798
|
+
^
|
799
|
+
spec/models/orcid/profile_spec.rb:30:36: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
800
|
+
let(:response_body) { double("XML Response") }
|
801
|
+
^^^^^^^^^^^^^^
|
802
|
+
spec/models/orcid/profile_spec.rb:39:1: C: Extra blank line detected.
|
803
|
+
spec/models/orcid/profile_spec.rb:70:60: C: Do not use parentheses for method calls with no arguments.
|
804
|
+
Orcid.stub(:access_token_for).and_return(Object.new())
|
805
|
+
^
|
806
|
+
spec/models/orcid/work/xml_parser_spec.rb:3:1: C: Missing top-level module documentation comment.
|
807
|
+
module Orcid
|
808
|
+
^^^^^^
|
809
|
+
spec/models/orcid/work/xml_parser_spec.rb:16:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
810
|
+
its(:title) { should eq "Another Test Drive" }
|
811
|
+
^^^^^^^^^^^^^^^^^^^^
|
812
|
+
spec/models/orcid/work/xml_parser_spec.rb:17:36: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
813
|
+
its(:put_code) { should eq "303475" }
|
814
|
+
^^^^^^^^
|
815
|
+
spec/models/orcid/work/xml_parser_spec.rb:18:37: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
816
|
+
its(:work_type) { should eq "test" }
|
817
|
+
^^^^^^
|
818
|
+
spec/models/orcid/work/xml_parser_spec.rb:33:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
819
|
+
its(:title) { should eq "Test Driven Orcid Integration" }
|
820
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
821
|
+
spec/models/orcid/work/xml_parser_spec.rb:34:36: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
822
|
+
its(:put_code) { should eq "303474" }
|
823
|
+
^^^^^^^^
|
824
|
+
spec/models/orcid/work/xml_parser_spec.rb:35:37: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
825
|
+
its(:work_type) { should eq "test" }
|
826
|
+
^^^^^^
|
827
|
+
spec/models/orcid/work/xml_parser_spec.rb:39:1: C: Extra empty line detected at body end.
|
828
|
+
spec/models/orcid/work/xml_renderer_spec.rb:3:1: C: Missing top-level module documentation comment.
|
829
|
+
module Orcid
|
830
|
+
^^^^^^
|
831
|
+
spec/models/orcid/work_spec.rb:3:1: C: Missing top-level module documentation comment.
|
832
|
+
module Orcid
|
833
|
+
^^^^^^
|
834
|
+
spec/models/orcid/work_spec.rb:5:22: C: Avoid using {...} for multi-line blocks.
|
835
|
+
let(:attributes) {
|
836
|
+
^
|
837
|
+
spec/models/orcid/work_spec.rb:10:32: C: Space inside square brackets detected.
|
838
|
+
external_identifiers: [ {type: 'doi', identifier: 'abc-123' }]
|
839
|
+
^
|
840
|
+
spec/models/orcid/work_spec.rb:10:33: C: Space inside { missing.
|
841
|
+
external_identifiers: [ {type: 'doi', identifier: 'abc-123' }]
|
842
|
+
^
|
843
|
+
spec/models/orcid/work_spec.rb:25:46: C: Space missing inside }.
|
844
|
+
its(:id) { should eq subject.put_code}
|
845
|
+
^
|
846
|
+
spec/models/orcid/work_spec.rb:29:64: C: Space missing inside }.
|
847
|
+
its(:id) { should eq [subject.title, subject.work_type]}
|
848
|
+
^
|
849
|
+
spec/models/orcid/work_spec.rb:52:1: C: Extra empty line detected at body end.
|
850
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:4:1: C: Missing top-level module documentation comment.
|
851
|
+
module Orcid::Remote
|
852
|
+
^^^^^^
|
853
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:4:8: C: Use nested module/class definitions instead of compact style.
|
854
|
+
module Orcid::Remote
|
855
|
+
^^^^^^^^^^^^^
|
856
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:7:22: C: Space inside { missing.
|
857
|
+
Given(:config) { {token: token, headers: request_headers, path: 'path/to/somewhere' } }
|
858
|
+
^
|
859
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:8:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
860
|
+
Given(:token) { double("Token", post: response) }
|
861
|
+
^^^^^^^
|
862
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:10:29: C: Avoid using {...} for multi-line blocks.
|
863
|
+
Given(:request_headers) {
|
864
|
+
^
|
865
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:16:22: C: Avoid using {...} for multi-line blocks.
|
866
|
+
Given(:response) {
|
867
|
+
^
|
868
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:17:14: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
869
|
+
double("Response", headers: { location: File.join("/", minted_orcid, "orcid-profile") })
|
870
|
+
^^^^^^^^^^
|
871
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:17:57: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
872
|
+
double("Response", headers: { location: File.join("/", minted_orcid, "orcid-profile") })
|
873
|
+
^^^
|
874
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:17:76: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
875
|
+
double("Response", headers: { location: File.join("/", minted_orcid, "orcid-profile") })
|
876
|
+
^^^^^^^^^^^^^^^
|
877
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:23:24: C: Avoid using {...} for multi-line blocks.
|
878
|
+
Given(:response) {
|
879
|
+
^
|
880
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:24:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
881
|
+
double("Response", headers: { location: File.join("/", minted_orcid, "orcid-profile") })
|
882
|
+
^^^^^^^^^^
|
883
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:24:59: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
884
|
+
double("Response", headers: { location: File.join("/", minted_orcid, "orcid-profile") })
|
885
|
+
^^^
|
886
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:24:78: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
887
|
+
double("Response", headers: { location: File.join("/", minted_orcid, "orcid-profile") })
|
888
|
+
^^^^^^^^^^^^^^^
|
889
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:26:52: C: Space missing inside }.
|
890
|
+
Then { returned_value.should eq(minted_orcid)}
|
891
|
+
^
|
892
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:28:113: C: Space missing inside }.
|
893
|
+
And { token.should have_received(:post).with(config.fetch(:path), body: payload, headers: request_headers)}
|
894
|
+
^
|
895
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:32:24: C: Avoid using {...} for multi-line blocks.
|
896
|
+
Given(:response) {
|
897
|
+
^
|
898
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:33:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
899
|
+
double("Response", headers: { location: "" })
|
900
|
+
^^^^^^^^^^
|
901
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:33:49: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
902
|
+
double("Response", headers: { location: "" })
|
903
|
+
^^
|
904
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:35:45: C: Space missing inside }.
|
905
|
+
Then { returned_value.should eq(false)}
|
906
|
+
^
|
907
|
+
spec/services/orcid/remote/profile_creation_service_spec.rb:37:113: C: Space missing inside }.
|
908
|
+
And { token.should have_received(:post).with(config.fetch(:path), body: payload, headers: request_headers)}
|
909
|
+
^
|
910
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:4:1: C: Missing top-level module documentation comment.
|
911
|
+
module Orcid::Remote
|
912
|
+
^^^^^^
|
913
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:4:8: C: Use nested module/class definitions instead of compact style.
|
914
|
+
module Orcid::Remote
|
915
|
+
^^^^^^^^^^^^^
|
916
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:5:1: C: Extra empty line detected at body beginning.
|
917
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:9:21: C: Avoid using {...} for multi-line blocks.
|
918
|
+
Given(:input) {
|
919
|
+
^
|
920
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:10:17: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
921
|
+
{ text: "Hello", email: 'jeremy.n.friesen@gmail.com' }
|
922
|
+
^^^^^^^
|
923
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:16:21: C: Avoid using {...} for multi-line blocks.
|
924
|
+
Given(:input) {
|
925
|
+
^
|
926
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:17:17: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
927
|
+
{ text: "" , email: nil}
|
928
|
+
^^
|
929
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:17:32: C: Space inside } missing.
|
930
|
+
{ text: "" , email: nil}
|
931
|
+
^
|
932
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:19:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
933
|
+
Then { expect(response).to eq(q: "") }
|
934
|
+
^^
|
935
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:23:21: C: Avoid using {...} for multi-line blocks.
|
936
|
+
Given(:input) {
|
937
|
+
^
|
938
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:30:21: C: Avoid using {...} for multi-line blocks.
|
939
|
+
Given(:input) {
|
940
|
+
^
|
941
|
+
spec/services/orcid/remote/profile_query_service/query_parameter_builder_spec.rb:37:21: C: Avoid using {...} for multi-line blocks.
|
942
|
+
Given(:input) {
|
943
|
+
^
|
944
|
+
spec/services/orcid/remote/profile_query_service/search_response_spec.rb:4:1: C: Missing top-level module documentation comment.
|
945
|
+
module Orcid::Remote
|
946
|
+
^^^^^^
|
947
|
+
spec/services/orcid/remote/profile_query_service/search_response_spec.rb:4:8: C: Use nested module/class definitions instead of compact style.
|
948
|
+
module Orcid::Remote
|
949
|
+
^^^^^^^^^^^^^
|
950
|
+
spec/services/orcid/remote/profile_query_service/search_response_spec.rb:6:26: C: Space inside { missing.
|
951
|
+
Given(:attributes) { {id: 'Hello', label: 'World', junk: 'JUNK!', biography: "Extended Biography"} }
|
952
|
+
^
|
953
|
+
spec/services/orcid/remote/profile_query_service/search_response_spec.rb:6:82: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
954
|
+
Given(:attributes) { {id: 'Hello', label: 'World', junk: 'JUNK!', biography: "Extended Biography"} }
|
955
|
+
^^^^^^^^^^^^^^^^^^^^
|
956
|
+
spec/services/orcid/remote/profile_query_service/search_response_spec.rb:6:102: C: Space inside } missing.
|
957
|
+
Given(:attributes) { {id: 'Hello', label: 'World', junk: 'JUNK!', biography: "Extended Biography"} }
|
958
|
+
^
|
959
|
+
spec/services/orcid/remote/profile_query_service/search_response_spec.rb:12:17: C: Space missing to the left of {.
|
960
|
+
And { expect{search_response.junk }.to raise_error }
|
961
|
+
^
|
962
|
+
spec/services/orcid/remote/profile_query_service/search_response_spec.rb:12:18: C: Space missing inside {.
|
963
|
+
And { expect{search_response.junk }.to raise_error }
|
964
|
+
^
|
965
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:5:1: C: Missing top-level module documentation comment.
|
966
|
+
module Orcid::Remote
|
967
|
+
^^^^^^
|
968
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:5:8: C: Use nested module/class definitions instead of compact style.
|
969
|
+
module Orcid::Remote
|
970
|
+
^^^^^^^^^^^^^
|
971
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:10:20: C: Avoid using {...} for multi-line blocks.
|
972
|
+
Given(:config) {
|
973
|
+
^
|
974
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:19:62: C: Space missing inside }.
|
975
|
+
Given(:query_parameter_builder) { double('Query Builder')}
|
976
|
+
^
|
977
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:20:31: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
978
|
+
Given(:response) { double("Response", body: response_body)} # See below
|
979
|
+
^^^^^^^^^^
|
980
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:20:63: C: Space missing inside }.
|
981
|
+
Given(:response) { double("Response", body: response_body)} # See below
|
982
|
+
^
|
983
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:21:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
984
|
+
Given(:token) { double("Token") }
|
985
|
+
^^^^^^^
|
986
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:22:27: C: Avoid using {...} for multi-line blocks.
|
987
|
+
Given(:json_response) {
|
988
|
+
^
|
989
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:24:24: C: Redundant curly braces around a hash parameter.
|
990
|
+
OpenStruct.new({ 'id' => orcid_profile_id, 'label' => "Corwin Amber (#{email}) [ORCID: #{orcid_profile_id}]", 'biography' => biography })
|
991
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
992
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:24:141: C: Line is too long. [145/140]
|
993
|
+
OpenStruct.new({ 'id' => orcid_profile_id, 'label' => "Corwin Amber (#{email}) [ORCID: #{orcid_profile_id}]", 'biography' => biography })
|
994
|
+
^^^^^
|
995
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:27:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
996
|
+
Given(:parameters) { double("Parameters") }
|
997
|
+
^^^^^^^^^^^^
|
998
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:28:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
999
|
+
Given(:normalized_parameters) { double("Normalized Parameters") }
|
1000
|
+
^^^^^^^^^^^^^^^^^^^^^^^
|
1001
|
+
spec/services/orcid/remote/profile_query_service_spec.rb:42:27: C: Avoid using {...} for multi-line blocks.
|
1002
|
+
Given(:response_body) {
|
1003
|
+
^
|
1004
|
+
spec/services/orcid/remote/service_spec.rb:4:1: C: Missing top-level module documentation comment.
|
1005
|
+
module Orcid::Remote
|
1006
|
+
^^^^^^
|
1007
|
+
spec/services/orcid/remote/service_spec.rb:4:8: C: Use nested module/class definitions instead of compact style.
|
1008
|
+
module Orcid::Remote
|
1009
|
+
^^^^^^^^^^^^^
|
1010
|
+
spec/services/orcid/remote/service_spec.rb:7:20: C: Avoid using {...} for multi-line blocks.
|
1011
|
+
Given(:runner) {
|
1012
|
+
^
|
1013
|
+
spec/services/orcid/remote/service_spec.rb:8:27: C: Avoid using {...} for multi-line blocks.
|
1014
|
+
described_class.new { |on|
|
1015
|
+
^
|
1016
|
+
spec/services/orcid/remote/service_spec.rb:9:18: C: Space between { and | missing.
|
1017
|
+
on.found {|a,b| context.invoked("FOUND", a,b) }
|
1018
|
+
^^
|
1019
|
+
spec/services/orcid/remote/service_spec.rb:9:21: C: Space missing after comma.
|
1020
|
+
on.found {|a,b| context.invoked("FOUND", a,b) }
|
1021
|
+
^
|
1022
|
+
spec/services/orcid/remote/service_spec.rb:9:41: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1023
|
+
on.found {|a,b| context.invoked("FOUND", a,b) }
|
1024
|
+
^^^^^^^
|
1025
|
+
spec/services/orcid/remote/service_spec.rb:9:51: C: Space missing after comma.
|
1026
|
+
on.found {|a,b| context.invoked("FOUND", a,b) }
|
1027
|
+
^
|
1028
|
+
spec/services/orcid/remote/service_spec.rb:13:14: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1029
|
+
describe "calling defined callback" do
|
1030
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
1031
|
+
spec/services/orcid/remote/service_spec.rb:15:58: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1032
|
+
Then { context.should have_received(:invoked).with("FOUND", :first, :second) }
|
1033
|
+
^^^^^^^
|
1034
|
+
spec/services/orcid/remote/service_spec.rb:19:14: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1035
|
+
describe "calling undefined callback" do
|
1036
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
1037
|
+
spec/services/orcid/remote/work_service_spec.rb:5:1: C: Missing top-level module documentation comment.
|
1038
|
+
module Orcid::Remote
|
1039
|
+
^^^^^^
|
1040
|
+
spec/services/orcid/remote/work_service_spec.rb:5:8: C: Use nested module/class definitions instead of compact style.
|
1041
|
+
module Orcid::Remote
|
1042
|
+
^^^^^^^^^^^^^
|
1043
|
+
spec/services/orcid/remote/work_service_spec.rb:8:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1044
|
+
let(:token) { double("Token") }
|
1045
|
+
^^^^^^^
|
1046
|
+
spec/services/orcid/remote/work_service_spec.rb:11:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1047
|
+
let(:response) { double("Response", body: 'Body') }
|
1048
|
+
^^^^^^^^^^
|
1049
|
+
spec/services/orcid/remote/work_service_spec.rb:14:107: C: Space missing inside }.
|
1050
|
+
let(:token) { double('Token', client: client, token: 'access_token', refresh_token: 'refresh_token')}
|
1051
|
+
^
|
1052
|
+
spec/services/orcid/remote/work_service_spec.rb:15:75: C: Space missing inside }.
|
1053
|
+
let(:client) { double('Client', id: '123', site: 'URL', options: {})}
|
1054
|
+
^
|
1055
|
+
spec/services/orcid/remote/work_service_spec.rb:17:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1056
|
+
response = double("Response", status: '100', body: 'body')
|
1057
|
+
^^^^^^^^^^
|
1058
|
+
spec/services/orcid/remote/work_service_spec.rb:22:16: C: Avoid using {...} for multi-line blocks.
|
1059
|
+
expect {
|
1060
|
+
^
|
1061
|
+
spec/services/orcid/remote/work_service_spec.rb:27:39: C: Place the . on the next line, together with the method name.
|
1062
|
+
token.should_receive(:request).
|
1063
|
+
^
|
1064
|
+
spec/services/orcid/remote/work_service_spec.rb:28:104: C: Place the . on the next line, together with the method name.
|
1065
|
+
with(:post, "v1.1/#{orcid_profile_id}/orcid-works/", body: payload, headers: request_headers).
|
1066
|
+
^
|
1067
|
+
spec/spec_helper.rb:5:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1068
|
+
ENV["RAILS_ENV"] ||= 'test'
|
1069
|
+
^^^^^^^^^^^
|
1070
|
+
spec/spec_helper.rb:9:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1071
|
+
SimpleCov.command_name "spec"
|
1072
|
+
^^^^^^
|
1073
|
+
spec/spec_helper.rb:12:1: C: Extra blank line detected.
|
1074
|
+
spec/spec_helper.rb:16:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1075
|
+
require File.expand_path("../internal/config/environment.rb", __FILE__)
|
1076
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
1077
|
+
spec/spec_helper.rb:33:22: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1078
|
+
Dir[File.expand_path("../support/**/*.rb",__FILE__)].each {|f| require f}
|
1079
|
+
^^^^^^^^^^^^^^^^^^^^
|
1080
|
+
spec/spec_helper.rb:33:42: C: Space missing after comma.
|
1081
|
+
Dir[File.expand_path("../support/**/*.rb",__FILE__)].each {|f| require f}
|
1082
|
+
^
|
1083
|
+
spec/spec_helper.rb:33:59: C: Space between { and | missing.
|
1084
|
+
Dir[File.expand_path("../support/**/*.rb",__FILE__)].each {|f| require f}
|
1085
|
+
^^
|
1086
|
+
spec/spec_helper.rb:33:73: C: Space missing inside }.
|
1087
|
+
Dir[File.expand_path("../support/**/*.rb",__FILE__)].each {|f| require f}
|
1088
|
+
^
|
1089
|
+
spec/spec_helper.rb:34:22: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1090
|
+
Dir[File.expand_path("../factories/**/*.rb",__FILE__)].each {|f| require f}
|
1091
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
1092
|
+
spec/spec_helper.rb:34:44: C: Space missing after comma.
|
1093
|
+
Dir[File.expand_path("../factories/**/*.rb",__FILE__)].each {|f| require f}
|
1094
|
+
^
|
1095
|
+
spec/spec_helper.rb:34:61: C: Space between { and | missing.
|
1096
|
+
Dir[File.expand_path("../factories/**/*.rb",__FILE__)].each {|f| require f}
|
1097
|
+
^^
|
1098
|
+
spec/spec_helper.rb:34:75: C: Space missing inside }.
|
1099
|
+
Dir[File.expand_path("../factories/**/*.rb",__FILE__)].each {|f| require f}
|
1100
|
+
^
|
1101
|
+
spec/spec_helper.rb:40:49: C: Place the . on the next line, together with the method name.
|
1102
|
+
request.env['warden'].stub(:authenticate!).
|
1103
|
+
^
|
1104
|
+
spec/spec_helper.rb:41:28: C: Redundant curly braces around a hash parameter.
|
1105
|
+
and_throw(:warden, {:scope => :user})
|
1106
|
+
^^^^^^^^^^^^^^^^^
|
1107
|
+
spec/spec_helper.rb:41:28: C: Space inside { missing.
|
1108
|
+
and_throw(:warden, {:scope => :user})
|
1109
|
+
^
|
1110
|
+
spec/spec_helper.rb:41:29: C: Use the new Ruby 1.9 hash syntax.
|
1111
|
+
and_throw(:warden, {:scope => :user})
|
1112
|
+
^^^^^^^^^
|
1113
|
+
spec/spec_helper.rb:41:44: C: Space inside } missing.
|
1114
|
+
and_throw(:warden, {:scope => :user})
|
1115
|
+
^
|
1116
|
+
spec/spec_helper.rb:42:23: C: Use the new Ruby 1.9 hash syntax.
|
1117
|
+
controller.stub :current_user => nil
|
1118
|
+
^^^^^^^^^^^^^^^^
|
1119
|
+
spec/spec_helper.rb:45:23: C: Use the new Ruby 1.9 hash syntax.
|
1120
|
+
controller.stub :current_user => user
|
1121
|
+
^^^^^^^^^^^^^^^^
|
1122
|
+
spec/spec_helper.rb:56:1: C: Extra empty line detected at body end.
|
1123
|
+
spec/spec_helper.rb:59:1: C: Missing top-level module documentation comment.
|
1124
|
+
module FixtureFiles
|
1125
|
+
^^^^^^
|
1126
|
+
spec/spec_helper.rb:61:45: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1127
|
+
Pathname.new(File.expand_path(File.join("../fixtures", path), __FILE__))
|
1128
|
+
^^^^^^^^^^^^^
|
1129
|
+
spec/spec_helper.rb:87:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1130
|
+
config.order = "random"
|
1131
|
+
^^^^^^^^
|
1132
|
+
spec/support/non_orcid_models.rb:2:3: C: Missing top-level class documentation comment.
|
1133
|
+
class Article
|
1134
|
+
^^^^^
|
1135
|
+
spec/support/non_orcid_models.rb:11:4: C: Final newline missing.
|
1136
|
+
end
|
1137
|
+
|
1138
|
+
spec/support/stub_callback.rb:1:1: C: Missing top-level class documentation comment.
|
1139
|
+
class StubCallback
|
1140
|
+
^^^^^
|
1141
|
+
spec/support/stub_callback.rb:6:16: W: Unused method argument - args. If it's necessary, use _ or _args as an argument name to indicate that it won't be used. You can also write as invoked(*) if you want the method to accept any arguments but don't care about them.
|
1142
|
+
def invoked(*args)
|
1143
|
+
^^^^
|
1144
|
+
spec/test_app_templates/lib/generators/test_app_generator.rb:3:1: C: Missing top-level class documentation comment.
|
1145
|
+
class TestAppGenerator < Rails::Generators::Base
|
1146
|
+
^^^^^
|
1147
|
+
spec/test_app_templates/lib/generators/test_app_generator.rb:4:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1148
|
+
source_root "spec/test_app_templates"
|
1149
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^
|
1150
|
+
spec/test_app_templates/lib/generators/test_app_generator.rb:7:45: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1151
|
+
application_yml_file = File.expand_path("../../../../../config/application.yml", __FILE__)
|
1152
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
1153
|
+
spec/test_app_templates/lib/generators/test_app_generator.rb:8:53: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
1154
|
+
application_yml_example_file = File.expand_path("../../../../../config/application.yml.example", __FILE__)
|
1155
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
1156
|
+
spec/test_app_templates/lib/generators/test_app_generator.rb:10:75: C: Space missing after colon.
|
1157
|
+
create_link 'config/application.yml', application_yml_file, symbolic:true
|
1158
|
+
^
|
1159
|
+
spec/test_app_templates/lib/generators/test_app_generator.rb:12:83: C: Space missing after colon.
|
1160
|
+
create_link 'config/application.yml', application_yml_example_file, symbolic:true
|
1161
|
+
^
|
1162
|
+
spec/test_app_templates/lib/generators/test_app_generator.rb:24:1: C: Extra empty line detected at body end.
|
1163
|
+
|
1164
|
+
93 files inspected, 399 offenses detected
|