bundler-restrict 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -3
- data/lib/bundler/restrict/cli.rb +11 -0
- data/lib/bundler/restrict/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 495861a3598b42ce76a4d30468508ab11aa46b65d71a787daa0f97a0d5bb0a26
|
4
|
+
data.tar.gz: 3daa7f22b469607bb163e1d3f7ce4fffab8fc969615d69b16a1751c61bef8956
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b68ead20a9df26bec4e9f91f8a4717b13378e1561268c9ec29fd1b2a5f8cc566ee989ef507267434cf5229faf6c59906aabda583636de09fa39ebd1ebb51047c
|
7
|
+
data.tar.gz: ae70d96224af51562282e9a605f645321ef8319b57e38a62a0e9e273cb43707e9db43099783a260d9128521b90f46584f99c7a8d9cd148a366f3c5650a0df26e
|
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# Bundler::Restrict
|
2
2
|
|
3
|
-
|
3
|
+
Check bundle gem list.
|
4
|
+
|
5
|
+
Available checks:
|
6
|
+
|
7
|
+
* DateCheck: check if gem release date < '2022-02-01'
|
4
8
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
@@ -16,7 +19,17 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
16
19
|
|
17
20
|
## Usage
|
18
21
|
|
19
|
-
|
22
|
+
Add to CI:
|
23
|
+
|
24
|
+
```bash
|
25
|
+
bundle-restrict
|
26
|
+
```
|
27
|
+
|
28
|
+
|
29
|
+
| ENV | Description | Default |
|
30
|
+
| ---------------- | ---------------------- | --------------------- |
|
31
|
+
| BUNDLE_RESTRICT_Z_DATE | Max allowed release date | 2022-02-01 |
|
32
|
+
| BUNDLE_RESTRICT_IGNORE_GEMS | List of gems to ignore checks | bundler-restrict |
|
20
33
|
|
21
34
|
## Development
|
22
35
|
|
data/lib/bundler/restrict/cli.rb
CHANGED
@@ -15,6 +15,8 @@ module Bundler
|
|
15
15
|
[
|
16
16
|
Checks::DateCheck
|
17
17
|
].map { |ch| ch.new(gem) }.each do |check|
|
18
|
+
next if ignore?(gem)
|
19
|
+
|
18
20
|
unless check.valid?
|
19
21
|
print "\n"
|
20
22
|
puts check.error
|
@@ -27,11 +29,20 @@ module Bundler
|
|
27
29
|
end
|
28
30
|
|
29
31
|
if errors.empty?
|
32
|
+
print "\n"
|
30
33
|
puts "OK"
|
31
34
|
else
|
32
35
|
exit 1
|
33
36
|
end
|
34
37
|
end
|
38
|
+
|
39
|
+
def ignore?(gem)
|
40
|
+
ignored_gems.include? gem.name
|
41
|
+
end
|
42
|
+
|
43
|
+
def ignored_gems
|
44
|
+
['bundler-restrict'] + ENV.fetch('BUNDLE_RESTRICT_IGNORE_GEMS', '').split(',')
|
45
|
+
end
|
35
46
|
end
|
36
47
|
end
|
37
48
|
end
|