standard 1.0.4 → 1.1.3

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: 329cd3a8f071049a128d6a37daee7ee43a9ce158a9a22d16b1bcafa3f6be94b9
4
- data.tar.gz: 683aa6c815d57a6abc69c0ca5b210baf51202aaa3f8c9de219182f7d9c88865f
3
+ metadata.gz: 677bdb97a52ccc04f84bece1148092d9e72bf9e3295353c2abf57a1ad9768b08
4
+ data.tar.gz: 95e2cb4029e5471b5e2be082040d77e04587c0731fa7ff9206ac7a5a166ab245
5
5
  SHA512:
6
- metadata.gz: bddf78f8851ff8d27dd06964c43632b67124e95768e0f36fc6ce04c6f36ee1b19cc7b891ea59302ee922ac8b683cd7fc67d65b37ce87bac21ca7b50c18ddac44
7
- data.tar.gz: a6cfbe765f4cea6a9383aa94cf86569ede7b7a98bad491044a316a22f08a05c10cdc7f2ad0f6eb0d19ac62e7b30911db7c7bb34061b51136181c3350c128d583
6
+ metadata.gz: 51d73287df34d77f79a6c3e01f11cac12c7bc96d3ec4377835110741ab0c6466ad08fb101d4a2b0c322a32fe083ed435e4a7436c140adcc09c0f5226089ee26d
7
+ data.tar.gz: 1201aa6a4a5570062e43c127626254b0bea984b0ad5ce4915eea0f25c97a64b5246cbbda01230e9e714f9587af7d8c0a3afe8870fa00b1e10feace9010373040
@@ -2,9 +2,9 @@ name: Tests
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches: [ main ]
6
6
  pull_request:
7
- branches: [ master ]
7
+ branches: [ main ]
8
8
 
9
9
  jobs:
10
10
  test:
@@ -12,7 +12,7 @@ jobs:
12
12
  strategy:
13
13
  matrix:
14
14
  os: [ ubuntu-latest ]
15
- ruby-version: [2.4, 2.7, 3.0]
15
+ ruby-version: [2.5, 2.7, 3.0]
16
16
 
17
17
  runs-on: ${{ matrix.os }}
18
18
 
@@ -22,16 +22,6 @@ jobs:
22
22
  uses: ruby/setup-ruby@v1
23
23
  with:
24
24
  ruby-version: ${{ matrix.ruby-version }}
25
- - name: Set up caching
26
- uses: actions/cache@v1
27
- with:
28
- path: vendor/bundle
29
- key: bundle-user-ruby-${{ matrix.os }}-${{matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}
30
- restore-keys: |
31
- bundle-use-ruby-${{ matrix.os }}-${{ matrix.ruby-version }}-
32
- - name: Install dependencies
33
- run: |
34
- bundle config path vendor/bundle
35
- bundle install --jobs 4 --retry 3
25
+ bundler-cache: true
36
26
  - name: Run tests for Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
37
- run: bundle exec rake
27
+ run: bundle config unset deployment && bundle exec rake
data/CHANGELOG.md CHANGED
@@ -1,10 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.3
4
+
5
+ * Update rubocop from 1.17.0 to [1.18.1](https://github.com/rubocop-hq/rubocop/releases/tag/v1.18.1)
6
+
7
+ ## 1.1.2
8
+
9
+ * Update rubocop from 1.14.0 to [1.17.0](https://github.com/rubocop-hq/rubocop/releases/tag/v1.17.0)
10
+
11
+ ## 1.1.1
12
+
13
+ * Update rubocop from 1.13.0 to [1.14.0](https://github.com/rubocop-hq/rubocop/releases/tag/v1.14.0)
14
+ * Update rubocop-performance from 1.11.1 to [1.11.2](https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.11.2)
15
+
16
+ ## 1.1.0
17
+
18
+ * Update rubocop from 1.12.1 to [1.13.0](https://github.com/rubocop-hq/rubocop/releases/tag/v1.13.0)
19
+ * Update rubocop-performance from 1.9.2 to [1.11.1](https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.11.1)
20
+ * Enabled the following rules:
21
+ * [`Performance/RedundantSplitRegexpArgument`](https://github.com/rubocop/rubocop-performance/pull/190)
22
+ * [`Style/IfWithBooleanLiteralBranches`](https://github.com/rubocop-hq/rubocop/pull/9396)
23
+ * [`Lint/TripleQuotes`](https://github.com/rubocop-hq/rubocop/pull/9402)
24
+ * [`Lint/SymbolConversion`](https://github.com/rubocop/rubocop/pull/9362)
25
+ * [`Lint/OrAssignmentToConstant`](https://github.com/rubocop-hq/rubocop/pull/9363)
26
+ * [`Lint/NumberedParameterAssignment`](https://github.com/rubocop-hq/rubocop/pull/9326)
27
+ * [`Style/HashConversion`](https://github.com/rubocop-hq/rubocop/pull/9478)
28
+ * [`Gemspec/DateAssignment`](https://github.com/rubocop-hq/rubocop/pull/9496)
29
+ * [`Style/StringChars`](https://github.com/rubocop/rubocop/pull/9615)
30
+
31
+ ## 1.0.5
32
+
33
+ * Update rubocop from 1.11.0 to [1.12.1](https://github.com/rubocop-hq/rubocop/releases/tag/v1.12.1)
34
+
3
35
  ## 1.0.4
4
36
 
5
37
  * Workaround RuboCop's CLI from erroring when it detects a cop named
6
38
  BlockDelimiters by renaming it to BlockSingleLineBraces
7
- ([#271](https://github.com/testdouble/standard/issues/271)0
39
+ ([#271](https://github.com/testdouble/standard/issues/271))
8
40
 
9
41
  ## 1.0.3
10
42
 
data/Gemfile.lock CHANGED
@@ -1,42 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.0.4)
5
- rubocop (= 1.11.0)
6
- rubocop-performance (= 1.10.1)
4
+ standard (1.1.3)
5
+ rubocop (= 1.18.1)
6
+ rubocop-performance (= 1.11.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
12
  coderay (1.1.3)
13
- docile (1.3.5)
13
+ docile (1.4.0)
14
14
  gimme (0.5.0)
15
15
  method_source (1.0.0)
16
16
  minitest (5.14.4)
17
17
  parallel (1.20.1)
18
- parser (3.0.0.0)
18
+ parser (3.0.1.1)
19
19
  ast (~> 2.4.1)
20
- pry (0.14.0)
20
+ pry (0.14.1)
21
21
  coderay (~> 1.1)
22
22
  method_source (~> 1.0)
23
23
  rainbow (3.0.0)
24
24
  rake (13.0.3)
25
25
  regexp_parser (2.1.1)
26
- rexml (3.2.4)
27
- rubocop (1.11.0)
26
+ rexml (3.2.5)
27
+ rubocop (1.18.1)
28
28
  parallel (~> 1.10)
29
29
  parser (>= 3.0.0.0)
30
30
  rainbow (>= 2.2.2, < 4.0)
31
31
  regexp_parser (>= 1.8, < 3.0)
32
32
  rexml
33
- rubocop-ast (>= 1.2.0, < 2.0)
33
+ rubocop-ast (>= 1.7.0, < 2.0)
34
34
  ruby-progressbar (~> 1.7)
35
35
  unicode-display_width (>= 1.4.0, < 3.0)
36
- rubocop-ast (1.4.1)
37
- parser (>= 2.7.1.5)
38
- rubocop-performance (1.10.1)
39
- rubocop (>= 0.90.0, < 2.0)
36
+ rubocop-ast (1.7.0)
37
+ parser (>= 3.0.1.1)
38
+ rubocop-performance (1.11.2)
39
+ rubocop (>= 1.7.0, < 2.0)
40
40
  rubocop-ast (>= 0.4.0)
41
41
  ruby-progressbar (1.11.0)
42
42
  simplecov (0.21.2)
@@ -44,7 +44,7 @@ GEM
44
44
  simplecov-html (~> 0.11)
45
45
  simplecov_json_formatter (~> 0.1)
46
46
  simplecov-html (0.12.3)
47
- simplecov_json_formatter (0.1.2)
47
+ simplecov_json_formatter (0.1.3)
48
48
  unicode-display_width (2.0.0)
49
49
 
50
50
  PLATFORMS
@@ -61,4 +61,4 @@ DEPENDENCIES
61
61
  standard!
62
62
 
63
63
  BUNDLED WITH
64
- 2.2.3
64
+ 2.2.6
data/README.md CHANGED
@@ -211,10 +211,12 @@ if you've used StandardJS.)
211
211
  * [myRent](https://www.myrent.co.nz)
212
212
  * [Renuo](https://www.renuo.ch/)
213
213
  * [JetThoughts](https://www.jetthoughts.com/)
214
+ * [Oyster](https://www.oysterhr.com/)
215
+ * [Podia](https://www.podia.com/)
214
216
  * And that's about it so far!
215
217
 
216
218
  If your team starts using Standard, [send a pull
217
- request](https://github.com/testdouble/standard/edit/master/README.md) to let us
219
+ request](https://github.com/testdouble/standard/edit/main/README.md) to let us
218
220
  know!
219
221
 
220
222
  ## Is there a readme badge?
@@ -272,7 +274,7 @@ ignore:
272
274
  ```
273
275
 
274
276
  You can see the files Standard ignores by default
275
- [here](https://github.com/testdouble/standard/blob/master/lib/standard/creates_config_store/configures_ignored_paths.rb#L3-L13)
277
+ [here](https://github.com/testdouble/standard/blob/main/lib/standard/creates_config_store/configures_ignored_paths.rb#L3-L13)
276
278
 
277
279
  ## How do I hide a certain warning?
278
280
 
@@ -355,7 +357,7 @@ ruby_version: 1.8.7
355
357
  ```
356
358
 
357
359
  See
358
- [testdouble/suture](https://github.com/testdouble/suture/blob/master/.standard.yml)
360
+ [testdouble/suture](https://github.com/testdouble/suture/blob/main/.standard.yml)
359
361
  for an example.
360
362
 
361
363
  It's a little confusing to consider, but the targeted Ruby version for linting
@@ -366,7 +368,7 @@ the runtime, RuboCop may behave in surprising or inconsistent ways.
366
368
 
367
369
  If you are targeting a Ruby older than 2.3 and run into an issue, check out
368
370
  Standard's [version-specific RuboCop
369
- configurations](https://github.com/testdouble/standard/tree/master/config) and
371
+ configurations](https://github.com/testdouble/standard/tree/main/config) and
370
372
  consider helping out by submitting a pull request if you find a rule that won't
371
373
  work for older Rubies.
372
374
 
@@ -423,6 +425,7 @@ from editor plugins:
423
425
  * [Pronto](https://github.com/julianrubisch/pronto-standardrb)
424
426
  * [Spring](https://github.com/lakim/spring-commands-standard)
425
427
  * [Guard](https://github.com/JodyVanden/guard-standardrb)
428
+ * [Danger](https://github.com/ashfurrow/danger-rubocop/)
426
429
 
427
430
  ## Contributing
428
431
 
data/config/base.yml CHANGED
@@ -21,6 +21,9 @@ Bundler/InsecureProtocolSource:
21
21
  - '**/Gemfile'
22
22
  - '**/gems.rb'
23
23
 
24
+ Gemspec/DateAssignment:
25
+ Enabled: true
26
+
24
27
  Gemspec/DuplicatedAssignment:
25
28
  Enabled: true
26
29
  Include:
@@ -478,6 +481,12 @@ Lint/NonDeterministicRequireOrder:
478
481
  Lint/NonLocalExitFromIterator:
479
482
  Enabled: true
480
483
 
484
+ Lint/NumberedParameterAssignment:
485
+ Enabled: true
486
+
487
+ Lint/OrAssignmentToConstant:
488
+ Enabled: true
489
+
481
490
  Lint/OrderedMagicComments:
482
491
  Enabled: true
483
492
 
@@ -557,6 +566,9 @@ Lint/ShadowedArgument:
557
566
  Lint/ShadowedException:
558
567
  Enabled: true
559
568
 
569
+ Lint/SymbolConversion:
570
+ Enabled: true
571
+
560
572
  Lint/Syntax:
561
573
  Enabled: true
562
574
 
@@ -566,6 +578,9 @@ Lint/TopLevelReturnWithArgument:
566
578
  Lint/TrailingCommaInAttributeDeclaration:
567
579
  Enabled: true
568
580
 
581
+ Lint/TripleQuotes:
582
+ Enabled: true
583
+
569
584
  Lint/UnderscorePrefixedVariableName:
570
585
  Enabled: true
571
586
 
@@ -652,7 +667,7 @@ Performance/DeletePrefix:
652
667
  Enabled: true
653
668
 
654
669
  Performance/DeleteSuffix:
655
- Enabled: true
670
+ Enabled: false
656
671
 
657
672
  Performance/Detect:
658
673
  Enabled: true
@@ -689,6 +704,9 @@ Performance/RedundantMerge:
689
704
  Performance/RedundantSortBlock:
690
705
  Enabled: true
691
706
 
707
+ Performance/RedundantSplitRegexpArgument:
708
+ Enabled: true
709
+
692
710
  Performance/RedundantStringChars:
693
711
  Enabled: true
694
712
 
@@ -747,7 +765,6 @@ Style/Alias:
747
765
 
748
766
  Style/AndOr:
749
767
  Enabled: true
750
- EnforcedStyle: always
751
768
 
752
769
  Style/ArgumentsForwarding:
753
770
  Enabled: true
@@ -855,6 +872,9 @@ Style/GlobalVars:
855
872
  Enabled: true
856
873
  AllowedVariables: []
857
874
 
875
+ Style/HashConversion:
876
+ Enabled: true
877
+
858
878
  Style/HashExcept:
859
879
  Enabled: true
860
880
 
@@ -871,6 +891,9 @@ Style/IfInsideElse:
871
891
  Style/IfUnlessModifierOfIfUnless:
872
892
  Enabled: true
873
893
 
894
+ Style/IfWithBooleanLiteralBranches:
895
+ Enabled: true
896
+
874
897
  Style/IfWithSemicolon:
875
898
  Enabled: true
876
899
 
@@ -1090,6 +1113,9 @@ Style/StabbyLambdaParentheses:
1090
1113
  Style/StderrPuts:
1091
1114
  Enabled: true
1092
1115
 
1116
+ Style/StringChars:
1117
+ Enabled: true
1118
+
1093
1119
  Style/StringLiterals:
1094
1120
  Enabled: true
1095
1121
  EnforcedStyle: double_quotes
data/config/ruby-1.9.yml CHANGED
@@ -2,3 +2,6 @@ inherit_from: ./ruby-2.2.yml
2
2
 
3
3
  Style/Encoding:
4
4
  Enabled: false
5
+
6
+ Style/HashConversion:
7
+ Enabled: false
data/config/ruby-2.3.yml CHANGED
@@ -1,4 +1 @@
1
- inherit_from: ./ruby-2.5.yml
2
-
3
- AllCops:
4
- TargetRubyVersion: 2.4 # The oldest supported
1
+ inherit_from: ./ruby-2.4.yml
@@ -0,0 +1,4 @@
1
+ inherit_from: ./ruby-2.5.yml
2
+
3
+ AllCops:
4
+ TargetRubyVersion: 2.5 # The oldest supported
@@ -18,6 +18,8 @@ class Standard::CreatesConfigStore
18
18
  "ruby-2.2.yml"
19
19
  elsif desired_version < Gem::Version.new("2.4")
20
20
  "ruby-2.3.yml"
21
+ elsif desired_version < Gem::Version.new("2.5")
22
+ "ruby-2.4.yml"
21
23
  elsif desired_version < Gem::Version.new("2.6")
22
24
  "ruby-2.5.yml"
23
25
  elsif desired_version < Gem::Version.new("3.0")
@@ -9,7 +9,7 @@ class Standard::CreatesConfigStore
9
9
  private
10
10
 
11
11
  def max_rubocop_supported_version(desired_version)
12
- rubocop_supported_version = Gem::Version.new("2.4")
12
+ rubocop_supported_version = Gem::Version.new("2.5")
13
13
  if desired_version < rubocop_supported_version
14
14
  rubocop_supported_version
15
15
  else
@@ -6,9 +6,9 @@ module RuboCop
6
6
  end
7
7
  end
8
8
 
9
- class CommentConfig
10
- remove_const :COMMENT_DIRECTIVE_REGEXP
11
- COMMENT_DIRECTIVE_REGEXP = Regexp.new(
9
+ class DirectiveComment
10
+ remove_const :DIRECTIVE_COMMENT_REGEXP
11
+ DIRECTIVE_COMMENT_REGEXP = Regexp.new(
12
12
  ('# (?:standard|rubocop) : ((?:disable|enable|todo))\b ' + COPS_PATTERN)
13
13
  .gsub(" ", '\s*')
14
14
  )
@@ -12,6 +12,7 @@ module Standard
12
12
  --fix Automatically fix failures where possible
13
13
  --no-fix Do not automatically fix failures
14
14
  --format <name> Format output with any RuboCop formatter (e.g. "json")
15
+ --generate-todo Create a .standard_todo.yml that lists all the files that contain errors
15
16
  -v, --version Print the version of Standard
16
17
  -h, --help Print this message
17
18
  FILE Files to lint [default: ./]
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new("1.0.4")
2
+ VERSION = Gem::Version.new("1.1.3")
3
3
  end
data/standard.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = Standard::VERSION
8
8
  spec.authors = ["Justin Searls"]
9
9
  spec.email = ["searls@gmail.com"]
10
- spec.required_ruby_version = ">= 2.4.0"
10
+ spec.required_ruby_version = ">= 2.5.0"
11
11
 
12
12
  spec.summary = "Ruby Style Guide, with linter & automatic code fixer"
13
13
  spec.homepage = "https://github.com/testdouble/standard"
@@ -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.11.0"
23
- spec.add_dependency "rubocop-performance", "1.10.1"
22
+ spec.add_dependency "rubocop", "1.18.1"
23
+ spec.add_dependency "rubocop-performance", "1.11.2"
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.0.4
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-06 00:00:00.000000000 Z
11
+ date: 2021-06-30 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.11.0
19
+ version: 1.18.1
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.11.0
26
+ version: 1.18.1
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.10.1
33
+ version: 1.11.2
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.10.1
40
+ version: 1.11.2
41
41
  description:
42
42
  email:
43
43
  - searls@gmail.com
@@ -62,6 +62,7 @@ files:
62
62
  - config/ruby-1.9.yml
63
63
  - config/ruby-2.2.yml
64
64
  - config/ruby-2.3.yml
65
+ - config/ruby-2.4.yml
65
66
  - config/ruby-2.5.yml
66
67
  - config/ruby-2.7.yml
67
68
  - docs/RELEASE.md
@@ -101,14 +102,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
102
  requirements:
102
103
  - - ">="
103
104
  - !ruby/object:Gem::Version
104
- version: 2.4.0
105
+ version: 2.5.0
105
106
  required_rubygems_version: !ruby/object:Gem::Requirement
106
107
  requirements:
107
108
  - - ">="
108
109
  - !ruby/object:Gem::Version
109
110
  version: '0'
110
111
  requirements: []
111
- rubygems_version: 3.2.3
112
+ rubygems_version: 3.1.4
112
113
  signing_key:
113
114
  specification_version: 4
114
115
  summary: Ruby Style Guide, with linter & automatic code fixer