dep_shield 0.1.2 → 0.3.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 +12 -0
- data/docs/README.md +18 -1
- data/gemfiles/rails_6_0.gemfile +2 -1
- data/gemfiles/rails_6_0.gemfile.lock +45 -16
- data/gemfiles/rails_6_1.gemfile +2 -1
- data/gemfiles/rails_6_1.gemfile.lock +45 -16
- data/gemfiles/rails_7_0.gemfile +2 -1
- data/gemfiles/rails_7_0.gemfile.lock +45 -16
- data/lib/dep_shield/railtie.rb +17 -0
- data/lib/dep_shield/todos.rb +11 -11
- data/lib/dep_shield/version.rb +1 -1
- metadata +61 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baba0326467a70924aa2670a65d8a294d8695e23ab965a15d14c07cde911bd9d
|
4
|
+
data.tar.gz: bc304f84b170cb9b0c2fe0935b3703aea81b74270d28f3b615a5c7650755c869
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c31219266c14b05b3dc28742f92b795620677bf0d5ee284359e66a7e523465060f23febd434e55b26813984f8ec51acc3df7c9140697e717e914c0ed8c8254e
|
7
|
+
data.tar.gz: ebc6f537ddad6fa03949f682aeb25c2f6af2557b4dac974d956d9f658c055eb8ba77ffece21ef13a3a11a4a5a5022111f3cc6314176d7622cbcbec583063dfb0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.3.0]
|
4
|
+
|
5
|
+
- Subscribe to deprecation.rails notifications from railtie
|
6
|
+
|
7
|
+
## [0.2.0]
|
8
|
+
|
9
|
+
- Dynamically load todo lists
|
10
|
+
|
11
|
+
## [0.1.1]
|
12
|
+
|
13
|
+
- Fixes / navigates around different returns for YAML.load_file
|
14
|
+
|
3
15
|
## [0.1.0] - 2024-01-17
|
4
16
|
|
5
17
|
- Initial release
|
data/docs/README.md
CHANGED
@@ -4,6 +4,12 @@ Introducing DepShield, your go-to Ruby gem for proactive deprecation management
|
|
4
4
|
|
5
5
|
With DepShield, developers can stay ahead of the curve by receiving real-time alerts about deprecated code, ensuring a smoother transition to future updates. Tailor your development and demo environments to raise alarms, preventing the introduction of new deprecations. In addition, DepShield offers the flexibility to configure self-reporting mechanisms, allowing seamless issue notifications, configurable by environment Say goodbye to unexpected deprecation surprises and embrace a more streamlined and informed coding experience with DepShield!
|
6
6
|
|
7
|
+
## Setup
|
8
|
+
|
9
|
+
After installing DepShield, load any todo lists in your application with:
|
10
|
+
|
11
|
+
`DepShield.todos.load("path-to-deprecation_todos.yml")`
|
12
|
+
|
7
13
|
## Usage
|
8
14
|
|
9
15
|
`DepShield#raise_or_capture!` is used to mark methods as deprecated. When called, it will intelligently warn or raise exceptions to alert developers to the deprecated activity. The method expects two arguments, a `name` (ie, the name of the deprecation you're introducing), and a `message` (usually information about what is deprecated and how to fix it). Marking something as deprecated is pretty simple:
|
@@ -22,10 +28,21 @@ This is used in conjuction with NitroConfig to define how different environment
|
|
22
28
|
Option A: the result of this is a logged warning every time the method is called.
|
23
29
|
Option B: this will raise and notify our error catcher (Sentry).
|
24
30
|
|
25
|
-
If a developer needs to bypass this/defer fixing the deprecation to a future date, the call can be "grandfathered" by adding this information to the allowlist in `.deprecation_todo.yml` in the application/component that hosts the deprecated reference. For example, if you have a method in the `authors` component that references `Books.category`:
|
31
|
+
If a developer needs to bypass this/defer fixing the deprecation to a future date, the call can be "grandfathered" by adding this information to the allowlist in a `.deprecation_todo.yml` file in the application/component that hosts the deprecated reference. For example, if you have a method in the `authors` component that references `Books.category`:
|
26
32
|
|
27
33
|
```ruby
|
28
34
|
# components/authors/lib/book_information.rb
|
29
35
|
|
30
36
|
book_category = Books.category
|
31
37
|
```
|
38
|
+
|
39
|
+
You could disable this with:
|
40
|
+
|
41
|
+
```yml
|
42
|
+
# components/authors/.deprecation_todo.yml
|
43
|
+
|
44
|
+
books_default_category:
|
45
|
+
- components/authors/lib/book_information.rb
|
46
|
+
```
|
47
|
+
|
48
|
+
More details and another example can be found [here](https://github.com/powerhome/power-tools/blob/main/packages/dep_shield/spec/internal/config/.deprecation_todo.yml)
|
data/gemfiles/rails_6_0.gemfile
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../rubocop-powerhome
|
3
|
+
specs:
|
4
|
+
rubocop-powerhome (0.5.2)
|
5
|
+
rubocop (~> 1.52.0)
|
6
|
+
rubocop-performance
|
7
|
+
rubocop-rails
|
8
|
+
rubocop-rake
|
9
|
+
rubocop-rspec
|
10
|
+
|
1
11
|
PATH
|
2
12
|
remote: ..
|
3
13
|
specs:
|
4
|
-
dep_shield (0.
|
14
|
+
dep_shield (0.3.0)
|
15
|
+
nitro_config
|
16
|
+
railties (>= 6.0.6.1, <= 7.0.6)
|
17
|
+
sentry-rails (= 5.5.0)
|
5
18
|
sentry-ruby (= 5.5.0)
|
6
19
|
|
7
20
|
GEM
|
@@ -68,6 +81,10 @@ GEM
|
|
68
81
|
thor (>= 0.14.0)
|
69
82
|
ast (2.4.2)
|
70
83
|
builder (3.2.4)
|
84
|
+
combustion (1.4.0)
|
85
|
+
activesupport (>= 3.0.0)
|
86
|
+
railties (>= 3.0.0)
|
87
|
+
thor (>= 0.14.6)
|
71
88
|
concurrent-ruby (1.2.3)
|
72
89
|
crass (1.0.6)
|
73
90
|
date (3.3.4)
|
@@ -78,7 +95,6 @@ GEM
|
|
78
95
|
i18n (1.14.1)
|
79
96
|
concurrent-ruby (~> 1.0)
|
80
97
|
json (2.7.1)
|
81
|
-
language_server-protocol (3.17.0.3)
|
82
98
|
license_finder (7.1.0)
|
83
99
|
bundler
|
84
100
|
rubyzip (>= 1, < 3)
|
@@ -108,10 +124,14 @@ GEM
|
|
108
124
|
net-smtp (0.4.0.1)
|
109
125
|
net-protocol
|
110
126
|
nio4r (2.7.0)
|
111
|
-
|
127
|
+
nitro_config (0.2.0)
|
128
|
+
activesupport (>= 5.2.8.1)
|
129
|
+
nokogiri (1.15.5-arm64-darwin)
|
130
|
+
racc (~> 1.4)
|
131
|
+
nokogiri (1.15.5-x86_64-linux)
|
112
132
|
racc (~> 1.4)
|
113
133
|
parallel (1.24.0)
|
114
|
-
parser (3.3.0.
|
134
|
+
parser (3.3.0.5)
|
115
135
|
ast (~> 2.4.1)
|
116
136
|
racc
|
117
137
|
racc (1.7.3)
|
@@ -162,16 +182,23 @@ GEM
|
|
162
182
|
rspec-mocks (3.12.6)
|
163
183
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
184
|
rspec-support (~> 3.12.0)
|
185
|
+
rspec-rails (5.1.2)
|
186
|
+
actionpack (>= 5.2)
|
187
|
+
activesupport (>= 5.2)
|
188
|
+
railties (>= 5.2)
|
189
|
+
rspec-core (~> 3.10)
|
190
|
+
rspec-expectations (~> 3.10)
|
191
|
+
rspec-mocks (~> 3.10)
|
192
|
+
rspec-support (~> 3.10)
|
165
193
|
rspec-support (3.12.1)
|
166
|
-
rubocop (1.
|
194
|
+
rubocop (1.52.1)
|
167
195
|
json (~> 2.3)
|
168
|
-
language_server-protocol (>= 3.17.0)
|
169
196
|
parallel (~> 1.10)
|
170
|
-
parser (>= 3.
|
197
|
+
parser (>= 3.2.2.3)
|
171
198
|
rainbow (>= 2.2.2, < 4.0)
|
172
199
|
regexp_parser (>= 1.8, < 3.0)
|
173
200
|
rexml (>= 3.2.5, < 4.0)
|
174
|
-
rubocop-ast (>= 1.
|
201
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
175
202
|
ruby-progressbar (~> 1.7)
|
176
203
|
unicode-display_width (>= 2.4.0, < 3.0)
|
177
204
|
rubocop-ast (1.30.0)
|
@@ -183,12 +210,6 @@ GEM
|
|
183
210
|
rubocop-performance (1.20.2)
|
184
211
|
rubocop (>= 1.48.1, < 2.0)
|
185
212
|
rubocop-ast (>= 1.30.0, < 2.0)
|
186
|
-
rubocop-powerhome (0.5.0)
|
187
|
-
rubocop
|
188
|
-
rubocop-performance
|
189
|
-
rubocop-rails
|
190
|
-
rubocop-rake
|
191
|
-
rubocop-rspec
|
192
213
|
rubocop-rails (2.23.1)
|
193
214
|
activesupport (>= 4.2.0)
|
194
215
|
rack (>= 1.1)
|
@@ -202,6 +223,9 @@ GEM
|
|
202
223
|
rubocop-factory_bot (~> 2.22)
|
203
224
|
ruby-progressbar (1.13.0)
|
204
225
|
rubyzip (2.3.2)
|
226
|
+
sentry-rails (5.5.0)
|
227
|
+
railties (>= 5.0)
|
228
|
+
sentry-ruby (~> 5.5.0)
|
205
229
|
sentry-ruby (5.5.0)
|
206
230
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
207
231
|
sprockets (4.2.1)
|
@@ -211,6 +235,7 @@ GEM
|
|
211
235
|
actionpack (>= 5.2)
|
212
236
|
activesupport (>= 5.2)
|
213
237
|
sprockets (>= 3.0.0)
|
238
|
+
sqlite3 (1.4.4)
|
214
239
|
thor (1.3.0)
|
215
240
|
thread_safe (0.3.6)
|
216
241
|
timeout (0.4.1)
|
@@ -228,16 +253,20 @@ GEM
|
|
228
253
|
|
229
254
|
PLATFORMS
|
230
255
|
arm64-darwin
|
256
|
+
x86_64-linux
|
231
257
|
|
232
258
|
DEPENDENCIES
|
233
259
|
appraisal (~> 2.5.0)
|
260
|
+
combustion (~> 1.4)
|
234
261
|
dep_shield!
|
235
262
|
license_finder (>= 7.0)
|
263
|
+
nokogiri (< 1.16)
|
236
264
|
rails (= 6.0.6.1)
|
237
265
|
rake (~> 13.0)
|
238
266
|
rspec (~> 3.0)
|
239
|
-
|
240
|
-
rubocop-powerhome
|
267
|
+
rspec-rails (~> 5.1.2)
|
268
|
+
rubocop-powerhome!
|
269
|
+
sqlite3 (~> 1.4.2)
|
241
270
|
|
242
271
|
BUNDLED WITH
|
243
272
|
2.5.4
|
data/gemfiles/rails_6_1.gemfile
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../rubocop-powerhome
|
3
|
+
specs:
|
4
|
+
rubocop-powerhome (0.5.2)
|
5
|
+
rubocop (~> 1.52.0)
|
6
|
+
rubocop-performance
|
7
|
+
rubocop-rails
|
8
|
+
rubocop-rake
|
9
|
+
rubocop-rspec
|
10
|
+
|
1
11
|
PATH
|
2
12
|
remote: ..
|
3
13
|
specs:
|
4
|
-
dep_shield (0.
|
14
|
+
dep_shield (0.3.0)
|
15
|
+
nitro_config
|
16
|
+
railties (>= 6.0.6.1, <= 7.0.6)
|
17
|
+
sentry-rails (= 5.5.0)
|
5
18
|
sentry-ruby (= 5.5.0)
|
6
19
|
|
7
20
|
GEM
|
@@ -72,6 +85,10 @@ GEM
|
|
72
85
|
thor (>= 0.14.0)
|
73
86
|
ast (2.4.2)
|
74
87
|
builder (3.2.4)
|
88
|
+
combustion (1.4.0)
|
89
|
+
activesupport (>= 3.0.0)
|
90
|
+
railties (>= 3.0.0)
|
91
|
+
thor (>= 0.14.6)
|
75
92
|
concurrent-ruby (1.2.3)
|
76
93
|
crass (1.0.6)
|
77
94
|
date (3.3.4)
|
@@ -82,7 +99,6 @@ GEM
|
|
82
99
|
i18n (1.14.1)
|
83
100
|
concurrent-ruby (~> 1.0)
|
84
101
|
json (2.7.1)
|
85
|
-
language_server-protocol (3.17.0.3)
|
86
102
|
license_finder (7.1.0)
|
87
103
|
bundler
|
88
104
|
rubyzip (>= 1, < 3)
|
@@ -112,10 +128,14 @@ GEM
|
|
112
128
|
net-smtp (0.4.0.1)
|
113
129
|
net-protocol
|
114
130
|
nio4r (2.7.0)
|
115
|
-
|
131
|
+
nitro_config (0.2.0)
|
132
|
+
activesupport (>= 5.2.8.1)
|
133
|
+
nokogiri (1.15.5-arm64-darwin)
|
134
|
+
racc (~> 1.4)
|
135
|
+
nokogiri (1.15.5-x86_64-linux)
|
116
136
|
racc (~> 1.4)
|
117
137
|
parallel (1.24.0)
|
118
|
-
parser (3.3.0.
|
138
|
+
parser (3.3.0.5)
|
119
139
|
ast (~> 2.4.1)
|
120
140
|
racc
|
121
141
|
racc (1.7.3)
|
@@ -166,16 +186,23 @@ GEM
|
|
166
186
|
rspec-mocks (3.12.6)
|
167
187
|
diff-lcs (>= 1.2.0, < 2.0)
|
168
188
|
rspec-support (~> 3.12.0)
|
189
|
+
rspec-rails (5.1.2)
|
190
|
+
actionpack (>= 5.2)
|
191
|
+
activesupport (>= 5.2)
|
192
|
+
railties (>= 5.2)
|
193
|
+
rspec-core (~> 3.10)
|
194
|
+
rspec-expectations (~> 3.10)
|
195
|
+
rspec-mocks (~> 3.10)
|
196
|
+
rspec-support (~> 3.10)
|
169
197
|
rspec-support (3.12.1)
|
170
|
-
rubocop (1.
|
198
|
+
rubocop (1.52.1)
|
171
199
|
json (~> 2.3)
|
172
|
-
language_server-protocol (>= 3.17.0)
|
173
200
|
parallel (~> 1.10)
|
174
|
-
parser (>= 3.
|
201
|
+
parser (>= 3.2.2.3)
|
175
202
|
rainbow (>= 2.2.2, < 4.0)
|
176
203
|
regexp_parser (>= 1.8, < 3.0)
|
177
204
|
rexml (>= 3.2.5, < 4.0)
|
178
|
-
rubocop-ast (>= 1.
|
205
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
179
206
|
ruby-progressbar (~> 1.7)
|
180
207
|
unicode-display_width (>= 2.4.0, < 3.0)
|
181
208
|
rubocop-ast (1.30.0)
|
@@ -187,12 +214,6 @@ GEM
|
|
187
214
|
rubocop-performance (1.20.2)
|
188
215
|
rubocop (>= 1.48.1, < 2.0)
|
189
216
|
rubocop-ast (>= 1.30.0, < 2.0)
|
190
|
-
rubocop-powerhome (0.5.0)
|
191
|
-
rubocop
|
192
|
-
rubocop-performance
|
193
|
-
rubocop-rails
|
194
|
-
rubocop-rake
|
195
|
-
rubocop-rspec
|
196
217
|
rubocop-rails (2.23.1)
|
197
218
|
activesupport (>= 4.2.0)
|
198
219
|
rack (>= 1.1)
|
@@ -206,6 +227,9 @@ GEM
|
|
206
227
|
rubocop-factory_bot (~> 2.22)
|
207
228
|
ruby-progressbar (1.13.0)
|
208
229
|
rubyzip (2.3.2)
|
230
|
+
sentry-rails (5.5.0)
|
231
|
+
railties (>= 5.0)
|
232
|
+
sentry-ruby (~> 5.5.0)
|
209
233
|
sentry-ruby (5.5.0)
|
210
234
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
211
235
|
sprockets (4.2.1)
|
@@ -215,6 +239,7 @@ GEM
|
|
215
239
|
actionpack (>= 5.2)
|
216
240
|
activesupport (>= 5.2)
|
217
241
|
sprockets (>= 3.0.0)
|
242
|
+
sqlite3 (1.4.4)
|
218
243
|
thor (1.3.0)
|
219
244
|
timeout (0.4.1)
|
220
245
|
tomlrb (2.0.3)
|
@@ -231,16 +256,20 @@ GEM
|
|
231
256
|
|
232
257
|
PLATFORMS
|
233
258
|
arm64-darwin
|
259
|
+
x86_64-linux
|
234
260
|
|
235
261
|
DEPENDENCIES
|
236
262
|
appraisal (~> 2.5.0)
|
263
|
+
combustion (~> 1.4)
|
237
264
|
dep_shield!
|
238
265
|
license_finder (>= 7.0)
|
266
|
+
nokogiri (< 1.16)
|
239
267
|
rails (= 6.1.7.4)
|
240
268
|
rake (~> 13.0)
|
241
269
|
rspec (~> 3.0)
|
242
|
-
|
243
|
-
rubocop-powerhome
|
270
|
+
rspec-rails (~> 5.1.2)
|
271
|
+
rubocop-powerhome!
|
272
|
+
sqlite3 (~> 1.4.2)
|
244
273
|
|
245
274
|
BUNDLED WITH
|
246
275
|
2.5.4
|
data/gemfiles/rails_7_0.gemfile
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../rubocop-powerhome
|
3
|
+
specs:
|
4
|
+
rubocop-powerhome (0.5.2)
|
5
|
+
rubocop (~> 1.52.0)
|
6
|
+
rubocop-performance
|
7
|
+
rubocop-rails
|
8
|
+
rubocop-rake
|
9
|
+
rubocop-rspec
|
10
|
+
|
1
11
|
PATH
|
2
12
|
remote: ..
|
3
13
|
specs:
|
4
|
-
dep_shield (0.
|
14
|
+
dep_shield (0.3.0)
|
15
|
+
nitro_config
|
16
|
+
railties (>= 6.0.6.1, <= 7.0.6)
|
17
|
+
sentry-rails (= 5.5.0)
|
5
18
|
sentry-ruby (= 5.5.0)
|
6
19
|
|
7
20
|
GEM
|
@@ -78,6 +91,10 @@ GEM
|
|
78
91
|
thor (>= 0.14.0)
|
79
92
|
ast (2.4.2)
|
80
93
|
builder (3.2.4)
|
94
|
+
combustion (1.4.0)
|
95
|
+
activesupport (>= 3.0.0)
|
96
|
+
railties (>= 3.0.0)
|
97
|
+
thor (>= 0.14.6)
|
81
98
|
concurrent-ruby (1.2.3)
|
82
99
|
crass (1.0.6)
|
83
100
|
date (3.3.4)
|
@@ -88,7 +105,6 @@ GEM
|
|
88
105
|
i18n (1.14.1)
|
89
106
|
concurrent-ruby (~> 1.0)
|
90
107
|
json (2.7.1)
|
91
|
-
language_server-protocol (3.17.0.3)
|
92
108
|
license_finder (7.1.0)
|
93
109
|
bundler
|
94
110
|
rubyzip (>= 1, < 3)
|
@@ -118,10 +134,14 @@ GEM
|
|
118
134
|
net-smtp (0.4.0.1)
|
119
135
|
net-protocol
|
120
136
|
nio4r (2.7.0)
|
121
|
-
|
137
|
+
nitro_config (0.2.0)
|
138
|
+
activesupport (>= 5.2.8.1)
|
139
|
+
nokogiri (1.15.5-arm64-darwin)
|
140
|
+
racc (~> 1.4)
|
141
|
+
nokogiri (1.15.5-x86_64-linux)
|
122
142
|
racc (~> 1.4)
|
123
143
|
parallel (1.24.0)
|
124
|
-
parser (3.3.0.
|
144
|
+
parser (3.3.0.5)
|
125
145
|
ast (~> 2.4.1)
|
126
146
|
racc
|
127
147
|
racc (1.7.3)
|
@@ -172,16 +192,23 @@ GEM
|
|
172
192
|
rspec-mocks (3.12.6)
|
173
193
|
diff-lcs (>= 1.2.0, < 2.0)
|
174
194
|
rspec-support (~> 3.12.0)
|
195
|
+
rspec-rails (5.1.2)
|
196
|
+
actionpack (>= 5.2)
|
197
|
+
activesupport (>= 5.2)
|
198
|
+
railties (>= 5.2)
|
199
|
+
rspec-core (~> 3.10)
|
200
|
+
rspec-expectations (~> 3.10)
|
201
|
+
rspec-mocks (~> 3.10)
|
202
|
+
rspec-support (~> 3.10)
|
175
203
|
rspec-support (3.12.1)
|
176
|
-
rubocop (1.
|
204
|
+
rubocop (1.52.1)
|
177
205
|
json (~> 2.3)
|
178
|
-
language_server-protocol (>= 3.17.0)
|
179
206
|
parallel (~> 1.10)
|
180
|
-
parser (>= 3.
|
207
|
+
parser (>= 3.2.2.3)
|
181
208
|
rainbow (>= 2.2.2, < 4.0)
|
182
209
|
regexp_parser (>= 1.8, < 3.0)
|
183
210
|
rexml (>= 3.2.5, < 4.0)
|
184
|
-
rubocop-ast (>= 1.
|
211
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
185
212
|
ruby-progressbar (~> 1.7)
|
186
213
|
unicode-display_width (>= 2.4.0, < 3.0)
|
187
214
|
rubocop-ast (1.30.0)
|
@@ -193,12 +220,6 @@ GEM
|
|
193
220
|
rubocop-performance (1.20.2)
|
194
221
|
rubocop (>= 1.48.1, < 2.0)
|
195
222
|
rubocop-ast (>= 1.30.0, < 2.0)
|
196
|
-
rubocop-powerhome (0.5.0)
|
197
|
-
rubocop
|
198
|
-
rubocop-performance
|
199
|
-
rubocop-rails
|
200
|
-
rubocop-rake
|
201
|
-
rubocop-rspec
|
202
223
|
rubocop-rails (2.23.1)
|
203
224
|
activesupport (>= 4.2.0)
|
204
225
|
rack (>= 1.1)
|
@@ -212,8 +233,12 @@ GEM
|
|
212
233
|
rubocop-factory_bot (~> 2.22)
|
213
234
|
ruby-progressbar (1.13.0)
|
214
235
|
rubyzip (2.3.2)
|
236
|
+
sentry-rails (5.5.0)
|
237
|
+
railties (>= 5.0)
|
238
|
+
sentry-ruby (~> 5.5.0)
|
215
239
|
sentry-ruby (5.5.0)
|
216
240
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
241
|
+
sqlite3 (1.4.4)
|
217
242
|
thor (1.3.0)
|
218
243
|
timeout (0.4.1)
|
219
244
|
tomlrb (2.0.3)
|
@@ -230,16 +255,20 @@ GEM
|
|
230
255
|
|
231
256
|
PLATFORMS
|
232
257
|
arm64-darwin
|
258
|
+
x86_64-linux
|
233
259
|
|
234
260
|
DEPENDENCIES
|
235
261
|
appraisal (~> 2.5.0)
|
262
|
+
combustion (~> 1.4)
|
236
263
|
dep_shield!
|
237
264
|
license_finder (>= 7.0)
|
265
|
+
nokogiri (< 1.16)
|
238
266
|
rails (= 7.0.6)
|
239
267
|
rake (~> 13.0)
|
240
268
|
rspec (~> 3.0)
|
241
|
-
|
242
|
-
rubocop-powerhome
|
269
|
+
rspec-rails (~> 5.1.2)
|
270
|
+
rubocop-powerhome!
|
271
|
+
sqlite3 (~> 1.4.2)
|
243
272
|
|
244
273
|
BUNDLED WITH
|
245
274
|
2.5.4
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "dep_shield"
|
4
|
+
|
5
|
+
module DepShield
|
6
|
+
# Ties DepShield to rails deprecations system
|
7
|
+
class Railtie < Rails::Railtie
|
8
|
+
initializer "dep_shield.subscribe" do
|
9
|
+
ActiveSupport::Notifications.subscribe("deprecation.rails") do |name, _start, _finish, _id, payload|
|
10
|
+
message = payload[:message] || "this is deprecated in rails"
|
11
|
+
callstack = payload[:callstack] || caller
|
12
|
+
|
13
|
+
DepShield.raise_or_capture!(name: name, message: message, callstack: callstack)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/dep_shield/todos.rb
CHANGED
@@ -2,23 +2,23 @@
|
|
2
2
|
|
3
3
|
module DepShield
|
4
4
|
class Todos
|
5
|
-
def
|
6
|
-
@todo_list
|
7
|
-
|
5
|
+
def initialize
|
6
|
+
@todo_list = {}
|
7
|
+
end
|
8
|
+
|
9
|
+
def load(pathname)
|
10
|
+
return unless File.exist?(pathname)
|
8
11
|
|
9
|
-
|
10
|
-
todos = YAML.load_file(path) || {}
|
12
|
+
list = YAML.load_file(pathname) || {}
|
11
13
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
16
|
-
end
|
14
|
+
list.each do |feature_name, dep_todos|
|
15
|
+
@todo_list[feature_name] ||= []
|
16
|
+
@todo_list[feature_name] += dep_todos
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
def allowed?(name, stack)
|
21
|
-
todo_list.fetch(name, []).any? do |allowed_file|
|
21
|
+
@todo_list.fetch(name, []).any? do |allowed_file|
|
22
22
|
stack.join("\n").include? allowed_file
|
23
23
|
end
|
24
24
|
end
|
data/lib/dep_shield/version.rb
CHANGED
metadata
CHANGED
@@ -1,161 +1,161 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dep_shield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jill Klang
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: nitro_config
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
type: :
|
19
|
+
version: '0'
|
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:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
|
33
|
+
version: 6.0.6.1
|
34
|
+
- - "<="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 7.0.6
|
37
|
+
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
43
|
+
version: 6.0.6.1
|
44
|
+
- - "<="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 7.0.6
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: sentry-rails
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - '='
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
48
|
-
type: :
|
53
|
+
version: 5.5.0
|
54
|
+
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- -
|
58
|
+
- - '='
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
60
|
+
version: 5.5.0
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: sentry-ruby
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- -
|
65
|
+
- - '='
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
type: :
|
67
|
+
version: 5.5.0
|
68
|
+
type: :runtime
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- -
|
72
|
+
- - '='
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
74
|
+
version: 5.5.0
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
76
|
+
name: appraisal
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: 5.
|
81
|
+
version: 2.5.0
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: 5.
|
88
|
+
version: 2.5.0
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
90
|
+
name: combustion
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
93
|
- - "~>"
|
88
94
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.4
|
95
|
+
version: '1.4'
|
90
96
|
type: :development
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
100
|
- - "~>"
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.4
|
102
|
+
version: '1.4'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
104
|
+
name: license_finder
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
107
|
- - ">="
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :
|
109
|
+
version: '7.0'
|
110
|
+
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
114
|
- - ">="
|
109
115
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
116
|
+
version: '7.0'
|
111
117
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
118
|
+
name: rspec
|
113
119
|
requirement: !ruby/object:Gem::Requirement
|
114
120
|
requirements:
|
115
|
-
- - "
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 6.0.6.1
|
118
|
-
- - "<"
|
121
|
+
- - "~>"
|
119
122
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
121
|
-
type: :
|
123
|
+
version: '3.0'
|
124
|
+
type: :development
|
122
125
|
prerelease: false
|
123
126
|
version_requirements: !ruby/object:Gem::Requirement
|
124
127
|
requirements:
|
125
|
-
- - "
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: 6.0.6.1
|
128
|
-
- - "<"
|
128
|
+
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '3.0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
132
|
+
name: rspec-rails
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- -
|
135
|
+
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: 5.
|
138
|
-
type: :
|
137
|
+
version: 5.1.2
|
138
|
+
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- -
|
142
|
+
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: 5.
|
144
|
+
version: 5.1.2
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
|
-
name:
|
146
|
+
name: sqlite3
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- -
|
149
|
+
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
152
|
-
type: :
|
151
|
+
version: 1.4.2
|
152
|
+
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- -
|
156
|
+
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
158
|
+
version: 1.4.2
|
159
159
|
description: Enable alerts about deprecated features & prevent new ones from being
|
160
160
|
introduced.
|
161
161
|
email:
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- gemfiles/rails_7_0.gemfile.lock
|
181
181
|
- lib/dep_shield.rb
|
182
182
|
- lib/dep_shield/deprecation.rb
|
183
|
+
- lib/dep_shield/railtie.rb
|
183
184
|
- lib/dep_shield/todos.rb
|
184
185
|
- lib/dep_shield/version.rb
|
185
186
|
- sig/dep_shield.rbs
|