dep_shield 0.1.2 → 0.2.1
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/docs/README.md +18 -1
- data/gemfiles/rails_6_0.gemfile +2 -1
- data/gemfiles/rails_6_0.gemfile.lock +42 -16
- data/gemfiles/rails_6_1.gemfile +2 -1
- data/gemfiles/rails_6_1.gemfile.lock +42 -16
- data/gemfiles/rails_7_0.gemfile +2 -1
- data/gemfiles/rails_7_0.gemfile.lock +42 -16
- data/lib/dep_shield/todos.rb +11 -11
- data/lib/dep_shield/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea15bb68f676b872a7bf649edca7ca6854ba75786b21a1363a68708b30c39021
|
4
|
+
data.tar.gz: b1bf2a61c8fda10778f56af9c3e7d501bdca69380888754f5f852082f7819dc7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baf5641dc06c626d41bc7baf1daa5d4189b612db1ba013940aab367862eae90a825649024b9a3149cba56879b199ffe14f2b23b37aaf810506b8a918e1c6c3fa
|
7
|
+
data.tar.gz: 7467311ce5925534b92ef04d5db9d31c2ca4797d12cc424f56687a9d35db8d67a0a2da82dae8c406996e7db69329ca83db536eca41cafdf838da9b47feb36a58
|
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.1
|
14
|
+
dep_shield (0.2.1)
|
15
|
+
nitro_config
|
16
|
+
rails (>= 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,12 @@ 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)
|
112
130
|
racc (~> 1.4)
|
113
131
|
parallel (1.24.0)
|
114
|
-
parser (3.3.0.
|
132
|
+
parser (3.3.0.5)
|
115
133
|
ast (~> 2.4.1)
|
116
134
|
racc
|
117
135
|
racc (1.7.3)
|
@@ -162,16 +180,23 @@ GEM
|
|
162
180
|
rspec-mocks (3.12.6)
|
163
181
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
182
|
rspec-support (~> 3.12.0)
|
183
|
+
rspec-rails (5.1.2)
|
184
|
+
actionpack (>= 5.2)
|
185
|
+
activesupport (>= 5.2)
|
186
|
+
railties (>= 5.2)
|
187
|
+
rspec-core (~> 3.10)
|
188
|
+
rspec-expectations (~> 3.10)
|
189
|
+
rspec-mocks (~> 3.10)
|
190
|
+
rspec-support (~> 3.10)
|
165
191
|
rspec-support (3.12.1)
|
166
|
-
rubocop (1.
|
192
|
+
rubocop (1.52.1)
|
167
193
|
json (~> 2.3)
|
168
|
-
language_server-protocol (>= 3.17.0)
|
169
194
|
parallel (~> 1.10)
|
170
|
-
parser (>= 3.
|
195
|
+
parser (>= 3.2.2.3)
|
171
196
|
rainbow (>= 2.2.2, < 4.0)
|
172
197
|
regexp_parser (>= 1.8, < 3.0)
|
173
198
|
rexml (>= 3.2.5, < 4.0)
|
174
|
-
rubocop-ast (>= 1.
|
199
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
175
200
|
ruby-progressbar (~> 1.7)
|
176
201
|
unicode-display_width (>= 2.4.0, < 3.0)
|
177
202
|
rubocop-ast (1.30.0)
|
@@ -183,12 +208,6 @@ GEM
|
|
183
208
|
rubocop-performance (1.20.2)
|
184
209
|
rubocop (>= 1.48.1, < 2.0)
|
185
210
|
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
211
|
rubocop-rails (2.23.1)
|
193
212
|
activesupport (>= 4.2.0)
|
194
213
|
rack (>= 1.1)
|
@@ -202,6 +221,9 @@ GEM
|
|
202
221
|
rubocop-factory_bot (~> 2.22)
|
203
222
|
ruby-progressbar (1.13.0)
|
204
223
|
rubyzip (2.3.2)
|
224
|
+
sentry-rails (5.5.0)
|
225
|
+
railties (>= 5.0)
|
226
|
+
sentry-ruby (~> 5.5.0)
|
205
227
|
sentry-ruby (5.5.0)
|
206
228
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
207
229
|
sprockets (4.2.1)
|
@@ -211,6 +233,7 @@ GEM
|
|
211
233
|
actionpack (>= 5.2)
|
212
234
|
activesupport (>= 5.2)
|
213
235
|
sprockets (>= 3.0.0)
|
236
|
+
sqlite3 (1.4.4)
|
214
237
|
thor (1.3.0)
|
215
238
|
thread_safe (0.3.6)
|
216
239
|
timeout (0.4.1)
|
@@ -231,13 +254,16 @@ PLATFORMS
|
|
231
254
|
|
232
255
|
DEPENDENCIES
|
233
256
|
appraisal (~> 2.5.0)
|
257
|
+
combustion (~> 1.4)
|
234
258
|
dep_shield!
|
235
259
|
license_finder (>= 7.0)
|
260
|
+
nokogiri (< 1.16)
|
236
261
|
rails (= 6.0.6.1)
|
237
262
|
rake (~> 13.0)
|
238
263
|
rspec (~> 3.0)
|
239
|
-
|
240
|
-
rubocop-powerhome
|
264
|
+
rspec-rails (~> 5.1.2)
|
265
|
+
rubocop-powerhome!
|
266
|
+
sqlite3 (~> 1.4.2)
|
241
267
|
|
242
268
|
BUNDLED WITH
|
243
269
|
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.1
|
14
|
+
dep_shield (0.2.1)
|
15
|
+
nitro_config
|
16
|
+
rails (>= 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,12 @@ 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)
|
116
134
|
racc (~> 1.4)
|
117
135
|
parallel (1.24.0)
|
118
|
-
parser (3.3.0.
|
136
|
+
parser (3.3.0.5)
|
119
137
|
ast (~> 2.4.1)
|
120
138
|
racc
|
121
139
|
racc (1.7.3)
|
@@ -166,16 +184,23 @@ GEM
|
|
166
184
|
rspec-mocks (3.12.6)
|
167
185
|
diff-lcs (>= 1.2.0, < 2.0)
|
168
186
|
rspec-support (~> 3.12.0)
|
187
|
+
rspec-rails (5.1.2)
|
188
|
+
actionpack (>= 5.2)
|
189
|
+
activesupport (>= 5.2)
|
190
|
+
railties (>= 5.2)
|
191
|
+
rspec-core (~> 3.10)
|
192
|
+
rspec-expectations (~> 3.10)
|
193
|
+
rspec-mocks (~> 3.10)
|
194
|
+
rspec-support (~> 3.10)
|
169
195
|
rspec-support (3.12.1)
|
170
|
-
rubocop (1.
|
196
|
+
rubocop (1.52.1)
|
171
197
|
json (~> 2.3)
|
172
|
-
language_server-protocol (>= 3.17.0)
|
173
198
|
parallel (~> 1.10)
|
174
|
-
parser (>= 3.
|
199
|
+
parser (>= 3.2.2.3)
|
175
200
|
rainbow (>= 2.2.2, < 4.0)
|
176
201
|
regexp_parser (>= 1.8, < 3.0)
|
177
202
|
rexml (>= 3.2.5, < 4.0)
|
178
|
-
rubocop-ast (>= 1.
|
203
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
179
204
|
ruby-progressbar (~> 1.7)
|
180
205
|
unicode-display_width (>= 2.4.0, < 3.0)
|
181
206
|
rubocop-ast (1.30.0)
|
@@ -187,12 +212,6 @@ GEM
|
|
187
212
|
rubocop-performance (1.20.2)
|
188
213
|
rubocop (>= 1.48.1, < 2.0)
|
189
214
|
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
215
|
rubocop-rails (2.23.1)
|
197
216
|
activesupport (>= 4.2.0)
|
198
217
|
rack (>= 1.1)
|
@@ -206,6 +225,9 @@ GEM
|
|
206
225
|
rubocop-factory_bot (~> 2.22)
|
207
226
|
ruby-progressbar (1.13.0)
|
208
227
|
rubyzip (2.3.2)
|
228
|
+
sentry-rails (5.5.0)
|
229
|
+
railties (>= 5.0)
|
230
|
+
sentry-ruby (~> 5.5.0)
|
209
231
|
sentry-ruby (5.5.0)
|
210
232
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
211
233
|
sprockets (4.2.1)
|
@@ -215,6 +237,7 @@ GEM
|
|
215
237
|
actionpack (>= 5.2)
|
216
238
|
activesupport (>= 5.2)
|
217
239
|
sprockets (>= 3.0.0)
|
240
|
+
sqlite3 (1.4.4)
|
218
241
|
thor (1.3.0)
|
219
242
|
timeout (0.4.1)
|
220
243
|
tomlrb (2.0.3)
|
@@ -234,13 +257,16 @@ PLATFORMS
|
|
234
257
|
|
235
258
|
DEPENDENCIES
|
236
259
|
appraisal (~> 2.5.0)
|
260
|
+
combustion (~> 1.4)
|
237
261
|
dep_shield!
|
238
262
|
license_finder (>= 7.0)
|
263
|
+
nokogiri (< 1.16)
|
239
264
|
rails (= 6.1.7.4)
|
240
265
|
rake (~> 13.0)
|
241
266
|
rspec (~> 3.0)
|
242
|
-
|
243
|
-
rubocop-powerhome
|
267
|
+
rspec-rails (~> 5.1.2)
|
268
|
+
rubocop-powerhome!
|
269
|
+
sqlite3 (~> 1.4.2)
|
244
270
|
|
245
271
|
BUNDLED WITH
|
246
272
|
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.1
|
14
|
+
dep_shield (0.2.1)
|
15
|
+
nitro_config
|
16
|
+
rails (>= 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,12 @@ 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)
|
122
140
|
racc (~> 1.4)
|
123
141
|
parallel (1.24.0)
|
124
|
-
parser (3.3.0.
|
142
|
+
parser (3.3.0.5)
|
125
143
|
ast (~> 2.4.1)
|
126
144
|
racc
|
127
145
|
racc (1.7.3)
|
@@ -172,16 +190,23 @@ GEM
|
|
172
190
|
rspec-mocks (3.12.6)
|
173
191
|
diff-lcs (>= 1.2.0, < 2.0)
|
174
192
|
rspec-support (~> 3.12.0)
|
193
|
+
rspec-rails (5.1.2)
|
194
|
+
actionpack (>= 5.2)
|
195
|
+
activesupport (>= 5.2)
|
196
|
+
railties (>= 5.2)
|
197
|
+
rspec-core (~> 3.10)
|
198
|
+
rspec-expectations (~> 3.10)
|
199
|
+
rspec-mocks (~> 3.10)
|
200
|
+
rspec-support (~> 3.10)
|
175
201
|
rspec-support (3.12.1)
|
176
|
-
rubocop (1.
|
202
|
+
rubocop (1.52.1)
|
177
203
|
json (~> 2.3)
|
178
|
-
language_server-protocol (>= 3.17.0)
|
179
204
|
parallel (~> 1.10)
|
180
|
-
parser (>= 3.
|
205
|
+
parser (>= 3.2.2.3)
|
181
206
|
rainbow (>= 2.2.2, < 4.0)
|
182
207
|
regexp_parser (>= 1.8, < 3.0)
|
183
208
|
rexml (>= 3.2.5, < 4.0)
|
184
|
-
rubocop-ast (>= 1.
|
209
|
+
rubocop-ast (>= 1.28.0, < 2.0)
|
185
210
|
ruby-progressbar (~> 1.7)
|
186
211
|
unicode-display_width (>= 2.4.0, < 3.0)
|
187
212
|
rubocop-ast (1.30.0)
|
@@ -193,12 +218,6 @@ GEM
|
|
193
218
|
rubocop-performance (1.20.2)
|
194
219
|
rubocop (>= 1.48.1, < 2.0)
|
195
220
|
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
221
|
rubocop-rails (2.23.1)
|
203
222
|
activesupport (>= 4.2.0)
|
204
223
|
rack (>= 1.1)
|
@@ -212,8 +231,12 @@ GEM
|
|
212
231
|
rubocop-factory_bot (~> 2.22)
|
213
232
|
ruby-progressbar (1.13.0)
|
214
233
|
rubyzip (2.3.2)
|
234
|
+
sentry-rails (5.5.0)
|
235
|
+
railties (>= 5.0)
|
236
|
+
sentry-ruby (~> 5.5.0)
|
215
237
|
sentry-ruby (5.5.0)
|
216
238
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
239
|
+
sqlite3 (1.4.4)
|
217
240
|
thor (1.3.0)
|
218
241
|
timeout (0.4.1)
|
219
242
|
tomlrb (2.0.3)
|
@@ -233,13 +256,16 @@ PLATFORMS
|
|
233
256
|
|
234
257
|
DEPENDENCIES
|
235
258
|
appraisal (~> 2.5.0)
|
259
|
+
combustion (~> 1.4)
|
236
260
|
dep_shield!
|
237
261
|
license_finder (>= 7.0)
|
262
|
+
nokogiri (< 1.16)
|
238
263
|
rails (= 7.0.6)
|
239
264
|
rake (~> 13.0)
|
240
265
|
rspec (~> 3.0)
|
241
|
-
|
242
|
-
rubocop-powerhome
|
266
|
+
rspec-rails (~> 5.1.2)
|
267
|
+
rubocop-powerhome!
|
268
|
+
sqlite3 (~> 1.4.2)
|
243
269
|
|
244
270
|
BUNDLED WITH
|
245
271
|
2.5.4
|
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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dep_shield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
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-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appraisal
|
@@ -115,9 +115,9 @@ dependencies:
|
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 6.0.6.1
|
118
|
-
- - "
|
118
|
+
- - "<="
|
119
119
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
120
|
+
version: 7.0.6
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
123
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -125,9 +125,9 @@ dependencies:
|
|
125
125
|
- - ">="
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: 6.0.6.1
|
128
|
-
- - "
|
128
|
+
- - "<="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
130
|
+
version: 7.0.6
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: sentry-rails
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|