lhc 13.2.0 → 13.4.0.pre.pro1766.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rubocop.yml +3 -15
- data/.github/workflows/test.yml +3 -15
- data/.rubocop.yml +341 -19
- data/README.md +45 -0
- data/lhc.gemspec +3 -1
- data/lib/lhc/concerns/lhc/fix_invalid_encoding_concern.rb +1 -0
- data/lib/lhc/config.rb +16 -0
- data/lib/lhc/endpoint.rb +3 -0
- data/lib/lhc/error.rb +4 -2
- data/lib/lhc/interceptors/auth.rb +10 -1
- data/lib/lhc/interceptors/caching.rb +5 -0
- data/lib/lhc/interceptors/logging.rb +4 -2
- data/lib/lhc/interceptors/monitoring.rb +7 -1
- data/lib/lhc/interceptors/retry.rb +2 -0
- data/lib/lhc/interceptors/rollbar.rb +3 -2
- data/lib/lhc/interceptors/throttle.rb +7 -2
- data/lib/lhc/interceptors/zipkin.rb +2 -0
- data/lib/lhc/interceptors.rb +1 -0
- data/lib/lhc/request.rb +30 -1
- data/lib/lhc/response/data.rb +1 -1
- data/lib/lhc/response.rb +1 -0
- data/lib/lhc/scrubber.rb +45 -0
- data/lib/lhc/scrubbers/auth_scrubber.rb +32 -0
- data/lib/lhc/scrubbers/body_scrubber.rb +30 -0
- data/lib/lhc/scrubbers/headers_scrubber.rb +40 -0
- data/lib/lhc/scrubbers/params_scrubber.rb +14 -0
- data/lib/lhc/version.rb +1 -1
- data/lib/lhc.rb +70 -59
- data/spec/config/scrubs_spec.rb +108 -0
- data/spec/error/to_s_spec.rb +6 -6
- data/spec/formats/multipart_spec.rb +1 -1
- data/spec/interceptors/caching/multilevel_cache_spec.rb +1 -1
- data/spec/interceptors/define_spec.rb +1 -0
- data/spec/interceptors/logging/main_spec.rb +21 -1
- data/spec/interceptors/rollbar/main_spec.rb +27 -15
- data/spec/request/scrubbed_headers_spec.rb +101 -0
- data/spec/request/scrubbed_options_spec.rb +185 -0
- data/spec/request/scrubbed_params_spec.rb +25 -0
- data/spec/response/data_spec.rb +2 -2
- data/spec/support/zipkin_mock.rb +1 -0
- metadata +34 -8
- data/.rubocop.localch.yml +0 -325
@@ -0,0 +1,185 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rails_helper'
|
4
|
+
|
5
|
+
describe LHC::Request do
|
6
|
+
before :each do
|
7
|
+
LHC.config.interceptors = [LHC::Auth]
|
8
|
+
LHC.config.endpoint(:local, 'http://local.ch', auth: auth)
|
9
|
+
LHC.config.scrubs[:params] << 'api_key'
|
10
|
+
LHC.config.scrubs[:headers] << 'private_key'
|
11
|
+
LHC.config.scrubs[:body] << 'user_token'
|
12
|
+
stub_request(:post, "http://local.ch?#{params.to_query}").with(headers: authorization_header.merge(headers), body: body.to_json)
|
13
|
+
end
|
14
|
+
|
15
|
+
let(:bearer_token) { '123456' }
|
16
|
+
let(:authorization_header) { { 'Authorization' => "Bearer #{bearer_token}" } }
|
17
|
+
let(:auth) { { bearer: -> { bearer_token } } }
|
18
|
+
let(:params) { { api_key: 'api-key-params' } }
|
19
|
+
let(:headers) { { private_key: 'private-key-header' } }
|
20
|
+
let(:body) { { user_token: 'user-token-body' } }
|
21
|
+
|
22
|
+
let(:request) do
|
23
|
+
response = LHC.post(:local, params: params, headers: headers, body: body)
|
24
|
+
response.request
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'provides srubbed request options' do
|
28
|
+
expect(request.scrubbed_options[:params]).to include(api_key: LHC::Scrubber::SCRUB_DISPLAY)
|
29
|
+
expect(request.scrubbed_options[:headers]).to include(private_key: LHC::Scrubber::SCRUB_DISPLAY)
|
30
|
+
expect(request.scrubbed_options[:body]).to include(user_token: LHC::Scrubber::SCRUB_DISPLAY)
|
31
|
+
expect(request.scrubbed_options[:auth][:bearer_token]).to eq(LHC::Scrubber::SCRUB_DISPLAY)
|
32
|
+
expect(request.scrubbed_options[:auth][:basic]).to be nil
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'when options do not have auth' do
|
36
|
+
let(:authorization_header) { {} }
|
37
|
+
let(:auth) { nil }
|
38
|
+
|
39
|
+
it 'provides srubbed request options' do
|
40
|
+
expect(request.scrubbed_options[:params]).to include(api_key: LHC::Scrubber::SCRUB_DISPLAY)
|
41
|
+
expect(request.scrubbed_options[:headers]).to include(private_key: LHC::Scrubber::SCRUB_DISPLAY)
|
42
|
+
expect(request.scrubbed_options[:body]).to include(user_token: LHC::Scrubber::SCRUB_DISPLAY)
|
43
|
+
expect(request.scrubbed_options[:auth]).to be nil
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
context 'when body data is nested' do
|
48
|
+
let(:body) do
|
49
|
+
{
|
50
|
+
data: {
|
51
|
+
attributes: {
|
52
|
+
employee: {
|
53
|
+
name: 'Muster',
|
54
|
+
surname: 'Hans',
|
55
|
+
password: 'test-1234',
|
56
|
+
password_confirmation: 'test-1234'
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'srubbes nested attributes' do
|
64
|
+
expect(request.scrubbed_options[:params]).to include(api_key: LHC::Scrubber::SCRUB_DISPLAY)
|
65
|
+
expect(request.scrubbed_options[:headers]).to include(private_key: LHC::Scrubber::SCRUB_DISPLAY)
|
66
|
+
expect(request.scrubbed_options[:body][:data][:attributes][:employee]).to include(password: LHC::Scrubber::SCRUB_DISPLAY)
|
67
|
+
expect(request.scrubbed_options[:body][:data][:attributes][:employee]).to include(password_confirmation: LHC::Scrubber::SCRUB_DISPLAY)
|
68
|
+
expect(request.scrubbed_options[:auth][:bearer_token]).to eq(LHC::Scrubber::SCRUB_DISPLAY)
|
69
|
+
expect(request.scrubbed_options[:auth][:basic]).to be nil
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'basic authentication' do
|
74
|
+
let(:username) { 'steve' }
|
75
|
+
let(:password) { 'abcdefg' }
|
76
|
+
let(:credentials_base_64_codiert) { Base64.strict_encode64("#{username}:#{password}").chomp }
|
77
|
+
let(:authorization_header) { { 'Authorization' => "Basic #{credentials_base_64_codiert}" } }
|
78
|
+
let(:auth) { { basic: { username: username, password: password } } }
|
79
|
+
|
80
|
+
it 'provides srubbed request headers' do
|
81
|
+
expect(request.scrubbed_options[:auth][:basic][:username]).to eq(LHC::Scrubber::SCRUB_DISPLAY)
|
82
|
+
expect(request.scrubbed_options[:auth][:basic][:password]).to eq(LHC::Scrubber::SCRUB_DISPLAY)
|
83
|
+
expect(request.scrubbed_options[:auth][:basic][:base_64_encoded_credentials]).to eq(LHC::Scrubber::SCRUB_DISPLAY)
|
84
|
+
expect(request.scrubbed_options[:auth][:bearer]).to be nil
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
context 'when nothing should get scrubbed' do
|
89
|
+
before :each do
|
90
|
+
LHC.config.scrubs = {}
|
91
|
+
end
|
92
|
+
|
93
|
+
it 'does not filter anything' do
|
94
|
+
expect(request.scrubbed_options[:params]).not_to include(api_key: LHC::Scrubber::SCRUB_DISPLAY)
|
95
|
+
expect(request.scrubbed_options[:headers]).not_to include(private_key: LHC::Scrubber::SCRUB_DISPLAY)
|
96
|
+
expect(request.scrubbed_options[:body]).not_to include(user_token: LHC::Scrubber::SCRUB_DISPLAY)
|
97
|
+
expect(request.scrubbed_options[:auth][:bearer_token]).not_to eq(LHC::Scrubber::SCRUB_DISPLAY)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context 'custom data structures that respond to as_json (like LHS data or record)' do
|
102
|
+
before do
|
103
|
+
class CustomStructure
|
104
|
+
|
105
|
+
def initialize(data)
|
106
|
+
@data = data
|
107
|
+
end
|
108
|
+
|
109
|
+
def as_json
|
110
|
+
@data.as_json
|
111
|
+
end
|
112
|
+
|
113
|
+
def to_json
|
114
|
+
as_json.to_json
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
stub_request(:post, 'http://local.ch').with(body: custom_structure.to_json)
|
119
|
+
end
|
120
|
+
|
121
|
+
let(:custom_structure) do
|
122
|
+
CustomStructure.new(user_token: '12345')
|
123
|
+
end
|
124
|
+
|
125
|
+
let(:request) do
|
126
|
+
response = LHC.post(:local, body: custom_structure)
|
127
|
+
response.request
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'provides srubbed request options' do
|
131
|
+
expect(request.scrubbed_options[:body]).to include('user_token' => LHC::Scrubber::SCRUB_DISPLAY)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
context 'encoded data hash' do
|
136
|
+
let(:body) { { user_token: 'user-token-body' } }
|
137
|
+
|
138
|
+
let(:request) do
|
139
|
+
response = LHC.post(:local, body: body.to_json)
|
140
|
+
response.request
|
141
|
+
end
|
142
|
+
|
143
|
+
before :each do
|
144
|
+
stub_request(:post, 'http://local.ch').with(body: body.to_json)
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'provides srubbed request options' do
|
148
|
+
expect(request.scrubbed_options[:body]).to include('user_token' => LHC::Scrubber::SCRUB_DISPLAY)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
context 'array' do
|
153
|
+
let(:body) { [{ user_token: 'user-token-body' }] }
|
154
|
+
|
155
|
+
let(:request) do
|
156
|
+
response = LHC.post(:local, body: body)
|
157
|
+
response.request
|
158
|
+
end
|
159
|
+
|
160
|
+
before :each do
|
161
|
+
stub_request(:post, 'http://local.ch').with(body: body.to_json)
|
162
|
+
end
|
163
|
+
|
164
|
+
it 'provides srubbed request options' do
|
165
|
+
expect(request.scrubbed_options[:body]).to eq([user_token: LHC::Scrubber::SCRUB_DISPLAY])
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
context 'encoded array' do
|
170
|
+
let(:body) { [{ user_token: 'user-token-body' }] }
|
171
|
+
|
172
|
+
let(:request) do
|
173
|
+
response = LHC.post(:local, body: body.to_json)
|
174
|
+
response.request
|
175
|
+
end
|
176
|
+
|
177
|
+
before :each do
|
178
|
+
stub_request(:post, 'http://local.ch').with(body: body.to_json)
|
179
|
+
end
|
180
|
+
|
181
|
+
it 'provides srubbed request options' do
|
182
|
+
expect(request.scrubbed_options[:body]).to eq(['user_token' => LHC::Scrubber::SCRUB_DISPLAY])
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rails_helper'
|
4
|
+
|
5
|
+
describe LHC::Request do
|
6
|
+
let(:params) { { api_key: 'xyz-123', secret_key: '123-xyz' } }
|
7
|
+
let(:response) { LHC.get(:local, params: params) }
|
8
|
+
|
9
|
+
before :each do
|
10
|
+
LHC.config.endpoint(:local, 'http://local.ch')
|
11
|
+
stub_request(:get, "http://local.ch?#{params.to_query}")
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'scrubs "api_key"' do
|
15
|
+
LHC.config.scrubs[:params] << 'api_key'
|
16
|
+
expect(response.request.scrubbed_params).to include(api_key: LHC::Scrubber::SCRUB_DISPLAY)
|
17
|
+
expect(response.request.scrubbed_params).to include(secret_key: '123-xyz')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'scrubs "api_key" and "secret_key"' do
|
21
|
+
LHC.config.scrubs[:params].push('api_key', 'secret_key')
|
22
|
+
expect(response.request.scrubbed_params).to include(api_key: LHC::Scrubber::SCRUB_DISPLAY)
|
23
|
+
expect(response.request.scrubbed_params).to include(secret_key: LHC::Scrubber::SCRUB_DISPLAY)
|
24
|
+
end
|
25
|
+
end
|
data/spec/response/data_spec.rb
CHANGED
@@ -75,9 +75,9 @@ describe LHC::Response do
|
|
75
75
|
it 'does not throw a stack level to deep issue when accessing data in a rescue context' do
|
76
76
|
begin
|
77
77
|
LHC.get('http://listings')
|
78
|
-
rescue LHC::Error =>
|
78
|
+
rescue LHC::Error => e
|
79
79
|
expect(
|
80
|
-
|
80
|
+
e.response.request.response.data.meta.errors.detect { |item| item.code == 2000 }.msg
|
81
81
|
).to eq 'I like to hide error messages (this is meta).'
|
82
82
|
end
|
83
83
|
end
|
data/spec/support/zipkin_mock.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.
|
4
|
+
version: 13.4.0.pre.pro1766.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhc/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -142,14 +142,28 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0
|
145
|
+
version: '1.0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0
|
152
|
+
version: '1.0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop-performance
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '1.0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '1.0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: rubocop-rspec
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +219,6 @@ files:
|
|
205
219
|
- ".github/workflows/rubocop.yml"
|
206
220
|
- ".github/workflows/test.yml"
|
207
221
|
- ".gitignore"
|
208
|
-
- ".rubocop.localch.yml"
|
209
222
|
- ".rubocop.yml"
|
210
223
|
- ".ruby-version"
|
211
224
|
- Gemfile
|
@@ -257,6 +270,11 @@ files:
|
|
257
270
|
- lib/lhc/response/data/collection.rb
|
258
271
|
- lib/lhc/response/data/item.rb
|
259
272
|
- lib/lhc/rspec.rb
|
273
|
+
- lib/lhc/scrubber.rb
|
274
|
+
- lib/lhc/scrubbers/auth_scrubber.rb
|
275
|
+
- lib/lhc/scrubbers/body_scrubber.rb
|
276
|
+
- lib/lhc/scrubbers/headers_scrubber.rb
|
277
|
+
- lib/lhc/scrubbers/params_scrubber.rb
|
260
278
|
- lib/lhc/test/cache_helper.rb
|
261
279
|
- lib/lhc/version.rb
|
262
280
|
- script/ci/build.sh
|
@@ -268,6 +286,7 @@ files:
|
|
268
286
|
- spec/basic_methods/request_without_rails_spec.rb
|
269
287
|
- spec/config/endpoints_spec.rb
|
270
288
|
- spec/config/placeholders_spec.rb
|
289
|
+
- spec/config/scrubs_spec.rb
|
271
290
|
- spec/core_ext/hash/deep_transform_values_spec.rb
|
272
291
|
- spec/dummy/README.rdoc
|
273
292
|
- spec/dummy/Rakefile
|
@@ -369,6 +388,9 @@ files:
|
|
369
388
|
- spec/request/parallel_requests_spec.rb
|
370
389
|
- spec/request/params_encoding_spec.rb
|
371
390
|
- spec/request/request_without_rails_spec.rb
|
391
|
+
- spec/request/scrubbed_headers_spec.rb
|
392
|
+
- spec/request/scrubbed_options_spec.rb
|
393
|
+
- spec/request/scrubbed_params_spec.rb
|
372
394
|
- spec/request/url_patterns_spec.rb
|
373
395
|
- spec/request/user_agent_spec.rb
|
374
396
|
- spec/request/user_agent_without_rails_spec.rb
|
@@ -402,12 +424,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
402
424
|
requirements:
|
403
425
|
- - ">="
|
404
426
|
- !ruby/object:Gem::Version
|
405
|
-
version: '
|
427
|
+
version: '2.7'
|
406
428
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
407
429
|
requirements:
|
408
|
-
- - "
|
430
|
+
- - ">"
|
409
431
|
- !ruby/object:Gem::Version
|
410
|
-
version:
|
432
|
+
version: 1.3.1
|
411
433
|
requirements:
|
412
434
|
- Ruby >= 2.0.0
|
413
435
|
rubygems_version: 3.1.4
|
@@ -423,6 +445,7 @@ test_files:
|
|
423
445
|
- spec/basic_methods/request_without_rails_spec.rb
|
424
446
|
- spec/config/endpoints_spec.rb
|
425
447
|
- spec/config/placeholders_spec.rb
|
448
|
+
- spec/config/scrubs_spec.rb
|
426
449
|
- spec/core_ext/hash/deep_transform_values_spec.rb
|
427
450
|
- spec/dummy/README.rdoc
|
428
451
|
- spec/dummy/Rakefile
|
@@ -524,6 +547,9 @@ test_files:
|
|
524
547
|
- spec/request/parallel_requests_spec.rb
|
525
548
|
- spec/request/params_encoding_spec.rb
|
526
549
|
- spec/request/request_without_rails_spec.rb
|
550
|
+
- spec/request/scrubbed_headers_spec.rb
|
551
|
+
- spec/request/scrubbed_options_spec.rb
|
552
|
+
- spec/request/scrubbed_params_spec.rb
|
527
553
|
- spec/request/url_patterns_spec.rb
|
528
554
|
- spec/request/user_agent_spec.rb
|
529
555
|
- spec/request/user_agent_without_rails_spec.rb
|
data/.rubocop.localch.yml
DELETED
@@ -1,325 +0,0 @@
|
|
1
|
-
# This is master rubocop configuration.
|
2
|
-
# DO NOT EDIT THIS FILE - it WILL be overwriten on every config update
|
3
|
-
AllCops:
|
4
|
-
TargetRubyVersion: 2.3
|
5
|
-
DisplayCopNames: true
|
6
|
-
DisplayStyleGuide: true
|
7
|
-
Exclude:
|
8
|
-
- 'db/**/*'
|
9
|
-
- 'script/**/*'
|
10
|
-
- 'vendor/bundle/**/*'
|
11
|
-
- 'vendor/assets/**/*'
|
12
|
-
- 'bin/**/*'
|
13
|
-
- 'config/unicorn.rb'
|
14
|
-
- 'config/compass.rb'
|
15
|
-
- 'Rakefile'
|
16
|
-
- 'app/controllers/error_trap_controller.rb'
|
17
|
-
- 'app/controllers/hsts_controller.rb'
|
18
|
-
- 'spec/lib/util_spec.rb'
|
19
|
-
|
20
|
-
Rails:
|
21
|
-
Enabled: true
|
22
|
-
|
23
|
-
require:
|
24
|
-
- rubocop-rspec
|
25
|
-
|
26
|
-
Bundler/OrderedGems:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
Lint/HandleExceptions:
|
30
|
-
Exclude:
|
31
|
-
- spec/**/*
|
32
|
-
|
33
|
-
Lint/UriEscapeUnescape:
|
34
|
-
Enabled: false
|
35
|
-
|
36
|
-
Style/RescueStandardError:
|
37
|
-
Enabled: false
|
38
|
-
|
39
|
-
Metrics/LineLength:
|
40
|
-
Enabled: false
|
41
|
-
|
42
|
-
Metrics/AbcSize:
|
43
|
-
Enabled: false
|
44
|
-
|
45
|
-
Metrics/MethodLength:
|
46
|
-
Enabled: false
|
47
|
-
|
48
|
-
Metrics/CyclomaticComplexity:
|
49
|
-
Enabled: false
|
50
|
-
|
51
|
-
Metrics/PerceivedComplexity:
|
52
|
-
Enabled: false
|
53
|
-
|
54
|
-
Metrics/ClassLength:
|
55
|
-
Enabled: false
|
56
|
-
|
57
|
-
Metrics/ModuleLength:
|
58
|
-
Enabled: false
|
59
|
-
|
60
|
-
Metrics/BlockLength:
|
61
|
-
Enabled: false
|
62
|
-
|
63
|
-
Metrics/ParameterLists:
|
64
|
-
Enabled: false
|
65
|
-
|
66
|
-
Metrics/BlockNesting:
|
67
|
-
Enabled: false
|
68
|
-
|
69
|
-
Performance/StringReplacement:
|
70
|
-
Enabled: false
|
71
|
-
|
72
|
-
Performance/TimesMap:
|
73
|
-
Enabled: false
|
74
|
-
|
75
|
-
Performance/RedundantBlockCall:
|
76
|
-
Enabled: false
|
77
|
-
|
78
|
-
Performance/RedundantMatch:
|
79
|
-
Enabled: false
|
80
|
-
|
81
|
-
Performance/RedundantMerge:
|
82
|
-
Enabled: false
|
83
|
-
|
84
|
-
Performance/Casecmp:
|
85
|
-
Enabled: false
|
86
|
-
|
87
|
-
Layout/MultilineOperationIndentation:
|
88
|
-
EnforcedStyle: indented
|
89
|
-
|
90
|
-
Layout/DotPosition:
|
91
|
-
EnforcedStyle: leading
|
92
|
-
|
93
|
-
Layout/AlignParameters:
|
94
|
-
Enabled: false
|
95
|
-
|
96
|
-
Layout/EmptyLinesAroundClassBody:
|
97
|
-
Enabled: false
|
98
|
-
|
99
|
-
Layout/IndentArray:
|
100
|
-
EnforcedStyle: consistent
|
101
|
-
|
102
|
-
Layout/MultilineMethodCallIndentation:
|
103
|
-
EnforcedStyle: indented
|
104
|
-
|
105
|
-
Layout/MultilineMethodCallBraceLayout:
|
106
|
-
EnforcedStyle: symmetrical
|
107
|
-
|
108
|
-
Layout/EmptyLinesAroundBlockBody:
|
109
|
-
EnforcedStyle: no_empty_lines
|
110
|
-
|
111
|
-
Layout/IndentHeredoc:
|
112
|
-
Enabled: false
|
113
|
-
|
114
|
-
Layout/MultilineArrayBraceLayout:
|
115
|
-
EnforcedStyle: symmetrical
|
116
|
-
|
117
|
-
Layout/MultilineHashBraceLayout:
|
118
|
-
EnforcedStyle: symmetrical
|
119
|
-
|
120
|
-
Style/StringLiterals:
|
121
|
-
Enabled: false
|
122
|
-
|
123
|
-
Style/RegexpLiteral:
|
124
|
-
Exclude:
|
125
|
-
- spec/**/*
|
126
|
-
|
127
|
-
Style/NumericLiterals:
|
128
|
-
Enabled: false
|
129
|
-
|
130
|
-
Style/WordArray:
|
131
|
-
Enabled: false
|
132
|
-
|
133
|
-
Style/Next:
|
134
|
-
Enabled: false
|
135
|
-
|
136
|
-
Style/PercentLiteralDelimiters:
|
137
|
-
Enabled: false
|
138
|
-
|
139
|
-
Style/GlobalVars:
|
140
|
-
Enabled: false
|
141
|
-
|
142
|
-
Style/CommentAnnotation:
|
143
|
-
Enabled: false
|
144
|
-
|
145
|
-
Style/SymbolProc:
|
146
|
-
Enabled: false
|
147
|
-
|
148
|
-
Style/DoubleNegation:
|
149
|
-
Enabled: false
|
150
|
-
|
151
|
-
Style/FormatString:
|
152
|
-
Enabled: false
|
153
|
-
|
154
|
-
Style/AsciiComments:
|
155
|
-
Enabled: false
|
156
|
-
|
157
|
-
Style/BarePercentLiterals:
|
158
|
-
Enabled: false
|
159
|
-
|
160
|
-
Style/SingleLineBlockParams:
|
161
|
-
Enabled: false
|
162
|
-
|
163
|
-
Style/MultilineBlockChain:
|
164
|
-
Enabled: false
|
165
|
-
|
166
|
-
Style/UnneededCapitalW:
|
167
|
-
Enabled: false
|
168
|
-
|
169
|
-
Style/UnneededPercentQ:
|
170
|
-
Enabled: false
|
171
|
-
|
172
|
-
Style/BlockDelimiters:
|
173
|
-
Exclude:
|
174
|
-
- spec/**/*
|
175
|
-
|
176
|
-
Style/BracesAroundHashParameters:
|
177
|
-
EnforcedStyle: context_dependent
|
178
|
-
|
179
|
-
Style/IfUnlessModifier:
|
180
|
-
Enabled: false
|
181
|
-
|
182
|
-
Style/ClassAndModuleChildren:
|
183
|
-
Enabled: false
|
184
|
-
|
185
|
-
Style/Documentation:
|
186
|
-
Enabled: false
|
187
|
-
|
188
|
-
Style/GuardClause:
|
189
|
-
Enabled: false
|
190
|
-
|
191
|
-
Naming/AccessorMethodName:
|
192
|
-
Exclude:
|
193
|
-
- spec/support/pages/**/*
|
194
|
-
|
195
|
-
Style/NegatedIf:
|
196
|
-
Enabled: false
|
197
|
-
|
198
|
-
Style/MutableConstant:
|
199
|
-
Enabled: false
|
200
|
-
|
201
|
-
Style/ConditionalAssignment:
|
202
|
-
Enabled: false
|
203
|
-
|
204
|
-
Style/Lambda:
|
205
|
-
Enabled: false
|
206
|
-
|
207
|
-
Style/FrozenStringLiteralComment:
|
208
|
-
Enabled: false
|
209
|
-
|
210
|
-
Style/SymbolArray:
|
211
|
-
Enabled: false
|
212
|
-
|
213
|
-
Style/HashSyntax:
|
214
|
-
EnforcedStyle: ruby19
|
215
|
-
|
216
|
-
Style/FormatStringToken:
|
217
|
-
Enabled: false
|
218
|
-
|
219
|
-
Style/EmptyMethod:
|
220
|
-
EnforcedStyle: expanded
|
221
|
-
|
222
|
-
Style/TernaryParentheses:
|
223
|
-
EnforcedStyle: require_parentheses_when_complex
|
224
|
-
|
225
|
-
Naming/VariableNumber:
|
226
|
-
Enabled: false
|
227
|
-
|
228
|
-
Style/PerlBackrefs:
|
229
|
-
Enabled: false
|
230
|
-
|
231
|
-
Style/RegexpLiteral:
|
232
|
-
AllowInnerSlashes: false
|
233
|
-
|
234
|
-
Style/BlockComments:
|
235
|
-
Enabled: false
|
236
|
-
|
237
|
-
Style/RedundantParentheses:
|
238
|
-
Enabled: false
|
239
|
-
|
240
|
-
Naming/FileName:
|
241
|
-
Exclude:
|
242
|
-
- Gemfile
|
243
|
-
- Brewfile
|
244
|
-
- Guardfile
|
245
|
-
|
246
|
-
Style/NumericPredicate:
|
247
|
-
Enabled: false
|
248
|
-
|
249
|
-
RSpec/DescribeClass:
|
250
|
-
Exclude:
|
251
|
-
- spec/views/**/*
|
252
|
-
- spec/routing/**/*
|
253
|
-
- spec/requests/**/*
|
254
|
-
- spec/features/**/*
|
255
|
-
|
256
|
-
RSpec/FilePath:
|
257
|
-
Enabled: false
|
258
|
-
|
259
|
-
RSpec/NamedSubject:
|
260
|
-
Enabled: false
|
261
|
-
|
262
|
-
RSpec/MultipleExpectations:
|
263
|
-
Enabled: false
|
264
|
-
|
265
|
-
RSpec/ExampleLength:
|
266
|
-
Enabled: false
|
267
|
-
|
268
|
-
RSpec/HookArgument:
|
269
|
-
EnforcedStyle: implicit
|
270
|
-
|
271
|
-
RSpec/MessageSpies:
|
272
|
-
EnforcedStyle: receive
|
273
|
-
|
274
|
-
RSpec/NestedGroups:
|
275
|
-
Enabled: false
|
276
|
-
|
277
|
-
RSpec/VerifiedDoubles:
|
278
|
-
Enabled: false
|
279
|
-
|
280
|
-
RSpec/LeadingSubject:
|
281
|
-
Enabled: false
|
282
|
-
|
283
|
-
RSpec/ExpectInHook:
|
284
|
-
Enabled: false
|
285
|
-
|
286
|
-
RSpec/ReturnFromStub:
|
287
|
-
Enabled: false
|
288
|
-
|
289
|
-
RSpec/SubjectStub:
|
290
|
-
Enabled: false
|
291
|
-
|
292
|
-
RSpec/EmptyLineAfterSubject:
|
293
|
-
Enabled: false
|
294
|
-
|
295
|
-
RSpec/LetSetup:
|
296
|
-
Enabled: false
|
297
|
-
|
298
|
-
RSpec/ImplicitExpect:
|
299
|
-
EnforcedStyle: is_expected
|
300
|
-
|
301
|
-
RSpec/ScatteredLet:
|
302
|
-
Enabled: false
|
303
|
-
|
304
|
-
RSpec/ContextWording:
|
305
|
-
Enabled: false
|
306
|
-
|
307
|
-
Rails/Output:
|
308
|
-
Exclude:
|
309
|
-
- 'config/application.rb'
|
310
|
-
- 'config/initializers/asset_manifest_warning.rb'
|
311
|
-
|
312
|
-
Rails/DynamicFindBy:
|
313
|
-
Enabled: false
|
314
|
-
|
315
|
-
Rails/Presence:
|
316
|
-
Enabled: false
|
317
|
-
|
318
|
-
Capybara/CurrentPathExpectation:
|
319
|
-
Enabled: false
|
320
|
-
|
321
|
-
Naming/UncommunicativeMethodParamName:
|
322
|
-
Enabled: false
|
323
|
-
|
324
|
-
Style/ExpandPathArguments:
|
325
|
-
Enabled: false
|