radius-spec 0.5.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 229205333f0d39f679032b076188c7a18013408c034486de29c4f4a684ddcf74
4
- data.tar.gz: 37aa800e6bfdb5b273de8837cbe62f87ca8f4f6b3a93bce091b7bbe6867cd64e
3
+ metadata.gz: b6b5e94783c4ccbdf8bdf80de184fc19cd52ac9ee9f2a7f92329b261bdb00f59
4
+ data.tar.gz: e492ea78f99e146011d2279e74fc1a3b1091aac13f311ef81324df43088ce440
5
5
  SHA512:
6
- metadata.gz: a0dde94d3cb6579e8faf68027cf1f77c1d8268d4d7c1979b05c5554e4e000769e2b6240f398d396558d0c71c2c717ead0062c5f236d4d03a49981fa91c8a95ca
7
- data.tar.gz: 027ef0ac9fcbc76dbaa374382035829e7607c4d3dc2979f2bbc8413b7cbd032961760ed798ac1bda7b83fba9899127c82c96743e8d716fca50f2fb93e01bb0bd
6
+ metadata.gz: 83005750c2029b0a2765e176a8d819ed7984376c13ac17b881b442d055956ffd28548c32af56bb7298b1cc60d976c0c3cb25d10bbc2aed5bec0f4b16c72e8324
7
+ data.tar.gz: 95d8183b73cfa36c5f3e01680bf6d2212016e2355d0a14ed95b7d38800b4d2e44ce9d08dbcdd0336bf6beb20731bfb3a834258a13b6ad357443918c4ec505ae8
@@ -0,0 +1,28 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on: [push, pull_request]
11
+
12
+ jobs:
13
+ test:
14
+
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ matrix:
18
+ ruby-version: ['2.5', '2.6', '2.7']
19
+
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: ${{ matrix.ruby-version }}
26
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
27
+ - name: Run tests
28
+ run: ./bin/ci
@@ -0,0 +1,21 @@
1
+ name: Review Dog
2
+ on: [pull_request]
3
+ jobs:
4
+ rubocop:
5
+ name: Rubocop
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - name: Check out code
9
+ uses: actions/checkout@v1
10
+ - uses: ruby/setup-ruby@v1 # ruby-version pulled .ruby-version file automatically
11
+ with:
12
+ ruby-version: '2.7'
13
+ bundler-cache: true
14
+ - name: rubocop
15
+ uses: reviewdog/action-rubocop@v1
16
+ with:
17
+ github_token: ${{ secrets.github_token }}
18
+ reporter: github-pr-review # Default is github-pr-check
19
+ rubocop_version: gemfile
20
+ rubocop_extensions: rubocop-rails:gemfile
21
+
data/.rubocop.yml CHANGED
@@ -3,7 +3,13 @@ inherit_mode:
3
3
  - Exclude
4
4
  - IgnoredPatterns
5
5
 
6
- inherit_from: common_rubocop.yml
6
+ inherit_from: common_rubocop_rails.yml
7
+
8
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
9
+ # URISchemes: http, https
10
+ Layout/LineLength:
11
+ Exclude:
12
+ - 'radius-spec.gemspec'
7
13
 
8
14
  # Configuration parameters: CountComments, ExcludedMethods.
9
15
  Metrics/BlockLength:
@@ -11,8 +17,6 @@ Metrics/BlockLength:
11
17
  - 'benchmarks/**/*'
12
18
  - 'lib/radius/spec/rspec.rb'
13
19
 
14
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
15
- # URISchemes: http, https
16
- Metrics/LineLength:
20
+ Style/Documentation:
17
21
  Exclude:
18
- - 'radius-spec.gemspec'
22
+ - 'benchmarks/**/*'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,101 @@
1
+ ## 0.9.0 (September 30, 2021)
2
+
3
+ [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.8.0...v0.9.0)
4
+
5
+ ### Enhancements
6
+
7
+ - Upgrade to Rubocop 0.89.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
8
+ Hoffman, James Nebeker, JC Avena, Sam Kim #27)
9
+ - Upgrade to Rubocop Rails 2.6.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
10
+ Hoffman, James Nebeker, JC Avena, Sam Kim #27)
11
+ - Adjust common Rubocop configuration (Aaron Hill, Aaron Kromer, Ben Reynolds,
12
+ Chris Hoffman, James Nebeker, JC Avena, Sam Kim #27)
13
+ - Configure multiple metrics to use the `CountAsOne` option for array, hash
14
+ and heredocs
15
+ - Disable `Style/SlicingWithRange` as we do not care about the style
16
+ - Includes new `shared_example` / `shared_context` inclusion aliases
17
+ `has_behavior` and `it_has_behavior` for behavior driven development language
18
+ (Aaron Kromer, Ben Reynolds #28)
19
+
20
+ ### Bug Fixes
21
+
22
+ None
23
+
24
+ ### Breaking Change
25
+
26
+ - Change the default behavior from `:warn` to `:raise` for RSpec expectations
27
+ behavior `on_potential_false_positives` (Aaron Kromer, Ben Reynolds #28)
28
+
29
+
30
+ ## 0.8.0 (August 26, 2021)
31
+
32
+ [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.7.0...v0.8.0)
33
+
34
+ ### Enhancements
35
+
36
+ - Upgrade to Rubocop 0.82.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
37
+ Hoffman, James Nebeker, JC Avena #26)
38
+ - Upgrade to Rubocop Rails 2.5.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
39
+ Hoffman, James Nebeker, JC Avena #26)
40
+ - Adjust common Rubocop configuration (Aaron Hill, Aaron Kromer, Ben Reynolds,
41
+ Chris Hoffman, James Nebeker, JC Avena #26)
42
+ - Rename metrics/configuration parameters per version upgrade requirements
43
+ - Use the stricter `always_true` check for `Style/FrozenStringLiteralComment`
44
+ - Opt-in to new cops/checks behaving per their default settings
45
+ - Adjust common Rubocop Rails configuration (Aaron Hill, Aaron Kromer, Ben
46
+ Reynolds, Chris Hoffman, James Nebeker, JC Avena #26)
47
+ - Disable `Rails/IndexBy` by default
48
+ - Disable `Rails/IndexWith` by default
49
+
50
+ ### Bug Fixes
51
+
52
+ None
53
+
54
+
55
+ ## 0.7.0 (July 23, 2021)
56
+
57
+ [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.6.0...0.7.0)
58
+
59
+ ### Enhancements
60
+
61
+ - Upgrade to Rubocop 0.73.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
62
+ Hoffman, James Nebeker #24)
63
+ - Upgrade to Rubocop Rails 2.2.x (Aaron Hill, Aaron Kromer, Ben Reynolds, Chris
64
+ Hoffman, James Nebeker #24)
65
+ - Adjust common Rubocop configuration (Aaron Hill, Aaron Kromer, Ben Reynolds,
66
+ Chris Hoffman, James Nebeker #24)
67
+ - Target Ruby 2.7 by default
68
+ - Enable `Lint/HeredocMethodCallPosition` by default
69
+ - Use `StandardError` for the suggested parent classes of errors
70
+ - Bump metric check maximums to provide a little more wiggle room
71
+ - Disable `Naming/RescuedExceptionsVariableName` by default
72
+ - Adjust common Rubocop Rails configuration (Aaron Hill, Aaron Kromer, Ben
73
+ Reynolds, Chris Hoffman, James Nebeker #24)
74
+ - Disable `Rails/IgnoredSkipActionFilterOption` by default
75
+
76
+ ### Bug Fixes
77
+
78
+ None
79
+
80
+
81
+ ## 0.6.0 (August 6, 2020)
82
+
83
+ [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.5.0...v0.6.0)
84
+
85
+ ### Enhancements
86
+
87
+ - Exclude more bundler binstubs from Rubocop (Aaron Kromer, #18, #20)
88
+ - Exclude `chdir` and `Capybara.register_driver` configuration blocks from
89
+ `Metrics/BlockLength` checks (Aaron Kromer, #18)
90
+ - Exclude gem specs from block and line length metrics (Aaron Kromer, #20)
91
+ - Standardize on key style of `Layout/AlignHash` (Aaron Kromer, #18)
92
+ - Upgrade to Rubocop 0.62.x (Aaron Kromer, #21)
93
+
94
+ ### Bug Fixes
95
+
96
+ None
97
+
98
+
1
99
  ## 0.5.0 (September 26, 2018)
2
100
 
3
101
  [Full Changelog](https://github.com/RadiusNetworks/radius-spec/compare/v0.4.0...v0.5.0)
data/Gemfile CHANGED
@@ -8,10 +8,9 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
8
8
  gemspec
9
9
 
10
10
  group :benchmark, optional: true do
11
+ gem 'activesupport', require: false
11
12
  gem 'benchmark-ips', require: false
12
- # TODO: See if this gem has an update in the future as it's gemspec is too
13
- # strict and it was blocking other gems from installing / updating
14
- gem 'kalibera', require: false, git: 'https://github.com/cupakromer/libkalibera.git'
13
+ gem 'kalibera', require: false
15
14
  end
16
15
 
17
16
  group :debug do
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
1
  # Common RSpec Setup and Plug-ins
2
2
 
3
- [![Build Status](https://travis-ci.org/RadiusNetworks/radius-spec.svg?branch=master)](https://travis-ci.org/RadiusNetworks/radius-spec)
4
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/701295df43d53e25eafe/maintainability)](https://codeclimate.com/github/RadiusNetworks/radius-spec/maintainability)
5
4
  [![Gem Version](https://badge.fury.io/rb/radius-spec.svg)](https://badge.fury.io/rb/radius-spec)
6
5
 
@@ -123,17 +122,17 @@ inherit_mode:
123
122
 
124
123
  # Available for projects which cannot include this gem (i.e. Ruby < 2.5)
125
124
  inherit_from:
126
- - https://raw.githubusercontent.com/RadiusNetworks/radius-spec/master/common_rubocop.yml
125
+ - https://raw.githubusercontent.com/RadiusNetworks/radius-spec/main/common_rubocop.yml
127
126
  # Use the following instead if it is a Rails project
128
- - https://raw.githubusercontent.com/RadiusNetworks/radius-spec/master/common_rubocop_rails.yml
127
+ - https://raw.githubusercontent.com/RadiusNetworks/radius-spec/main/common_rubocop_rails.yml
129
128
  ```
130
129
 
131
130
  When using the raw URL you may need to add the following to the project's
132
131
  `.gitignore` file:
133
132
 
134
133
  ```
135
- .rubocop-https---raw-githubusercontent-com-RadiusNetworks-radius-spec-master-common-rubocop-rails-yml
136
- .rubocop-https---raw-githubusercontent-com-RadiusNetworks-radius-spec-master-common-rubocop-yml
134
+ .rubocop-https---raw-githubusercontent-com-RadiusNetworks-radius-spec-main-common-rubocop-rails-yml
135
+ .rubocop-https---raw-githubusercontent-com-RadiusNetworks-radius-spec-main-common-rubocop-yml
137
136
  ```
138
137
 
139
138
  #### General Inheritance Notes
@@ -798,4 +797,4 @@ conduct.
798
797
 
799
798
  Everyone interacting in the Radius::Spec project’s codebases, issue trackers,
800
799
  chat rooms and mailing lists is expected to follow the [code of
801
- conduct](https://github.com/RadiusNetworks/radius-spec/blob/master/CODE_OF_CONDUCT.md).
800
+ conduct](https://github.com/RadiusNetworks/radius-spec/blob/main/CODE_OF_CONDUCT.md).
@@ -5,7 +5,6 @@ require_relative 'bm_setup'
5
5
 
6
6
  display_benchmark_header
7
7
 
8
- # rubocop:disable Performance/RedundantBlockCall
9
8
  def block_call(&block)
10
9
  block.call
11
10
  end
@@ -77,7 +76,6 @@ section "Block call vs yield" do |bench|
77
76
  end
78
77
  end
79
78
  end
80
- # rubocop:enable Performance/RedundantBlockCall
81
79
 
82
80
  __END__
83
81
 
@@ -146,3 +144,36 @@ Comparison:
146
144
  block.call: 3557929.5 i/s - 5.12x (± 0.14) slower
147
145
  with 95.0% confidence
148
146
  ```
147
+
148
+ ### Environment
149
+
150
+ ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin16]
151
+ GC Disabled: false
152
+
153
+ ### Test Cases
154
+
155
+ #### Block call vs yield
156
+
157
+ ```
158
+ Warming up --------------------------------------
159
+ block.call 252.830k i/100ms
160
+ block yield 266.647k i/100ms
161
+ block arg only 275.856k i/100ms
162
+ no arg yield 271.677k i/100ms
163
+ pass through block 251.117k i/100ms
164
+ Calculating -------------------------------------
165
+ block.call 11.729M (± 0.9%) i/s - 58.404M in 5.004905s
166
+ block yield 13.216M (± 0.8%) i/s - 65.862M in 5.007922s
167
+ block arg only 17.288M (± 0.9%) i/s - 86.067M in 5.009110s
168
+ no arg yield 16.109M (± 0.9%) i/s - 80.145M in 5.006225s
169
+ pass through block 10.175M (± 1.0%) i/s - 50.726M in 5.010616s
170
+ with 95.0% confidence
171
+
172
+ Comparison:
173
+ block arg only: 17287836.2 i/s
174
+ no arg yield: 16108506.9 i/s - 1.07x (± 0.01) slower
175
+ block yield: 13215609.2 i/s - 1.31x (± 0.02) slower
176
+ block.call: 11729199.4 i/s - 1.47x (± 0.02) slower
177
+ pass through block: 10174648.1 i/s - 1.70x (± 0.02) slower
178
+ with 95.0% confidence
179
+ ```