bindeps 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/bindeps.gemspec +0 -1
- data/lib/bindeps/version.rb +1 -1
- data/lib/bindeps.rb +17 -2
- metadata +1 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ce60e8a556a5d2d0ca0d4e562c72ed1139d5c23
|
4
|
+
data.tar.gz: 4a6aa254fbf74d7b2ac4d725c5f05fe431d418eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dcbc0dafccf0c71371fcd886a3832d9910831d5660a94c4917ad818792f97ca772dc3c95d6409dbb1d629e32ed50470ce3f8e54508a9e7e8f6452fca10779c2
|
7
|
+
data.tar.gz: a0c9e3988109d6c359289f267f5eb7f2f4e312ec6112dfbb58c8df61c97d3e882d2ca3b65e36080b6fbaaa56d131d89b96fea437e5bc12268696d05c6267a5d8
|
data/bindeps.gemspec
CHANGED
@@ -19,7 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency 'fixwhich', '~> 1.0', '>= 1.0.2'
|
22
|
-
spec.add_dependency 'downloadr', '~> 0.0', '>= 0.0.41'
|
23
22
|
|
24
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
25
24
|
spec.add_development_dependency 'rake', '~> 10.3', '>= 10.3.2'
|
data/lib/bindeps/version.rb
CHANGED
data/lib/bindeps.rb
CHANGED
@@ -3,7 +3,6 @@ require "unpacker"
|
|
3
3
|
require "fixwhich"
|
4
4
|
require "tmpdir"
|
5
5
|
require "yaml"
|
6
|
-
require "downloadr"
|
7
6
|
|
8
7
|
module Bindeps
|
9
8
|
|
@@ -95,7 +94,23 @@ module Bindeps
|
|
95
94
|
end
|
96
95
|
|
97
96
|
def download
|
98
|
-
|
97
|
+
wget = which('wget').first
|
98
|
+
curl = which('curl').first
|
99
|
+
if wget
|
100
|
+
cmd = "#{wget} #{@url}"
|
101
|
+
stdout, stderr, status = Open3.capture3 cmd
|
102
|
+
elsif curl
|
103
|
+
cmd = "#{curl} -O -J -L #{@url}"
|
104
|
+
stdout, stderr, status = Open3.capture3 cmd
|
105
|
+
else
|
106
|
+
msg = "You don't have curl or wget?! What kind of computer is "
|
107
|
+
msg << "this?! Windows?! BeOS? OS/2?"
|
108
|
+
raise DownloadFailedError.new(msg)
|
109
|
+
end
|
110
|
+
if !status.success?
|
111
|
+
raise DownloadFailedError,
|
112
|
+
"download of #{@url} for #{@name} failed:\n#{stdout}\n#{stderr}"
|
113
|
+
end
|
99
114
|
end
|
100
115
|
|
101
116
|
def unpack
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bindeps
|
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
|
- Richard Smith-Unna
|
@@ -31,26 +31,6 @@ dependencies:
|
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.2
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: downloadr
|
36
|
-
requirement: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.0'
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: 0.0.41
|
44
|
-
type: :runtime
|
45
|
-
prerelease: false
|
46
|
-
version_requirements: !ruby/object:Gem::Requirement
|
47
|
-
requirements:
|
48
|
-
- - "~>"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '0.0'
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 0.0.41
|
54
34
|
- !ruby/object:Gem::Dependency
|
55
35
|
name: bundler
|
56
36
|
requirement: !ruby/object:Gem::Requirement
|