bindeps 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bindeps.rb +1 -1
- data/lib/bindeps/version.rb +1 -1
- data/test/data/fakebin2 +4 -0
- data/test/data/fakebin2.tgz +0 -0
- data/test/data/fakebin2.yaml +15 -0
- data/test/data/fakebin3 +5 -0
- data/test/data/fakebin3.tgz +0 -0
- data/test/data/fakebin3.yaml +15 -0
- data/test/test_bindeps.rb +33 -3
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e76a60c0afc4c11a9970385125f0ee4fe203321
|
4
|
+
data.tar.gz: ade512a542e417f59eb6d22bf6bc190bf4119332
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34dabe4eb5ff1b564123da329e4df203dc3de6ddd282accfa485bef4f24ff0b0ba451c4523c07a37bb801acacb121e4362d3a7e146125236b82068c29487d8f0
|
7
|
+
data.tar.gz: 1ea12308cf81a47e09ea165bcc9e84761ae62b7cc1abc48446f4d9a3e959e3c1db0a08efbc354eb1a4fa24902e53ef73e4e43adbacdc43095e00ab865cb69f8d
|
data/lib/bindeps.rb
CHANGED
data/lib/bindeps/version.rb
CHANGED
data/test/data/fakebin2
ADDED
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
fakebin:
|
2
|
+
binaries:
|
3
|
+
- fakebin2
|
4
|
+
version:
|
5
|
+
number: 2.0.1
|
6
|
+
command: fakebin2
|
7
|
+
url:
|
8
|
+
64bit:
|
9
|
+
macosx: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin2.tgz
|
10
|
+
linux: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin2.tgz
|
11
|
+
unix: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin2.tgz
|
12
|
+
32bit:
|
13
|
+
macosx: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin2.tgz
|
14
|
+
linux: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin2.tgz
|
15
|
+
unix: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin2.tgz
|
data/test/data/fakebin3
ADDED
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
fakebin:
|
2
|
+
binaries:
|
3
|
+
- fakebin3
|
4
|
+
version:
|
5
|
+
number: 2.0.1.ERR
|
6
|
+
command: fakebin3
|
7
|
+
url:
|
8
|
+
64bit:
|
9
|
+
macosx: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin3.tgz
|
10
|
+
linux: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin3.tgz
|
11
|
+
unix: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin3.tgz
|
12
|
+
32bit:
|
13
|
+
macosx: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin3.tgz
|
14
|
+
linux: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin3.tgz
|
15
|
+
unix: https://github.com/Blahah/bindeps/raw/master/test/data/fakebin3.tgz
|
data/test/test_bindeps.rb
CHANGED
@@ -6,8 +6,7 @@ class TestBinDeps < Test::Unit::TestCase
|
|
6
6
|
|
7
7
|
setup do
|
8
8
|
test_dir = File.dirname(__FILE__)
|
9
|
-
data_dir = File.join(test_dir, 'data')
|
10
|
-
@test_yaml = File.join(data_dir, 'fakebin.yaml')
|
9
|
+
@data_dir = File.join(test_dir, 'data')
|
11
10
|
end
|
12
11
|
|
13
12
|
# teardown do
|
@@ -22,10 +21,41 @@ class TestBinDeps < Test::Unit::TestCase
|
|
22
21
|
# end
|
23
22
|
|
24
23
|
should "identify and install missing dependencies" do
|
25
|
-
|
24
|
+
test_yaml = File.join(@data_dir, 'fakebin.yaml')
|
25
|
+
Bindeps.require test_yaml
|
26
26
|
assert_equal 'success', `fakebin`.strip
|
27
27
|
end
|
28
28
|
|
29
|
+
should "handle case where version is not on first line" do
|
30
|
+
test_yaml = File.join(@data_dir, 'fakebin2.yaml')
|
31
|
+
# install fakebin2
|
32
|
+
Bindeps.require test_yaml
|
33
|
+
# now Dependency should detect it as installed
|
34
|
+
deps = YAML.load_file test_yaml
|
35
|
+
deps.each_pair do |name, config|
|
36
|
+
d = Bindeps::Dependency.new(name,
|
37
|
+
config['binaries'],
|
38
|
+
config['version'],
|
39
|
+
config['url'])
|
40
|
+
assert d.installed?('fakebin2')
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
should "handle version output to stderr" do
|
45
|
+
test_yaml = File.join(@data_dir, 'fakebin3.yaml')
|
46
|
+
# install fakebin3
|
47
|
+
Bindeps.require test_yaml
|
48
|
+
# now Dependency should detect it as installed
|
49
|
+
deps = YAML.load_file test_yaml
|
50
|
+
deps.each_pair do |name, config|
|
51
|
+
d = Bindeps::Dependency.new(name,
|
52
|
+
config['binaries'],
|
53
|
+
config['version'],
|
54
|
+
config['url'])
|
55
|
+
assert d.installed?('fakebin3')
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
29
59
|
end
|
30
60
|
|
31
61
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bindeps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Smith-Unna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: which_works
|
@@ -143,6 +143,12 @@ files:
|
|
143
143
|
- test/data/fakebin
|
144
144
|
- test/data/fakebin.tgz
|
145
145
|
- test/data/fakebin.yaml
|
146
|
+
- test/data/fakebin2
|
147
|
+
- test/data/fakebin2.tgz
|
148
|
+
- test/data/fakebin2.yaml
|
149
|
+
- test/data/fakebin3
|
150
|
+
- test/data/fakebin3.tgz
|
151
|
+
- test/data/fakebin3.yaml
|
146
152
|
- test/helper.rb
|
147
153
|
- test/test_bindeps.rb
|
148
154
|
homepage: https://github.com/Blahah/bindeps
|
@@ -174,6 +180,12 @@ test_files:
|
|
174
180
|
- test/data/fakebin
|
175
181
|
- test/data/fakebin.tgz
|
176
182
|
- test/data/fakebin.yaml
|
183
|
+
- test/data/fakebin2
|
184
|
+
- test/data/fakebin2.tgz
|
185
|
+
- test/data/fakebin2.yaml
|
186
|
+
- test/data/fakebin3
|
187
|
+
- test/data/fakebin3.tgz
|
188
|
+
- test/data/fakebin3.yaml
|
177
189
|
- test/helper.rb
|
178
190
|
- test/test_bindeps.rb
|
179
191
|
has_rdoc:
|