ruby_audit 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/ruby_audit/cli.rb +6 -9
- data/lib/ruby_audit/database.rb +0 -11
- data/lib/ruby_audit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 555d018e6be6f837e1c896e5e3a4f4b5b89e01d0
|
4
|
+
data.tar.gz: a322a46b3c4b53e601f43616045e7c2ff3d8b184
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a07623f037e287c5b587a42d8323fe585ca5e9e785d8a112e8f491fbadf759bfac54769bd6d07eb5aea512c874bcb17c7490dbe0ea0d92bd4eda7fbf3a592429
|
7
|
+
data.tar.gz: b92184f83ec25d87c07ad9f673242f23e993e44bc37c92b7c71baab2b8b3c98b2f97b6a56129cf2949aad2cf27169a5f00b5a80593fcb07a4426fae21619e27f
|
data/CHANGELOG.md
CHANGED
data/lib/ruby_audit/cli.rb
CHANGED
@@ -54,15 +54,12 @@ module RubyAudit
|
|
54
54
|
|
55
55
|
def check_for_stale_database
|
56
56
|
database = Database.new
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
elsif database.stale
|
64
|
-
say 'The database has not been updated in over 7 days', :yellow
|
65
|
-
end
|
57
|
+
return unless database.size == 89
|
58
|
+
# bundler-audit 0.4.0 comes bundled with an old verison of
|
59
|
+
# ruby-advisory-db that has 89 advisories and NO advisories for Ruby
|
60
|
+
# or RubyGems. If #size == 89, the database has never been updated.
|
61
|
+
say 'The database must be updated before using RubyAudit', :red
|
62
|
+
exit 1
|
66
63
|
end
|
67
64
|
end
|
68
65
|
end
|
data/lib/ruby_audit/database.rb
CHANGED
@@ -24,17 +24,6 @@ module RubyAudit
|
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def stale
|
28
|
-
if File.directory?(USER_PATH) &&
|
29
|
-
File.exist?(File.join(USER_PATH, '.git'))
|
30
|
-
ts = Time.parse(
|
31
|
-
`cd #{USER_PATH} && git log --date=iso8601 --pretty="%cd" -1`).utc
|
32
|
-
ts < (Date.today - 7).to_time
|
33
|
-
else
|
34
|
-
true
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
27
|
protected
|
39
28
|
|
40
29
|
def each_advisory_path(&block)
|
data/lib/ruby_audit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_audit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Cousens
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler-audit
|