standard 1.16.1 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0eccc642c9ef6ba599bd6810a987a2f42b048fd9be747f74569bdc268bca67c9
4
- data.tar.gz: eb6df2a69cc05c6efd94cecdff7bfe7caedb03a48725db8e9fe17ce8c54c862c
3
+ metadata.gz: b2eac4c21b102d3fe789b14e074f7f5105e13355645b439b83b1d9f6ace6ef3d
4
+ data.tar.gz: e93477750d089d7f0eb6e0dd2d8ee817ebbc38e8252254b034fc2a9bd6cf4a8a
5
5
  SHA512:
6
- metadata.gz: 293b881fbe10c38247b1cc5e59736cb71e27d94bcdf7479ed5863dca5614943f99511518183f0e06c8ae2883086f5b573f1c9e75bc82a9ea4a0c1aa46dcb3142
7
- data.tar.gz: 40351aa4be24ae0aa07d650d511577d349df8b1e4abf7a0a87973606a26e0cd26d149401a247ea35480c6a4f30d2ced5580e73d1c7b408241386943607a19a31
6
+ metadata.gz: 17d371750994edb0ce2e4fc8ba8b720b9ecb696b067f785b70705e0f2398f6f660c89f70b0a732cda785b663f2edc16de578fbc85a2ec7556daa24e4e3354dd7
7
+ data.tar.gz: 991af80c9ad18abe72181880687c7d0d111b5da8a5ef9d8dc28e49063d0f8affb98629679198a57008665667e931165492f6d2e17496941f768cb5b181f77f79
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.17.0
4
+
5
+ * Update rubocop-performance from 1.14.3 to [1.15.0](https://github.com/rubocop/rubocop-performance/releases/tag/v1.15.0)
6
+ * Update rubocop from 1.35.1 to [1.38.0](https://github.com/rubocop/rubocop/releases/tag/v1.38.0)
7
+ * Require parentheses around complex ternary conditions [3b0b499a](https://github.com/testdouble/standard/commit/3b0b499a480f8ed90dda1272d31b5617dc340b27)
8
+
3
9
  ## 1.16.1
4
10
 
5
11
  * Update rubocop from 1.35.0 to [1.35.1](https://github.com/rubocop/rubocop/releases/tag/v1.35.1)
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.16.1)
5
- rubocop (= 1.35.1)
6
- rubocop-performance (= 1.14.3)
4
+ standard (1.17.0)
5
+ rubocop (= 1.38.0)
6
+ rubocop-performance (= 1.15.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -23,21 +23,21 @@ GEM
23
23
  method_source (~> 1.0)
24
24
  rainbow (3.1.1)
25
25
  rake (13.0.6)
26
- regexp_parser (2.5.0)
26
+ regexp_parser (2.6.0)
27
27
  rexml (3.2.5)
28
- rubocop (1.35.1)
28
+ rubocop (1.38.0)
29
29
  json (~> 2.3)
30
30
  parallel (~> 1.10)
31
31
  parser (>= 3.1.2.1)
32
32
  rainbow (>= 2.2.2, < 4.0)
33
33
  regexp_parser (>= 1.8, < 3.0)
34
34
  rexml (>= 3.2.5, < 4.0)
35
- rubocop-ast (>= 1.20.1, < 2.0)
35
+ rubocop-ast (>= 1.23.0, < 2.0)
36
36
  ruby-progressbar (~> 1.7)
37
37
  unicode-display_width (>= 1.4.0, < 3.0)
38
- rubocop-ast (1.21.0)
38
+ rubocop-ast (1.23.0)
39
39
  parser (>= 3.1.1.0)
40
- rubocop-performance (1.14.3)
40
+ rubocop-performance (1.15.0)
41
41
  rubocop (>= 1.7.0, < 2.0)
42
42
  rubocop-ast (>= 0.4.0)
43
43
  ruby-progressbar (1.11.0)
@@ -47,7 +47,7 @@ GEM
47
47
  simplecov_json_formatter (~> 0.1)
48
48
  simplecov-html (0.12.3)
49
49
  simplecov_json_formatter (0.1.4)
50
- unicode-display_width (2.2.0)
50
+ unicode-display_width (2.3.0)
51
51
 
52
52
  PLATFORMS
53
53
  ruby
data/README.md CHANGED
@@ -229,6 +229,7 @@ if you've used StandardJS.)
229
229
  * [Elevate Labs](https://elevatelabs.com)
230
230
  * [Envoy](https://www.envoy.com)
231
231
  * [Evil Martians](https://evilmartians.com)
232
+ * [Firstline](https://firstline.org/)
232
233
  * [Hashrocket](https://hashrocket.com)
233
234
  * [Honeybadger](https://www.honeybadger.io)
234
235
  * [JetThoughts](https://www.jetthoughts.com/)
data/config/base.yml CHANGED
@@ -493,6 +493,9 @@ Lint/DuplicateElsifCondition:
493
493
  Lint/DuplicateHashKey:
494
494
  Enabled: true
495
495
 
496
+ Lint/DuplicateMagicComment:
497
+ Enabled: true
498
+
496
499
  Lint/DuplicateMethods:
497
500
  Enabled: true
498
501
 
@@ -660,7 +663,7 @@ Lint/RandOne:
660
663
  Enabled: true
661
664
 
662
665
  Lint/RedundantCopDisableDirective:
663
- Enabled: true
666
+ Enabled: false
664
667
 
665
668
  Lint/RedundantCopEnableDirective:
666
669
  Enabled: false
@@ -1569,6 +1572,9 @@ Style/OneLineConditional:
1569
1572
  Style/OpenStructUse:
1570
1573
  Enabled: false
1571
1574
 
1575
+ Style/OperatorMethodCall:
1576
+ Enabled: false
1577
+
1572
1578
  Style/OptionHash:
1573
1579
  Enabled: false
1574
1580
 
@@ -1639,6 +1645,9 @@ Style/RedundantCondition:
1639
1645
  Style/RedundantConditional:
1640
1646
  Enabled: true
1641
1647
 
1648
+ Style/RedundantEach:
1649
+ Enabled: false
1650
+
1642
1651
  Style/RedundantException:
1643
1652
  Enabled: true
1644
1653
 
@@ -1688,6 +1697,9 @@ Style/RedundantSort:
1688
1697
  Style/RedundantSortBy:
1689
1698
  Enabled: true
1690
1699
 
1700
+ Style/RedundantStringEscape:
1701
+ Enabled: true
1702
+
1691
1703
  Style/RegexpLiteral:
1692
1704
  Enabled: false
1693
1705
 
@@ -1800,7 +1812,7 @@ Style/SymbolProc:
1800
1812
 
1801
1813
  Style/TernaryParentheses:
1802
1814
  Enabled: true
1803
- EnforcedStyle: require_no_parentheses
1815
+ EnforcedStyle: require_parentheses_when_complex
1804
1816
  AllowSafeAssignment: true
1805
1817
 
1806
1818
  Style/TopLevelMethodDefinition:
data/config/ruby-1.9.yml CHANGED
@@ -1,4 +1,4 @@
1
- inherit_from: ./ruby-2.2.yml
1
+ inherit_from: ./ruby-2.0.yml
2
2
 
3
3
  Style/Encoding:
4
4
  Enabled: false
@@ -0,0 +1,4 @@
1
+ inherit_from: ./ruby-2.1.yml
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.0
@@ -0,0 +1,4 @@
1
+ inherit_from: ./ruby-2.2.yml
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.1
data/config/ruby-2.2.yml CHANGED
@@ -1,8 +1,16 @@
1
1
  inherit_from: ./ruby-2.3.yml
2
2
 
3
- Layout:
4
- HeredocIndentation:
5
- Enabled: false
3
+ AllCops:
4
+ TargetRubyVersion: 2.2
5
+
6
+ # The below cops are for features not available until Ruby 2.3 but,
7
+ # as of this writing, the cops don't correctly use the TargetRubyVersion.
8
+
9
+ Layout/HeredocIndentation:
10
+ Enabled: false
6
11
 
7
12
  Performance/ConcurrentMonotonicTime:
8
13
  Enabled: false
14
+
15
+ Style/SafeNavigation:
16
+ Enabled: false
data/config/ruby-2.3.yml CHANGED
@@ -1 +1,4 @@
1
1
  inherit_from: ./ruby-2.4.yml
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.3
data/config/ruby-2.4.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  inherit_from: ./ruby-2.5.yml
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.5 # The oldest supported
4
+ TargetRubyVersion: 2.4
5
5
 
6
6
  Style/RedundantBegin:
7
7
  Enabled: false
data/docs/RELEASE.md CHANGED
@@ -22,21 +22,21 @@ really the only one we'll need for releasing the gem to
22
22
  ## Release steps
23
23
 
24
24
  1. Make sure git is up to date and `bundle exec rake` exits cleanly
25
- 2. If you upgraded a Rubocop dependency, be sure to lock it down in
25
+ 1. If you upgraded a Rubocop dependency, be sure to lock it down in
26
26
  `standard.gemspec`. To avoid being broken transitively, we stick to exact
27
27
  release dependencies (e.g. "0.91.0" instead of "~> 0.91")
28
- 3. Bump the appropriate version segment in `lib/standard/version.rb` (basic
28
+ 1. Update `CHANGELOG.md` as exhaustively as you are able and set the top header
29
+ to "Unreleased"
30
+ 1. Bump the appropriate version segment in `lib/standard/version.rb` (basic
29
31
  semantic versioning rules apply; if the release updates Rubocop, follow its
30
32
  version bump at a minimum—if rubocop saw minor bump, we'll also bump the
31
33
  minor version)
32
- 4. Run `bundle` so that Bundler writes this version to `Gemfile.lock`
33
- 5. Update `CHANGELOG.md` as exhaustively as you are able and set the top header
34
- to that of the new version
35
- 6. Commit `lib/standard/version.rb`, `Gemfile.lock`, and `CHANGELOG.md` together
34
+ 1. Run `bundle` so that Bundler writes this version to `Gemfile.lock`
35
+ 1. Commit `lib/standard/version.rb`, `Gemfile.lock`, and `CHANGELOG.md` together
36
36
  with the message equal to the new version (e.g. "0.42.1")
37
- 7. Finally, run `bundle exec rake release`, which will hopefully succeed
38
- 8. Provide your multi-factor-auth token when prompted to finish publishing the
37
+ 1. Finally, run `bundle exec rake release`, which will hopefully succeed
38
+ 1. Provide your multi-factor-auth token when prompted to finish publishing the
39
39
  gem
40
- 9. [Tweet](https://twitter.com) about your awesome new release! (Shameless
40
+ 1. [Tweet](https://twitter.com) about your awesome new release! (Shameless
41
41
  self-promotion is the most important part of open source software)
42
42
 
@@ -18,6 +18,10 @@ class Standard::CreatesConfigStore
18
18
  "ruby-1.8.yml"
19
19
  elsif desired_version < Gem::Version.new("2.0")
20
20
  "ruby-1.9.yml"
21
+ elsif desired_version < Gem::Version.new("2.1")
22
+ "ruby-2.0.yml"
23
+ elsif desired_version < Gem::Version.new("2.2")
24
+ "ruby-2.1.yml"
21
25
  elsif desired_version < Gem::Version.new("2.3")
22
26
  "ruby-2.2.yml"
23
27
  elsif desired_version < Gem::Version.new("2.4")
@@ -1,21 +1,30 @@
1
1
  class Standard::CreatesConfigStore
2
2
  class SetsTargetRubyVersion
3
+ # This is minimum version that Rubocop can parse, not the minimum
4
+ # version it can run on (e.g. TargetRubyVersion). See the following
5
+ # for more details:
6
+ #
7
+ # https://docs.rubocop.org/rubocop/configuration.html#setting-the-target-ruby-version
8
+ #
9
+ # https://github.com/rubocop/rubocop/blob/master/lib/rubocop/target_ruby.rb
10
+ MIN_TARGET_RUBY_VERSION = "2.0"
11
+
3
12
  def call(options_config, standard_config)
4
13
  options_config["AllCops"]["TargetRubyVersion"] = normalize_version(
5
- max_rubocop_supported_version(standard_config[:ruby_version])
14
+ min_target_ruby_version_supported(standard_config[:ruby_version])
6
15
  )
7
16
  end
8
17
 
9
18
  private
10
19
 
11
- def max_rubocop_supported_version(desired_version)
12
- return desired_version unless Gem::Version.correct?(desired_version)
20
+ def min_target_ruby_version_supported(desired_target_ruby_version)
21
+ return desired_target_ruby_version unless Gem::Version.correct?(desired_target_ruby_version)
13
22
 
14
- rubocop_supported_version = Gem::Version.new("2.5")
15
- if desired_version < rubocop_supported_version
16
- rubocop_supported_version
23
+ min_target_ruby_version = Gem::Version.new(MIN_TARGET_RUBY_VERSION)
24
+ if desired_target_ruby_version < min_target_ruby_version
25
+ min_target_ruby_version
17
26
  else
18
- desired_version
27
+ desired_target_ruby_version
19
28
  end
20
29
  end
21
30
 
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new('1.16.1')
2
+ VERSION = Gem::Version.new("1.17.0")
3
3
  end
data/standard.gemspec CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "rubocop", "1.35.1"
23
- spec.add_dependency "rubocop-performance", "1.14.3"
22
+ spec.add_dependency "rubocop", "1.38.0"
23
+ spec.add_dependency "rubocop-performance", "1.15.0"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.1
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-30 00:00:00.000000000 Z
11
+ date: 2022-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.35.1
19
+ version: 1.38.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.35.1
26
+ version: 1.38.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-performance
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.14.3
33
+ version: 1.15.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.14.3
40
+ version: 1.15.0
41
41
  description:
42
42
  email:
43
43
  - searls@gmail.com
@@ -62,6 +62,8 @@ files:
62
62
  - config/base.yml
63
63
  - config/ruby-1.8.yml
64
64
  - config/ruby-1.9.yml
65
+ - config/ruby-2.0.yml
66
+ - config/ruby-2.1.yml
65
67
  - config/ruby-2.2.yml
66
68
  - config/ruby-2.3.yml
67
69
  - config/ruby-2.4.yml