rubocop-ruby1_9 1.0.2 → 1.0.5

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: 075b04dd2ce8d71e9b0cd4f89a5171a252e0a63ca0d6ec04aeff998587ae9b27
4
- data.tar.gz: f91d895c6b9a8bda1451e0350505f16e5c51d6472a2f728646b058dc475b7232
3
+ metadata.gz: f8e50addd2252a83bdbc62e3dc9d3230a1769120d3e8e732675a215fbcffe1f7
4
+ data.tar.gz: 0abda0cbeca2038191a08a455c8030a7555b77405268977517c40147f4143d19
5
5
  SHA512:
6
- metadata.gz: 25583f1d969a6f20960bd4cee1be06876a5c582525e50cda805755287e4e80914381f226e040498104a2a462232c3b0f70ff512e1cef56dd93dad3469102599a
7
- data.tar.gz: aef35e9fe265ac217d6e04c858c62f8fce0806e94e9ce01790eee59c3d6681d76b1041b122aed3f4fe8799f6c4647f6f77ed378729b146617fa11cabbd5b1f4b
6
+ metadata.gz: bad2cf3602d52a0a63051d36417a7338863636258e1e79faee0fbeb220d2cfaff5d8b121865f3513581c208613b09efae10e1f4d02432c5f6949f22133f309b2
7
+ data.tar.gz: 6721140787537dfb32f70e70c4e2071434db941431a1d7fb9234ec5dd3f5f04c99ce0d60a84dcf64025eec0fe90f964daaeb3bb5fa569f691e16140a4b8e8fb5
data/CHANGELOG.md CHANGED
@@ -6,7 +6,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
  ### Added
9
- * Documentation
10
9
 
11
10
  ### Changed
12
11
 
@@ -14,7 +13,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
13
 
15
14
  ### Removed
16
15
 
17
- ## [1.0.3] 2022-05-03
16
+ ## [1.0.5] 2022-05-23
17
+ ### Fixed
18
+ - Fix typo in rubocop-ruby1_8.yml filename to be shipped
19
+
20
+ ## [1.0.4] 2022-05-23
21
+ ### Fixed
22
+ - Ship rubocop-ruby1_8.yml with the gem
23
+
24
+ ## [1.0.3] 2022-05-22
25
+ ### Added
26
+ * Better documentation
27
+ * Default cop enabled for inherited rubocop.yml: Style/Encoding
28
+ * Rubocop => RuboCop typo repair
29
+ * New rubocop-ruby1_8.yml to assist with continuing support for Ruby 1.8
30
+ * Ruby Version Support Matrix
31
+ * Support installing via rubygems, without bundler
32
+
33
+ ### Fixed
34
+ * Ability to install via `gem install` command (i.e. without bundler)
35
+
36
+ ## [1.0.2] 2022-05-03
18
37
  ### Added
19
38
  * Style/BracesAroundHashParameters configured to help transition to Ruby 2.7+
20
39
 
@@ -26,7 +45,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
26
45
  ### Added
27
46
  * Initial release
28
47
 
29
- [Unreleased]: https://github.com/rubocop-semver/rubocop-ruby1_9/compare/v1.0.2...HEAD
30
- [1.0.2]: https://github.com/rubocop-semver/rubocop-ruby1_9/compare/v1.0.1...v1.0.2
31
- [1.0.1]: https://github.com/rubocop-semver/rubocop-ruby1_9/compare/v1.0.0...v1.0.1
32
- [1.0.0]: https://github.com/rubocop-semver/rubocop-ruby1_9/compare/8fb0f104adf43c5a0e3487b390f91881f79e4d89...v1.0.0
48
+ [Unreleased]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v1.0.4...HEAD
49
+ [1.0.4]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v1.0.3...v1.0.4
50
+ [1.0.3]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v1.0.2...v1.0.3
51
+ [1.0.2]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v1.0.1...v1.0.2
52
+ [1.0.1]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/v1.0.0...v1.0.1
53
+ [1.0.0]: https://github.com/rubocop-lts/rubocop-ruby1_9/compare/8fb0f104adf43c5a0e3487b390f91881f79e4d89...v1.0.0
data/CONTRIBUTING.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Contributing
2
2
 
3
- Bug reports and pull requests are welcome on GitHub at [https://github.com/rubocop-semver/rubocop-ruby1_9][source]
3
+ Bug reports and pull requests are welcome on GitHub at [https://github.com/rubocop-lts/rubocop-ruby1_9][source]
4
4
  . This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to
5
5
  the [code of conduct][conduct].
6
6
 
@@ -8,18 +8,18 @@ To submit a patch, please fork the project and create a patch with tests. Once y
8
8
 
9
9
  ## Contributors
10
10
 
11
- [![Contributors](https://contrib.rocks/image?repo=rubocop-semver/rubocop-ruby1_9)][contributors]
11
+ [![Contributors](https://contrib.rocks/image?repo=rubocop-lts/rubocop-ruby1_9)][contributors]
12
12
 
13
13
  Made with [contributors-img][contrib-rocks].
14
14
 
15
15
  [comment]: <> (Following links are used by README, CONTRIBUTING)
16
16
 
17
- [conduct]: https://github.com/rubocop-semver/rubocop-ruby1_9/blob/main/CODE_OF_CONDUCT.md
17
+ [conduct]: https://github.com/rubocop-lts/rubocop-ruby1_9/blob/main/CODE_OF_CONDUCT.md
18
18
 
19
19
  [contrib-rocks]: https://contrib.rocks
20
20
 
21
- [contributors]: https://github.com/rubocop-semver/rubocop-ruby1_9/graphs/contributors
21
+ [contributors]: https://github.com/rubocop-lts/rubocop-ruby1_9/graphs/contributors
22
22
 
23
23
  [comment]: <> (Following links are used by README, CONTRIBUTING, Homepage)
24
24
 
25
- [source]: https://github.com/rubocop-semver/rubocop-ruby1_9/
25
+ [source]: https://github.com/rubocop-lts/rubocop-ruby1_9/
data/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  <p align="center">
2
2
  <a href="https://rubocop.org#gh-light-mode-only" target="_blank" rel="noopener">
3
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby1_9/raw/main/docs/images/logo/rubocop-light.svg?raw=true" alt="PNG Rubocop Logo, Copyright (c) 2014 Bozhidar Batsov, MIT License, SVG Rubocop Logo, Gil Barbara, CC0">
3
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby1_9/raw/main/docs/images/logo/rubocop-light.svg?raw=true" alt="SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt">
4
4
  </a>
5
5
  <a href="https://rubocop.org#gh-dark-mode-only" target="_blank" rel="noopener">
6
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby1_9/raw/main/docs/images/logo/rubocop-dark.svg?raw=true" alt="SVG Rubocop Logo, Copyright (c) 2014 Bozhidar Batsov, MIT License, SVG Rubocop Logo, Roberto Huertas, MIT">
6
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby1_9/raw/main/docs/images/logo/rubocop-dark.svg?raw=true" alt="SVG RuboCop Logo, Copyright (c) 2014 Dimiter Petrov, CC BY-NC 4.0, see docs/images/logo/README.txt">
7
7
  </a>
8
8
  <a href="https://www.ruby-lang.org/" target="_blank" rel="noopener">
9
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby1_9/raw/main/docs/images/logo/ruby-logo.svg?raw=true" alt="Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5">
9
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby1_9/raw/main/docs/images/logo/ruby-logo.svg?raw=true" alt="Yukihiro Matsumoto, Ruby Visual Identity Team, CC BY-SA 2.5, see docs/images/logo/README.txt">
10
10
  </a>
11
11
  <a href="https://semver.org/#gh-light-mode-only" target="_blank" rel="noopener">
12
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby1_9/raw/main/docs/images/logo/semver-light.svg?raw=true" alt="SemVer.org Logo by @maxhaz">
12
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby1_9/raw/main/docs/images/logo/semver-light.svg?raw=true" alt="SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt">
13
13
  </a>
14
14
  <a href="https://semver.org/#gh-dark-mode-only" target="_blank" rel="noopener">
15
- <img width="120px" src="https://github.com/rubocop-semver/rubocop-ruby1_9/raw/main/docs/images/logo/semver-dark.svg?raw=true" alt="SemVer.org Logo by @maxhaz">
15
+ <img height="120px" src="https://github.com/rubocop-lts/rubocop-ruby1_9/raw/main/docs/images/logo/semver-dark.svg?raw=true" alt="SemVer.org Logo by @maxhaz, see docs/images/logo/README.txt">
16
16
  </a>
17
17
  </p>
18
18
 
@@ -31,7 +31,7 @@ what brought you here.
31
31
 
32
32
  <p align="left">
33
33
  <a href="https://metaredux.com/posts/2022/04/21/rubocop-turns-10.html" target="_blank" rel="noopener">
34
- <img width="360px" src="https://github.com/rubocop-semver/rubocop-ruby1_9/raw/main/docs/images/rubocop-not-semver.png?raw=true" alt="Explanation of non-SemVer compliance, @bbatsov">
34
+ <img width="360px" src="https://github.com/rubocop-lts/rubocop-ruby1_9/raw/main/docs/images/rubocop-not-semver.png?raw=true" alt="Explanation of non-SemVer compliance, @bbatsov">
35
35
  </a>
36
36
  </p>
37
37
 
@@ -39,15 +39,68 @@ The purpose of this gem is to constrain the `rubocop` dependency of a project in
39
39
  a [SemVer compliant](https://semver.org/) (Semantic Versioning) way that aligns with the the desired minimum
40
40
  compatible/supported Ruby version.
41
41
 
42
+ ## Ruby Version Support Matrix
43
+
42
44
  Adding this gem will facilitate the best practice of adding a `~> ` version constrained `rubocop` dependency, while
43
45
  minimizing the risk of a rubocop minor / patch upgrade breaking the build. See the
44
- official [compatibility matrix](https://github.com/rubocop/rubocop/blob/master/docs/modules/ROOT/pages/compatibility.adoc#support-matrix) (Rubocop documentation)
45
-
46
- ## Stable
46
+ official [compatibility matrix][rubocop-matrix] for `rubocop`.
47
+
48
+ `rubocop-ruby1_9` (this gem) will install on any version of Ruby >= 1.9, can be used to analyze Ruby >= 1.8.7 code, but will not execute on Ruby 3.1.
49
+
50
+ * 🧊 - Install on Ruby `<version>`
51
+ * 🏃‍ - Will Execute on Ruby `<version>`
52
+ * 🪷 - Will not execute correctly on Ruby `<version>`
53
+ * 🛠 - Lint code with Ruby `<version>` syntax as the target
54
+
55
+ | gem | 1.8.7 | 1.9.3 | 2.0 | 2.1 | 2.2 | 2.3 | 2.4 | 2.5 | 2.6 | 2.7 | 3.0 | 3.1 | ruby-head | jruby-head |
56
+ |-------------------------|---------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|------------|
57
+ | [rubocop-ruby1_9][rr19] | [🛠][what1_8] | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🪷 | 🧊 🪷 | 🧊 🪷 |
58
+ | [rubocop-ruby2_0][rr20] | | | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🪷 | 🧊 🪷 | 🧊 🪷 |
59
+ | [rubocop-ruby2_1][rr21] | | | | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🪷 | 🧊 🪷 | 🧊 🪷 |
60
+ | [rubocop-ruby2_2][rr22] | | | | | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊‍ 🪷 | 🧊 🪷 | 🧊 🪷 | 🧊 🪷 |
61
+ | [rubocop-ruby2_3][rr23] | | | | | | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🪷 | 🧊 🪷 | 🧊 🪷 |
62
+ | [rubocop-ruby2_4][rr24] | | | | | | | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🪷 | 🧊 🪷 | 🧊 🪷 |
63
+ | [rubocop-ruby2_5][rr25] | | | | | | | | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🪷 |
64
+ | [rubocop-ruby2_6][rr26] | | | | | | | | 🛠 | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🪷 |
65
+ | [rubocop-ruby2_7][rr27] | | | | | | | | 🛠 | 🛠 | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ |
66
+ | [rubocop-ruby3_0][rr30] | | | | | | | | 🛠 | 🛠 | 🛠 | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ | 🧊 🏃‍ |
67
+ | [rubocop-ruby3_1][rr31] | | | | | | | | 🛠 | 🛠 | 🛠 | 🛠 | 🧊 🏃‍ 🛠 | 🧊 🏃‍ | 🧊 🏃‍ |
68
+
69
+ [rr19]: https://github.com/rubocop-lts/rubocop-ruby1_9
70
+ [rr20]: https://github.com/rubocop-lts/rubocop-ruby2_0
71
+ [rr21]: https://github.com/rubocop-lts/rubocop-ruby2_1
72
+ [rr22]: https://github.com/rubocop-lts/rubocop-ruby2_2
73
+ [rr23]: https://github.com/rubocop-lts/rubocop-ruby2_3
74
+ [rr24]: https://github.com/rubocop-lts/rubocop-ruby2_4
75
+ [rr25]: https://github.com/rubocop-lts/rubocop-ruby2_5
76
+ [rr26]: https://github.com/rubocop-lts/rubocop-ruby2_6
77
+ [rr27]: https://github.com/rubocop-lts/rubocop-ruby2_7
78
+ [rr30]: https://github.com/rubocop-lts/rubocop-ruby3_0
79
+ [rr31]: https://github.com/rubocop-lts/rubocop-ruby3_1
80
+ [what1_8]: https://github.com/rubocop-lts/rubocop-ruby1_9#what-about-ruby-18
81
+ [rubocop-matrix]: https://github.com/rubocop/rubocop/blob/master/docs/modules/ROOT/pages/compatibility.adoc#support-matrix
82
+
83
+ ## 📼 Supporting Ruby v1... in 2022?
84
+
85
+ Many gems, and many of those among the most popular gems in all of Ruby-land (e.g. [rspec](https://rubygems.org/gems/rspec/versions/3.11.0), [os](https://rubygems.org/gems/os)) still do not specify a `required_ruby_version`, or they list it as `>= 0`.
86
+
87
+ If those gems want to:
88
+ * follow semver, and
89
+ * deprecate old rubies, then
90
+ * they need to first figure out what version of Ruby is currently supported, and
91
+ * once having determined the oldest supported version, they may want to enforce that support via linting, hence this family of gems.
92
+
93
+ NOTE: Some gems, e.g. rspec, are intentionally supporting Ruby 1.8.7 in 2022!
94
+
95
+ If you think about the use case of RSpec a bit this makes sense, as it would be ideal for the community for RSpec to be the last gem to drop support for Ruby 1.8.7. I wrote a [suite](https://railsbling.com/tags/rspec/) of RSpec extension gems, and I try to support the same versions of Ruby as RSpec does with my extensions.
96
+
97
+ This gem targets, and will run, on Ruby 1.9. RuboCop used to be able to analyze Ruby 1.8, and this gem makes use of that. If you are still supporting Ruby 1.8, see [What about Ruby 1.8?][what1_8] further down the page, because we can help!
98
+
99
+ ## 🗿 Stable
47
100
 
48
101
  All releases of this gem are stable releases. The first version is `1.0.0`.
49
102
 
50
- ## Installation
103
+ ## Installation
51
104
 
52
105
  Without bundler execute:
53
106
 
@@ -67,7 +120,7 @@ Or install it yourself as:
67
120
 
68
121
  $ gem install rubocop-ruby1_9
69
122
 
70
- ## Usage
123
+ ## 🔧 Usage
71
124
 
72
125
  The following is optional. We'll discuss why you might want to do this after you see what it does.
73
126
 
@@ -82,27 +135,76 @@ This has the same effect as you declaring the following in your `.rubocop.yml`:
82
135
 
83
136
  ```yaml
84
137
  # AllCops:
85
- # The sibling gems for newer versions of Ruby support the TargetRubyVersion directive as soon as Rubocop adds it.
138
+ # The sibling gems for newer versions of Ruby support the TargetRubyVersion directive as soon as RuboCop adds it.
86
139
  # TargetRubyVersion: 1.9
87
- # The sibling gems for newer versions of Ruby support the NewCops directive as soon as Rubocop adds it.
140
+ # The sibling gems for newer versions of Ruby support the NewCops directive as soon as RuboCop adds it.
88
141
  # NewCops: enable
89
- ```
90
142
 
91
- Everything is commented out! None of these settings exist in the very old version of rubocop that works with Ruby 1.9.
143
+ Style/BracesAroundHashParameters:
144
+ Enabled: true
145
+ EnforcedStyle: context_dependent
146
+
147
+ Style/Encoding:
148
+ Enabled: true
149
+ EnforcedStyle: always
150
+
151
+ Style/ExpandPathArguments:
152
+ Enabled: false
153
+ ```
92
154
 
93
155
  Let's talk about these settings.
94
156
 
95
157
  ## TargetRubyVersion
96
158
 
159
+ Commented out! Setting does not exist in the very old version of rubocop that works with Ruby 1.9.
160
+
97
161
  If you want to use this you'll have to upgrade to Ruby >= 2.0 and use the appropriate sibling gem, e.g. [`rubocop-ruby2_0`][2-0].
98
162
 
99
- [2-0]: https://github.com/rubocop-semver/rubocop-ruby2_0
163
+ [2-0]: https://github.com/rubocop-lts/rubocop-ruby2_0
100
164
 
101
165
  ## NewCops: enable
102
166
 
167
+ Commented out! Setting does not exist in very old versions of rubocop that work with Ruby < 2.4.
168
+
103
169
  If you want to use this you'll have to upgrade to Ruby >= 2.4 and use the appropriate sibling gem, e.g. [`rubocop-ruby2_4`][2-4].
104
170
 
105
- [2-4]: https://github.com/rubocop-semver/rubocop-ruby2_4
171
+ [2-4]: https://github.com/rubocop-lts/rubocop-ruby2_4
172
+
173
+ ## Style/BracesAroundHashParameters
174
+
175
+ In an effort to help users of this gem prepare their code for more modern Rubies it has been enabled and configured with `coontext_dependent` as the closest parallel to what will work with Ruby 2.7+, and also retain compatibility with old Ruby.
176
+
177
+ See:
178
+ * https://github.com/rubocop/rubocop/issues/7641
179
+ * https://github.com/rubocop/rubocop/pull/7643
180
+
181
+ NOTE: This cop was removed from RuboCop as of 0.80.0, so if you are on modern RuboCop and reading this for some reason, you can't use it.
182
+
183
+ ## Style/Encoding
184
+
185
+ The encoding comments can be removed once your project drops Ruby 1.9 support (and this gem!).
186
+ Whole file UTF-8 Encoding is default in Ruby 2+, so the Encoding comment is usually not needed there.
187
+ See:
188
+ * https://www.rubydoc.info/gems/rubocop/0.49.0/RuboCop/Cop/Style/Encoding
189
+
190
+ ## What about Ruby 1.8!
191
+
192
+ RuboCop has _never_ supported running on Ruby 1.8.7, but it did [used to support](https://github.com/rubocop/rubocop/issues/2640#issuecomment-378024741) analyzing it. To that end, there is a set of RuboCop rules you can use if your project still supports Ruby 1.8.
193
+
194
+ ```yaml
195
+ inherit_gem:
196
+ rubocop-ruby1_9: rubocop-ruby1_8.yml
197
+ ```
198
+
199
+ I won't copy the set of rules here, but you can peruse them [here](https://github.com/rubocop-lts/rubocop-ruby1_9/blob/main/rubocop-ruby1_8.yml). If the rules don't fit exactly your needs, you can just copy them out to your own `.rubocop.yml` config and modify!
200
+
201
+ Three different projects informed these Rubocop rules for 1.8.7.
202
+
203
+ * [rubocop_187's .rubocop-yml](https://github.com/teoucsb82/rubocop_187/blob/master/.rubocop.yml) - because `rubocop_187` is a Rails app built to Ruby-1.8.7-ify code added to it.
204
+ * [rspec's .rubocop-yml](https://github.com/rspec/rspec-core/blob/main/.rubocop.yml) - because `rspec` still supports Ruby 1.8.7
205
+ * [rspec-pending_for's .rubocop.yml](https://github.com/pboling/rspec-pending_for/blob/master/.rubocop.yml) - because `rspec-pending_for` still supports Ruby 1.8.7
206
+
207
+ If you have suggestions for a rule that improves compatibility with Ruby forward from 1.9 or 1.8, please let us know!
106
208
 
107
209
  ## Development
108
210
 
@@ -110,31 +212,52 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
110
212
 
111
213
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
112
214
 
113
- ## Contributing
215
+ ## ⚡️ Contributing
114
216
 
115
217
  See [CONTRIBUTING.md][contributing]
116
218
 
117
- ## Contributors
219
+ ## 🌈 Contributors
118
220
 
119
- [![Contributors](https://contrib.rocks/image?repo=rubocop-semver/rubocop-ruby1_9)]("https://github.com/rubocop-semver/rubocop-ruby1_9/graphs/contributors")
221
+ [![Contributors](https://contrib.rocks/image?repo=rubocop-lts/rubocop-ruby1_9)]("https://github.com/rubocop-lts/rubocop-ruby1_9/graphs/contributors")
120
222
 
121
223
  Made with [contributors-img](https://contrib.rocks).
122
224
 
123
- ## License
225
+ ## 📄 License
124
226
 
125
227
  The gem is available as open source under the terms of
126
228
  the [MIT License][license] [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][license-ref].
127
229
  See [LICENSE][license] for the official [Copyright Notice][copyright-notice-explainer].
128
230
 
231
+ <details>
232
+ <summary>Project Logos (rubocop-ruby3_1)</summary>
233
+
234
+ See [docs/images/logo/README.txt][project-logos]
235
+ </details>
236
+
237
+ <details>
238
+ <summary>Organization Logo (rubocop-semver)</summary>
239
+
240
+ Author: [Yusuf Evli][org-logo-author]
241
+ Source: [Unsplash][org-logo-source]
242
+ License: [Unsplash License][org-logo-license]
243
+ </details>
244
+
245
+ [project-logos]: https://github.com/rubocop-lts/rubocop-ruby3_1/blob/main/docs/images/logo/README.txt
246
+ [org-logo-author]: https://unsplash.com/@yusufevli
247
+ [org-logo-source]: https://unsplash.com/photos/yaSLNLtKRIU
248
+ [org-logo-license]: https://unsplash.com/license
249
+
250
+ ### © Copyright
251
+
129
252
  * Copyright (c) 2022 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
130
253
 
131
254
  [copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
132
255
 
133
- ## Code of Conduct
256
+ ## 🤝 Code of Conduct
134
257
 
135
- Everyone interacting in the Rubocop::Ruby19 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rubocop-semver/rubocop-ruby1_9/blob/main/CODE_OF_CONDUCT.md).
258
+ Everyone interacting in the Rubocop::Ruby19 project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rubocop-lts/rubocop-ruby1_9/blob/main/CODE_OF_CONDUCT.md).
136
259
 
137
- ## Versioning
260
+ ## 📌 Versioning
138
261
 
139
262
  This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations of this scheme should be reported as
140
263
  bugs. Specifically, if a minor or patch version is released that breaks backward compatibility, a new version should be
@@ -152,15 +275,15 @@ spec.add_dependency "rubocop-ruby1_9", "~> 1.0"
152
275
 
153
276
  [copyright-notice-explainer]: https://opensource.stackexchange.com/questions/5778/why-do-licenses-such-as-the-mit-license-specify-a-single-year
154
277
 
155
- [gh_discussions]: https://github.com/rubocop-semver/rubocop-ruby1_9/discussions
278
+ [gh_discussions]: https://github.com/rubocop-lts/rubocop-ruby1_9/discussions
156
279
 
157
- [conduct]: https://github.com/rubocop-semver/rubocop-ruby1_9/blob/main/CODE_OF_CONDUCT.md
280
+ [conduct]: https://github.com/rubocop-lts/rubocop-ruby1_9/blob/main/CODE_OF_CONDUCT.md
158
281
 
159
- [contributing]: https://github.com/rubocop-semver/rubocop-ruby1_9/blob/main/CONTRIBUTING.md
282
+ [contributing]: https://github.com/rubocop-lts/rubocop-ruby1_9/blob/main/CONTRIBUTING.md
160
283
 
161
- [security]: https://github.com/rubocop-semver/rubocop-ruby1_9/blob/main/SECURITY.md
284
+ [security]: https://github.com/rubocop-lts/rubocop-ruby1_9/blob/main/SECURITY.md
162
285
 
163
- [license]: https://github.com/rubocop-semver/rubocop-ruby1_9/blob/main/LICENSE.txt
286
+ [license]: https://github.com/rubocop-lts/rubocop-ruby1_9/blob/main/LICENSE.txt
164
287
 
165
288
  [license-ref]: https://opensource.org/licenses/MIT
166
289
 
@@ -184,23 +307,23 @@ spec.add_dependency "rubocop-ruby1_9", "~> 1.0"
184
307
 
185
308
  [politicme]: https://nationalprogressiveparty.org
186
309
 
187
- [documentation]: https://rubydoc.info/github/rubocop-semver/rubocop-ruby1_9/main
310
+ [documentation]: https://rubydoc.info/github/rubocop-lts/rubocop-ruby1_9/main
188
311
 
189
- [source]: https://github.com/rubocop-semver/rubocop-ruby1_9/
312
+ [source]: https://github.com/rubocop-lts/rubocop-ruby1_9/
190
313
 
191
- [actions]: https://github.com/rubocop-semver/rubocop-ruby1_9/actions
314
+ [actions]: https://github.com/rubocop-lts/rubocop-ruby1_9/actions
192
315
 
193
- [issues]: https://github.com/rubocop-semver/rubocop-ruby1_9/issues
316
+ [issues]: https://github.com/rubocop-lts/rubocop-ruby1_9/issues
194
317
 
195
- [climate_maintainability]: https://codeclimate.com/github/rubocop-semver/rubocop-ruby1_9/maintainability
318
+ [climate_maintainability]: https://codeclimate.com/github/rubocop-lts/rubocop-ruby1_9/maintainability
196
319
 
197
- [code_triage]: https://www.codetriage.com/rubocop-semver/rubocop-ruby1_9
320
+ [code_triage]: https://www.codetriage.com/rubocop-lts/rubocop-ruby1_9
198
321
 
199
322
  [blogpage]: http://www.railsbling.com/tags/rubocop-ruby1_9/
200
323
 
201
324
  [rubygems]: https://rubygems.org/gems/rubocop-ruby1_9
202
325
 
203
- [chat]: https://gitter.im/rubocop-semver/rubocop-ruby1_9?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
326
+ [chat]: https://gitter.im/rubocop-lts/rubocop-ruby1_9?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
204
327
 
205
328
  [maintenancee_policy]: https://guides.rubyonrails.org/maintenance_policy.html#security-issues
206
329
 
@@ -1,7 +1,8 @@
1
+ # encoding: utf-8
1
2
  # frozen_string_literal: true
2
3
 
3
4
  module Rubocop
4
5
  module Ruby19
5
- VERSION = "1.0.2".freeze
6
+ VERSION = "1.0.5".freeze
6
7
  end
7
8
  end
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  # frozen_string_literal: true
2
3
 
3
4
  require "rubocop/ruby1_9/version"
@@ -0,0 +1,34 @@
1
+ inherit_gem:
2
+ rubocop-ruby1_9: rubocop.yml
3
+
4
+ ###################################################################
5
+ # Rules that allow preservation of ruby 1.8.7 / ree compatibility #
6
+ ###################################################################
7
+
8
+ Style/Documentation:
9
+ Enabled: false
10
+
11
+ # Ruby 1.8.7 needs the . on chain of method calls at the end of a line
12
+ Style/DotPosition:
13
+ EnforcedStyle: trailing
14
+
15
+ Style/FrozenStringLiteralComment:
16
+ Enabled: true
17
+
18
+ # Ruby 1.8.7 doesn't have 1.9 style hash syntax
19
+ Style/HashSyntax:
20
+ EnforcedStyle: hash_rockets
21
+
22
+ # Ruby 1.8.7 doesn't have the -> lambda
23
+ Style/Lambda:
24
+ Enabled: false
25
+
26
+ Style/PercentLiteralDelimiters:
27
+ Enabled: false
28
+
29
+ Style/SymbolArray:
30
+ EnforcedStyle: brackets
31
+
32
+ Style/WordArray:
33
+ EnforcedStyle: brackets
34
+
data/rubocop.yml CHANGED
@@ -6,3 +6,11 @@
6
6
  Style/BracesAroundHashParameters:
7
7
  Enabled: true
8
8
  EnforcedStyle: context_dependent
9
+
10
+ # The encoding comments can be removed once the project drops Ruby 1.9 support (and this gem!).
11
+ # Whole file UTF-8 Encoding is default in Ruby 2+, so the Encoding comment is usually not needed there.
12
+ # See:
13
+ # * https://www.rubydoc.info/gems/rubocop/0.49.0/RuboCop/Cop/Style/Encoding
14
+ Style/Encoding:
15
+ Enabled: true
16
+ EnforcedStyle: always
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  # frozen_string_literal: true
2
3
 
3
4
  RSpec.configure do |config|
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  # frozen_string_literal: true
2
3
 
3
4
  RSpec.describe Rubocop::Ruby19 do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  # frozen_string_literal: true
2
3
 
3
4
  # This gem
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ruby1_9
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-02 00:00:00.000000000 Z
11
+ date: 2022-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -25,34 +25,20 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.41.2
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: parser
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
31
+ - - '='
46
32
  - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
33
+ version: 2.4.0.2
34
+ type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - ">="
38
+ - - '='
53
39
  - !ruby/object:Gem::Version
54
- version: '0'
55
- description: Links dependency on minimum Ruby version to maximum Rubocop version
40
+ version: 2.4.0.2
41
+ description: Links dependency on minimum Ruby version to maximum RuboCop version
56
42
  email:
57
43
  - peter.boling@gmail.com
58
44
  executables: []
@@ -67,23 +53,24 @@ files:
67
53
  - SECURITY.md
68
54
  - lib/rubocop/ruby1_9.rb
69
55
  - lib/rubocop/ruby1_9/version.rb
56
+ - rubocop-ruby1_8.yml
70
57
  - rubocop.yml
71
58
  - sig/rubocop/ruby1_9.rbs
72
59
  - spec/config/rspec/rspec_core.rb
73
60
  - spec/rubocop/ruby1_9_spec.rb
74
61
  - spec/spec_helper.rb
75
- homepage: https://github.com/rubocop-semver/rubocop-ruby1_9
62
+ homepage: https://github.com/rubocop-lts/rubocop-ruby1_9
76
63
  licenses:
77
64
  - MIT
78
65
  metadata:
79
- homepage_uri: https://github.com/rubocop-semver/rubocop-ruby1_9
80
- source_code_uri: https://github.com/rubocop-semver/rubocop-ruby1_9/tree/v1.0.2
81
- changelog_uri: https://github.com/rubocop-semver/rubocop-ruby1_9/blob/v1.0.2/CHANGELOG.md
82
- bug_tracker_uri: https://github.com/rubocop-semver/rubocop-ruby1_9/issues
83
- documentation_uri: https://www.rubydoc.info/gems/rubocop-ruby1_9/1.0.2
84
- wiki_uri: https://github.com/rubocop-semver/rubocop-ruby1_9/wiki
66
+ homepage_uri: https://github.com/rubocop-lts/rubocop-ruby1_9
67
+ source_code_uri: https://github.com/rubocop-lts/rubocop-ruby1_9/tree/v1.0.5
68
+ changelog_uri: https://github.com/rubocop-lts/rubocop-ruby1_9/blob/v1.0.5/CHANGELOG.md
69
+ bug_tracker_uri: https://github.com/rubocop-lts/rubocop-ruby1_9/issues
70
+ documentation_uri: https://www.rubydoc.info/gems/rubocop-ruby1_9/1.0.5
71
+ wiki_uri: https://github.com/rubocop-lts/rubocop-ruby1_9/wiki
85
72
  rubygems_mfa_required: 'true'
86
- post_install_message:
73
+ post_install_message:
87
74
  rdoc_options: []
88
75
  require_paths:
89
76
  - lib
@@ -98,11 +85,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
85
  - !ruby/object:Gem::Version
99
86
  version: '0'
100
87
  requirements: []
101
- rubygems_version: 3.3.12
102
- signing_key:
88
+ rubygems_version: 3.3.14
89
+ signing_key:
103
90
  specification_version: 4
104
- summary: Semantically Versioned Rubocop Dependency
91
+ summary: Semantically Versioned RuboCop Dependency
105
92
  test_files:
93
+ - spec/spec_helper.rb
106
94
  - spec/config/rspec/rspec_core.rb
107
95
  - spec/rubocop/ruby1_9_spec.rb
108
- - spec/spec_helper.rb