bundler-advise 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/lib/bundler/advise/advisories.rb +14 -1
- data/lib/bundler/advise/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: 30f4e69a4f93c5836696e97544e8394a5c7414b2
|
4
|
+
data.tar.gz: 4d7e7251ffaada1d00bda7f03190a46d8e824119
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58c066c34fa833a22d5743dbdd7e9788a24eae1225db17fa2e64cbb1ea00b041b93b92c4866e31d0c72e2fcfefe8707700446c622572d3e3ed606ec79a940a1f
|
7
|
+
data.tar.gz: 27df41527ceb684d2993bc2bbe3aa87289dfcb154afc9183ab4d9cd65ee4958b4bf3b0cbbdd380d6a851412d9ccaa791d2afb2f86af3e1f8987e75a70d1c3cac
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ module Bundler::Advise
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def update
|
14
|
-
|
14
|
+
dir_missing_or_empty ? clone : pull
|
15
15
|
rescue ArgumentError => e
|
16
16
|
# git gem is dorky in this case, putting the path into the backtrace.
|
17
17
|
msg = "Unexpected problem with working dir for advisories: #{e.message} #{e.backtrace}.\n" +
|
@@ -19,6 +19,10 @@ module Bundler::Advise
|
|
19
19
|
raise RuntimeError, msg
|
20
20
|
end
|
21
21
|
|
22
|
+
def dir_missing_or_empty
|
23
|
+
!File.exist?(@dir) || Dir.empty?(@dir)
|
24
|
+
end
|
25
|
+
|
22
26
|
def clean_update!
|
23
27
|
FileUtils.rmtree @dir
|
24
28
|
update
|
@@ -42,3 +46,12 @@ module Bundler::Advise
|
|
42
46
|
end
|
43
47
|
end
|
44
48
|
end
|
49
|
+
|
50
|
+
class Dir
|
51
|
+
def self.empty?(path)
|
52
|
+
Dir.glob("#{ path }/{*,.*}") do |e|
|
53
|
+
return false unless %w( . .. ).include?(File::basename(e))
|
54
|
+
end
|
55
|
+
return true
|
56
|
+
end
|
57
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler-advise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chrismo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: git
|