Skip to content

Commit 3c7c6cc

Browse files
authored
Merge pull request #21 from RadiusNetworks/update-rubocop-version
Upgrade Rubocop version to 0.62.x
2 parents 2da31c9 + 1660e68 commit 3c7c6cc

File tree

5 files changed

+42
-15
lines changed

5 files changed

+42
-15
lines changed

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
sudo: false
21
language: ruby
32
cache: bundler
4-
before_install:
5-
- gem update --system
6-
- gem install bundler
73
bundler_args: --jobs=3 --retry=3 --without documentation debug
84
before_script:
95
- "bin/ci-code-review"
106
script: bin/ci
117
rvm:
8+
- 2.6
129
- 2.5
1310
- ruby-head
14-
matrix:
11+
jobs:
1512
allow_failures:
1613
- rvm: ruby-head
1714
fast_finish: true

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
`Metrics/BlockLength` checks (Aaron Kromer, #18)
1010
- Exclude gem specs from block and line length metrics (Aaron Kromer, #20)
1111
- Standardize on key style of `Layout/AlignHash` (Aaron Kromer, #18)
12+
- Upgrade to Rubocop 0.62.x (Aaron Kromer, #21)
1213

1314
### Bug Fixes
1415

benchmarks/call_vs_yield.rb

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,36 @@ def pass_through(&block)
146146
block.call: 3557929.5 i/s - 5.12x (± 0.14) slower
147147
with 95.0% confidence
148148
```
149+
150+
### Environment
151+
152+
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin16]
153+
GC Disabled: false
154+
155+
### Test Cases
156+
157+
#### Block call vs yield
158+
159+
```
160+
Warming up --------------------------------------
161+
block.call 252.830k i/100ms
162+
block yield 266.647k i/100ms
163+
block arg only 275.856k i/100ms
164+
no arg yield 271.677k i/100ms
165+
pass through block 251.117k i/100ms
166+
Calculating -------------------------------------
167+
block.call 11.729M (± 0.9%) i/s - 58.404M in 5.004905s
168+
block yield 13.216M (± 0.8%) i/s - 65.862M in 5.007922s
169+
block arg only 17.288M (± 0.9%) i/s - 86.067M in 5.009110s
170+
no arg yield 16.109M (± 0.9%) i/s - 80.145M in 5.006225s
171+
pass through block 10.175M (± 1.0%) i/s - 50.726M in 5.010616s
172+
with 95.0% confidence
173+
174+
Comparison:
175+
block arg only: 17287836.2 i/s
176+
no arg yield: 16108506.9 i/s - 1.07x (± 0.01) slower
177+
block yield: 13215609.2 i/s - 1.31x (± 0.02) slower
178+
block.call: 11729199.4 i/s - 1.47x (± 0.02) slower
179+
pass through block: 10174648.1 i/s - 1.70x (± 0.02) slower
180+
with 95.0% confidence
181+
```

common_rubocop_rails.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -222,17 +222,13 @@ Rails/SaveBang:
222222
# - http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html
223223
# - http://api.rubyonrails.org/classes/ActiveRecord/Relation.html
224224
#
225+
# Configuration parameters: Blacklist, Whitelist.
225226
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
226227
Rails/SkipsModelValidations:
227-
Blacklist:
228-
- 'decrement_counter'
229-
- 'increment_counter'
230-
- 'toggle!'
231-
- 'update_all'
232-
- 'update_attribute'
233-
- 'update_column'
234-
- 'update_columns'
235-
- 'update_counters'
228+
Whitelist:
229+
- 'decrement!'
230+
- 'increment!'
231+
- 'touch'
236232

237233
# Rails uses compact style by default so we're disabling this with a :hammer:
238234
# for things likely to be generated by Rails (i.e. most things in app).

radius-spec.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
3131
spec.required_ruby_version = ">= 2.5"
3232

3333
spec.add_runtime_dependency "rspec", "~> 3.7"
34-
spec.add_runtime_dependency "rubocop", "~> 0.59.1"
34+
spec.add_runtime_dependency "rubocop", "~> 0.62.0"
3535

3636
spec.add_development_dependency "bundler", "~> 1.16"
3737
spec.add_development_dependency "rake", "~> 12.0"

0 commit comments

Comments
 (0)