rubocop-solidus 0.1.4 → 0.2.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 +4 -4
- data/CHANGELOG.md +11 -1
- data/Gemfile.lock +1 -1
- data/README.md +41 -1
- data/config/default.yml +16 -10
- data/docs/cops.md +1 -0
- data/docs/cops_solidus.md +38 -10
- data/lib/rubocop/cop/mixin/target_solidus_version.rb +1 -1
- data/lib/rubocop/cop/solidus/existing_card_id_deprecated.rb +40 -0
- data/lib/rubocop/cop/solidus/spree_t_deprecated.rb +4 -0
- data/lib/rubocop/cop/solidus_cops.rb +1 -0
- data/lib/rubocop/solidus/version.rb +1 -1
- data/relnotes/v0.2.0.md +9 -0
- data/rubocop-solidus.gemspec +2 -2
- data/tasks/changelog.rb +1 -1
- data/tasks/cut_release.rake +2 -2
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bc1ae2b167634c137ee88d6bd7615fb3a0907955cc143f4aa5094934353f5ea
|
4
|
+
data.tar.gz: c161d8a998a63418dacfdec1c8a14c964bfe3e92e5e074d0d53df25fee64a520
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16ebb4fa72cefa29901078c5d8027ab54eb406472de63c767739bdc306140efdf8a5ca5a49ccc038222e978b2124871b6cbd318c6d030ad7c954abf5eb69f5e4
|
7
|
+
data.tar.gz: 5ff42650f717fe597830d1ce410546abcf2e4c55f8b561e1a0cae8de99d206d5fdf6dded86249ef814bb9d0b5a6ef67c0962e2797f3cb5a0ea09e3c393ebda06
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
##
|
1
|
+
## main (unreleased)
|
2
|
+
|
3
|
+
## 0.2.0 (2023-11-02)
|
4
|
+
|
5
|
+
### New features
|
6
|
+
|
7
|
+
* [#60](https://github.com/solidusio/rubocop-solidus/issues/60): Create new cop to check existing_card_id. ([@MassimilianoLattanzio][])
|
8
|
+
|
9
|
+
### Bug fixes
|
10
|
+
|
11
|
+
* [#60](https://github.com/solidusio/rubocop-solidus/issues/60): Fix overridden add_offense method. ([@MassimilianoLattanzio][])
|
2
12
|
|
3
13
|
## 0.1.4 (2023-08-04)
|
4
14
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -30,7 +30,47 @@ require:
|
|
30
30
|
- rubocop-solidus
|
31
31
|
```
|
32
32
|
|
33
|
-
|
33
|
+
|
34
|
+
After this^, simply use the `rubocop` command to start linting your Ruby(`.rb`) files.
|
35
|
+
|
36
|
+
### For linting `.erb` files
|
37
|
+
|
38
|
+
We recommend to run rubocop solidus cops on ERB files. The simplest method to do this is via
|
39
|
+
[erblint](https://github.com/Shopify/erb-lint)
|
40
|
+
|
41
|
+
#### Add ERBlint to your Gemfile
|
42
|
+
```ruby
|
43
|
+
gem 'erb_lint'
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Add ERBlint config (`.erb-lint.yml`)
|
47
|
+
This is the most basic ERBlint config that can be used to run all and only the Solidus cops in any project
|
48
|
+
```yaml
|
49
|
+
---
|
50
|
+
EnableDefaultLinters: false
|
51
|
+
linters:
|
52
|
+
Rubocop:
|
53
|
+
enabled: true
|
54
|
+
rubocop_config:
|
55
|
+
inherit_from:
|
56
|
+
- .rubocop.yml
|
57
|
+
only:
|
58
|
+
- Solidus
|
59
|
+
```
|
60
|
+
|
61
|
+
#### To run ERBlint for all ERB files
|
62
|
+
```bash
|
63
|
+
# From project directory
|
64
|
+
bundle exec erblint .
|
65
|
+
```
|
66
|
+
|
67
|
+
#### To run autocorrect on ERB files
|
68
|
+
Any cop that supports autocorrect for rubocop implicitly supports autocorrect
|
69
|
+
for ERB files as well.
|
70
|
+
```bash
|
71
|
+
# From project directory
|
72
|
+
bundle exec erblint -a .
|
73
|
+
```
|
34
74
|
|
35
75
|
## Documentation
|
36
76
|
|
data/config/default.yml
CHANGED
@@ -11,59 +11,65 @@ AllCops:
|
|
11
11
|
Solidus/ClassEvalDecorator:
|
12
12
|
Description: 'Checks if Class.class_eval is being used in the code'
|
13
13
|
Enabled: true
|
14
|
-
VersionAdded: '0.1
|
14
|
+
VersionAdded: '0.1'
|
15
15
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/21'
|
16
16
|
|
17
|
+
Solidus/ExistingCardIdDeprecated:
|
18
|
+
Description: 'Checks if existing_card_id is being used and suggest using wallet_payment_source_id instead'
|
19
|
+
Enabled: true
|
20
|
+
VersionAdded: '0.2'
|
21
|
+
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/60'
|
22
|
+
|
17
23
|
Solidus/ReimbursementHookDeprecated:
|
18
24
|
Description: 'Checks if reimbursement_success_hooks and reimbursement_failed_hooks is being used'
|
19
25
|
Enabled: true
|
20
|
-
VersionAdded: '0.1
|
26
|
+
VersionAdded: '0.1'
|
21
27
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/27'
|
22
28
|
|
23
29
|
Solidus/SpreeCalculatorFreeShippingDeprecated:
|
24
30
|
Description: 'Checks if Spree::Calculator::FreeShipping is being used and add deprecation message'
|
25
31
|
Enabled: true
|
26
|
-
VersionAdded: '0.1
|
32
|
+
VersionAdded: '0.1'
|
27
33
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/29'
|
28
34
|
|
29
35
|
Solidus/SpreeCalculatorPercentPerItemDeprecated:
|
30
36
|
Description: 'Checks if Spree::Calculator::PercentPerItem is being used and add deprecation message'
|
31
37
|
Enabled: true
|
32
|
-
VersionAdded: '0.1
|
38
|
+
VersionAdded: '0.1'
|
33
39
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/29'
|
34
40
|
|
35
41
|
Solidus/SpreeCalculatorPriceSackDeprecated:
|
36
42
|
Description: 'Checks if Spree::Calculator::PriceSack is being used and add deprecation message'
|
37
43
|
Enabled: true
|
38
|
-
VersionAdded: '0.1
|
44
|
+
VersionAdded: '0.1'
|
39
45
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/29'
|
40
46
|
|
41
47
|
Solidus/SpreeDefaultCreditCardDeprecated:
|
42
48
|
Description: 'Checks if user.default_credit_card is used and suggest using user.wallet.default_wallet_payment_source'
|
43
49
|
Enabled: true
|
44
|
-
VersionAdded: '0.1
|
50
|
+
VersionAdded: '0.1'
|
45
51
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/33'
|
46
52
|
|
47
53
|
Solidus/SpreeGatewayBogusDeprecated:
|
48
54
|
Description: 'Checks if SpreeGatewayBogus is being used and replaces it with Spree::PaymentMethod::BogusCreditCard'
|
49
55
|
Enabled: true
|
50
|
-
VersionAdded: '0.1
|
56
|
+
VersionAdded: '0.1'
|
51
57
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/26'
|
52
58
|
|
53
59
|
Solidus/SpreeIconDeprecated:
|
54
60
|
Description: 'Checks if icon helper is being used and suggest `solidus_icon`'
|
55
61
|
Enabled: true
|
56
|
-
VersionAdded: '0.1
|
62
|
+
VersionAdded: '0.1'
|
57
63
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/32'
|
58
64
|
|
59
65
|
Solidus/SpreeRefundCallPerform:
|
60
66
|
Description: 'Checks if Spree::Refund.create is being used and require calling .perform!'
|
61
67
|
Enabled: true
|
62
|
-
VersionAdded: '0.1
|
68
|
+
VersionAdded: '0.1'
|
63
69
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/28'
|
64
70
|
|
65
71
|
Solidus/SpreeTDeprecated:
|
66
72
|
Description: 'Checks if Spree.t is being used and replaces it with I18n.t.'
|
67
73
|
Enabled: true
|
68
|
-
VersionAdded: '0.1
|
74
|
+
VersionAdded: '0.1'
|
69
75
|
Reference: 'https://github.com/solidusio/rubocop-solidus/issues/22'
|
data/docs/cops.md
CHANGED
@@ -6,6 +6,7 @@ In the following section you find all available cops:
|
|
6
6
|
#### Department [Solidus](cops_solidus.md)
|
7
7
|
|
8
8
|
* [Solidus/ClassEvalDecorator](cops_solidus.md#solidusclassevaldecorator)
|
9
|
+
* [Solidus/ExistingCardIdDeprecated](cops_solidus.md#solidusexistingcardiddeprecated)
|
9
10
|
* [Solidus/ReimbursementHookDeprecated](cops_solidus.md#solidusreimbursementhookdeprecated)
|
10
11
|
* [Solidus/SpreeCalculatorFreeShippingDeprecated](cops_solidus.md#solidusspreecalculatorfreeshippingdeprecated)
|
11
12
|
* [Solidus/SpreeCalculatorPercentPerItemDeprecated](cops_solidus.md#solidusspreecalculatorpercentperitemdeprecated)
|
data/docs/cops_solidus.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
6
6
|
--- | --- | --- | --- | --- | ---
|
7
|
-
Enabled | Yes | No | 0.1
|
7
|
+
Enabled | Yes | No | 0.1 | - | -
|
8
8
|
|
9
9
|
Solidus suggests a decorator module instead of `class_eval` when overriding some features.
|
10
10
|
This cop finds any `class_eval` and asks to use a decorator module instead.
|
@@ -32,11 +32,39 @@ end
|
|
32
32
|
|
33
33
|
* [https://github.com/solidusio/rubocop-solidus/issues/21](https://github.com/solidusio/rubocop-solidus/issues/21)
|
34
34
|
|
35
|
+
## Solidus/ExistingCardIdDeprecated
|
36
|
+
|
37
|
+
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
38
|
+
--- | --- | --- | --- | --- | ---
|
39
|
+
Enabled | Yes | No | 0.2 | - | 2.2
|
40
|
+
|
41
|
+
This cop finds existing_card_id occurrences and suggest using wallet_payment_source_id instead.
|
42
|
+
|
43
|
+
### Examples
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
# bad
|
47
|
+
{
|
48
|
+
name: payment_method.name,
|
49
|
+
existing_card_id: payment_source.id
|
50
|
+
}
|
51
|
+
|
52
|
+
# good
|
53
|
+
{
|
54
|
+
name: payment_method.name,
|
55
|
+
wallet_payment_source_id: payment_source.wallet.wallet_payment_sources.first.id
|
56
|
+
}
|
57
|
+
```
|
58
|
+
|
59
|
+
### References
|
60
|
+
|
61
|
+
* [https://github.com/solidusio/rubocop-solidus/issues/60](https://github.com/solidusio/rubocop-solidus/issues/60)
|
62
|
+
|
35
63
|
## Solidus/ReimbursementHookDeprecated
|
36
64
|
|
37
65
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
38
66
|
--- | --- | --- | --- | --- | ---
|
39
|
-
Enabled | Yes | No | 0.1
|
67
|
+
Enabled | Yes | No | 0.1 | - | 2.11
|
40
68
|
|
41
69
|
This cop finds reimbursement_success_hooks and reimbursement_failed_hooks calls and
|
42
70
|
asks to remove them and subscribe to reimbursement_reimbursed event instead.
|
@@ -66,7 +94,7 @@ reimbursement_failed_hooks.any?
|
|
66
94
|
|
67
95
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
68
96
|
--- | --- | --- | --- | --- | ---
|
69
|
-
Enabled | Yes | No | 0.1
|
97
|
+
Enabled | Yes | No | 0.1 | - | -
|
70
98
|
|
71
99
|
This cop finds Spree::Calculator::FreeShipping calls.
|
72
100
|
This cop is needed as they have been deprecated in future version.
|
@@ -88,7 +116,7 @@ Spree::Calculator::FreeShipping
|
|
88
116
|
|
89
117
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
90
118
|
--- | --- | --- | --- | --- | ---
|
91
|
-
Enabled | Yes | Yes | 0.1
|
119
|
+
Enabled | Yes | Yes | 0.1 | - | -
|
92
120
|
|
93
121
|
This cop finds Spree::Calculator::PercentPerItem calls.
|
94
122
|
This cop is needed as they have been deprecated in future version.
|
@@ -111,7 +139,7 @@ Spree::Calculator::PercentOnLineItem
|
|
111
139
|
|
112
140
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
113
141
|
--- | --- | --- | --- | --- | ---
|
114
|
-
Enabled | Yes | No | 0.1
|
142
|
+
Enabled | Yes | No | 0.1 | - | -
|
115
143
|
|
116
144
|
This cop finds Spree::Calculator::PriceSack calls.
|
117
145
|
This cop is needed as they have been deprecated in future version.
|
@@ -133,7 +161,7 @@ Spree::Calculator::PriceSack
|
|
133
161
|
|
134
162
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
135
163
|
--- | --- | --- | --- | --- | ---
|
136
|
-
Enabled | Yes | Yes | 0.1
|
164
|
+
Enabled | Yes | Yes | 0.1 | - | 2.2
|
137
165
|
|
138
166
|
This cop finds user.default_credit_card suggest using user.wallet.default_wallet_payment_source.
|
139
167
|
|
@@ -155,7 +183,7 @@ user.wallet.default_wallet_payment_source
|
|
155
183
|
|
156
184
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
157
185
|
--- | --- | --- | --- | --- | ---
|
158
|
-
Enabled | Yes | Yes | 0.1
|
186
|
+
Enabled | Yes | Yes | 0.1 | - | 2.1
|
159
187
|
|
160
188
|
This cop finds Spree::Gateway::Bogus calls and replaces them with the Spree::PaymentMethod::BogusCreditCard.
|
161
189
|
This cop is needed as the Spree::Gateway::Bogus has been deprecated in future version.
|
@@ -182,7 +210,7 @@ Spree::PaymentMethod::BogusCreditCard.create!
|
|
182
210
|
|
183
211
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
184
212
|
--- | --- | --- | --- | --- | ---
|
185
|
-
Enabled | Yes | Yes | 0.1
|
213
|
+
Enabled | Yes | Yes | 0.1 | - | 2.3
|
186
214
|
|
187
215
|
This cop finds icon helper calls and suggest using solidus_icon.
|
188
216
|
|
@@ -204,7 +232,7 @@ helper.solidus_icon('example')
|
|
204
232
|
|
205
233
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
206
234
|
--- | --- | --- | --- | --- | ---
|
207
|
-
Enabled | Yes | No | 0.1
|
235
|
+
Enabled | Yes | No | 0.1 | - | 2.11
|
208
236
|
|
209
237
|
This cop finds Spree::Refund.create(your: attributes) calls and
|
210
238
|
replaces them with the Spree::Refund.create(your: attributes, perform_after_create: false).perform! call.
|
@@ -227,7 +255,7 @@ Spree::Refund.create(your: attributes, perform_after_create: false).perform!
|
|
227
255
|
|
228
256
|
Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged | Required Solidus Version
|
229
257
|
--- | --- | --- | --- | --- | ---
|
230
|
-
Enabled | Yes | Yes | 0.1
|
258
|
+
Enabled | Yes | Yes | 0.1 | - | -
|
231
259
|
|
232
260
|
This cop finds Spree.t method calls and replaces them with the I18n,t method call.
|
233
261
|
This cop is needed as the Spree.t version has been deprecated in future version.
|
@@ -36,7 +36,7 @@ module RuboCop
|
|
36
36
|
def add_offense(*args, **kwargs, &block)
|
37
37
|
return unless affected_solidus_version?
|
38
38
|
|
39
|
-
if Gem::Version.new(RUBY_VERSION)
|
39
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7')
|
40
40
|
super(*args, **kwargs, &block)
|
41
41
|
else
|
42
42
|
super(*args, &block)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Solidus
|
6
|
+
# This cop finds existing_card_id occurrences and suggest using wallet_payment_source_id instead.
|
7
|
+
#
|
8
|
+
# @example
|
9
|
+
#
|
10
|
+
# # bad
|
11
|
+
# {
|
12
|
+
# name: payment_method.name,
|
13
|
+
# existing_card_id: payment_source.id
|
14
|
+
# }
|
15
|
+
#
|
16
|
+
# # good
|
17
|
+
# {
|
18
|
+
# name: payment_method.name,
|
19
|
+
# wallet_payment_source_id: payment_source.wallet.wallet_payment_sources.first.id
|
20
|
+
# }
|
21
|
+
#
|
22
|
+
class ExistingCardIdDeprecated < Base
|
23
|
+
include TargetSolidusVersion
|
24
|
+
minimum_solidus_version 2.2
|
25
|
+
|
26
|
+
MSG = 'Use `wallet_payment_source_id` instead of `existing_card_id`.'
|
27
|
+
|
28
|
+
def_node_matcher :existing_card_id?, <<~PATTERN
|
29
|
+
(send ... :existing_card_id)
|
30
|
+
PATTERN
|
31
|
+
|
32
|
+
def on_send(node)
|
33
|
+
return unless existing_card_id?(node)
|
34
|
+
|
35
|
+
add_offense(node, severity: :warning)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -44,6 +44,7 @@ module RuboCop
|
|
44
44
|
#
|
45
45
|
class SpreeTDeprecated < Base
|
46
46
|
extend AutoCorrector
|
47
|
+
include IgnoredNode
|
47
48
|
MSG = 'Use I18n.t instead of Spree.t which has been deprecated in future versions.'
|
48
49
|
|
49
50
|
RESTRICT_ON_SEND = %i[t].freeze
|
@@ -58,8 +59,11 @@ module RuboCop
|
|
58
59
|
return unless spree_t?(node).include?(:Spree)
|
59
60
|
|
60
61
|
add_offense(node) do |corrector|
|
62
|
+
next if part_of_ignored_node?(node)
|
63
|
+
|
61
64
|
corrector.replace(node, corrected_statement(node))
|
62
65
|
end
|
66
|
+
ignore_node(node)
|
63
67
|
end
|
64
68
|
|
65
69
|
# rubocop:disable Metrics/MethodLength
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require_relative 'mixin/target_solidus_version'
|
4
4
|
|
5
5
|
require_relative 'solidus/class_eval_decorator'
|
6
|
+
require_relative 'solidus/existing_card_id_deprecated'
|
6
7
|
require_relative 'solidus/reimbursement_hook_deprecated'
|
7
8
|
require_relative 'solidus/spree_calculator_free_shipping_deprecated'
|
8
9
|
require_relative 'solidus/spree_calculator_percent_per_item_deprecated'
|
data/relnotes/v0.2.0.md
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
### New features
|
2
|
+
|
3
|
+
* [#60](https://github.com/solidusio/rubocop-solidus/issues/60): Create new cop to check existing_card_id. ([@MassimilianoLattanzio][])
|
4
|
+
|
5
|
+
### Bug fixes
|
6
|
+
|
7
|
+
* [#60](https://github.com/solidusio/rubocop-solidus/issues/60): Fix overridden add_offense method. ([@MassimilianoLattanzio][])
|
8
|
+
|
9
|
+
[@MassimilianoLattanzio]: https://github.com/MassimilianoLattanzio
|
data/rubocop-solidus.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.metadata['homepage_uri'] = spec.homepage
|
21
21
|
spec.metadata['source_code_uri'] = 'https://www.github.com/solidusio/rubocop-solidus'
|
22
|
-
spec.metadata['changelog_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/
|
23
|
-
spec.metadata['documentation_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/
|
22
|
+
spec.metadata['changelog_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/main/CHANGELOG.md'
|
23
|
+
spec.metadata['documentation_uri'] = 'https://www.github.com/solidusio/rubocop-solidus/blob/main/docs/cops.md'
|
24
24
|
|
25
25
|
# Specify which files should be added to the gem when it is released.
|
26
26
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
data/tasks/changelog.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# Changelog utility
|
4
4
|
class Changelog
|
5
5
|
ENTRIES_PATH = 'changelog/'
|
6
|
-
FIRST_HEADER = /#{Regexp.escape("##
|
6
|
+
FIRST_HEADER = /#{Regexp.escape("## main (unreleased)\n")}/m.freeze
|
7
7
|
ENTRIES_PATH_TEMPLATE = "#{ENTRIES_PATH}%<type>s_%<name>s.md"
|
8
8
|
TYPE_REGEXP = /#{Regexp.escape(ENTRIES_PATH)}([a-z]+)_/.freeze
|
9
9
|
TYPE_TO_HEADER = { new: 'New features', fix: 'Bug fixes', change: 'Changes' }.freeze
|
data/tasks/cut_release.rake
CHANGED
@@ -12,11 +12,11 @@ namespace :cut_release do
|
|
12
12
|
|
13
13
|
def add_header_to_changelog(version)
|
14
14
|
changelog = File.read('CHANGELOG.md')
|
15
|
-
head, tail = changelog.split("##
|
15
|
+
head, tail = changelog.split("## main (unreleased)\n\n", 2)
|
16
16
|
|
17
17
|
File.open('CHANGELOG.md', 'w') do |f|
|
18
18
|
f << head
|
19
|
-
f << "##
|
19
|
+
f << "## main (unreleased)\n\n"
|
20
20
|
f << "## #{version} (#{Time.now.strftime('%F')})\n\n"
|
21
21
|
f << tail
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-solidus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piyushswain
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- lib/rubocop-solidus.rb
|
49
49
|
- lib/rubocop/cop/mixin/target_solidus_version.rb
|
50
50
|
- lib/rubocop/cop/solidus/class_eval_decorator.rb
|
51
|
+
- lib/rubocop/cop/solidus/existing_card_id_deprecated.rb
|
51
52
|
- lib/rubocop/cop/solidus/reimbursement_hook_deprecated.rb
|
52
53
|
- lib/rubocop/cop/solidus/spree_calculator_free_shipping_deprecated.rb
|
53
54
|
- lib/rubocop/cop/solidus/spree_calculator_percent_per_item_deprecated.rb
|
@@ -64,6 +65,7 @@ files:
|
|
64
65
|
- relnotes/v0.1.2.md
|
65
66
|
- relnotes/v0.1.3.md
|
66
67
|
- relnotes/v0.1.4.md
|
68
|
+
- relnotes/v0.2.0.md
|
67
69
|
- rubocop-solidus.gemspec
|
68
70
|
- sig/rubocop/solidus.rbs
|
69
71
|
- tasks/changelog.rake
|
@@ -76,8 +78,8 @@ licenses:
|
|
76
78
|
metadata:
|
77
79
|
homepage_uri: https://www.github.com/solidusio/rubocop-solidus
|
78
80
|
source_code_uri: https://www.github.com/solidusio/rubocop-solidus
|
79
|
-
changelog_uri: https://www.github.com/solidusio/rubocop-solidus/blob/
|
80
|
-
documentation_uri: https://www.github.com/solidusio/rubocop-solidus/blob/
|
81
|
+
changelog_uri: https://www.github.com/solidusio/rubocop-solidus/blob/main/CHANGELOG.md
|
82
|
+
documentation_uri: https://www.github.com/solidusio/rubocop-solidus/blob/main/docs/cops.md
|
81
83
|
post_install_message:
|
82
84
|
rdoc_options: []
|
83
85
|
require_paths:
|
@@ -93,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
95
|
- !ruby/object:Gem::Version
|
94
96
|
version: '0'
|
95
97
|
requirements: []
|
96
|
-
rubygems_version: 3.4.
|
98
|
+
rubygems_version: 3.4.21
|
97
99
|
signing_key:
|
98
100
|
specification_version: 4
|
99
101
|
summary: Automatic Solidus code style checking tool.
|