standard 1.16.1 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +9 -9
- data/README.md +1 -0
- data/config/base.yml +14 -2
- data/config/ruby-1.9.yml +1 -1
- data/config/ruby-2.0.yml +4 -0
- data/config/ruby-2.1.yml +4 -0
- data/config/ruby-2.2.yml +11 -3
- data/config/ruby-2.3.yml +3 -0
- data/config/ruby-2.4.yml +1 -1
- data/docs/RELEASE.md +9 -9
- data/lib/standard/creates_config_store/assigns_rubocop_yaml.rb +4 -0
- data/lib/standard/creates_config_store/sets_target_ruby_version.rb +16 -7
- data/lib/standard/version.rb +1 -1
- data/standard.gemspec +2 -2
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2eac4c21b102d3fe789b14e074f7f5105e13355645b439b83b1d9f6ace6ef3d
|
4
|
+
data.tar.gz: e93477750d089d7f0eb6e0dd2d8ee817ebbc38e8252254b034fc2a9bd6cf4a8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
5
|
-
rubocop (= 1.
|
6
|
-
rubocop-performance (= 1.
|
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.
|
26
|
+
regexp_parser (2.6.0)
|
27
27
|
rexml (3.2.5)
|
28
|
-
rubocop (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.
|
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.
|
38
|
+
rubocop-ast (1.23.0)
|
39
39
|
parser (>= 3.1.1.0)
|
40
|
-
rubocop-performance (1.
|
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.
|
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:
|
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:
|
1815
|
+
EnforcedStyle: require_parentheses_when_complex
|
1804
1816
|
AllowSafeAssignment: true
|
1805
1817
|
|
1806
1818
|
Style/TopLevelMethodDefinition:
|
data/config/ruby-1.9.yml
CHANGED
data/config/ruby-2.0.yml
ADDED
data/config/ruby-2.1.yml
ADDED
data/config/ruby-2.2.yml
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
inherit_from: ./ruby-2.3.yml
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
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
data/config/ruby-2.4.yml
CHANGED
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
|
-
|
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
|
-
|
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
|
-
|
33
|
-
|
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
|
-
|
38
|
-
|
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
|
-
|
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
|
-
|
14
|
+
min_target_ruby_version_supported(standard_config[:ruby_version])
|
6
15
|
)
|
7
16
|
end
|
8
17
|
|
9
18
|
private
|
10
19
|
|
11
|
-
def
|
12
|
-
return
|
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
|
-
|
15
|
-
if
|
16
|
-
|
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
|
-
|
27
|
+
desired_target_ruby_version
|
19
28
|
end
|
20
29
|
end
|
21
30
|
|
data/lib/standard/version.rb
CHANGED
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.
|
23
|
-
spec.add_dependency "rubocop-performance", "1.
|
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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
|