bindeps 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64723d1363bdd89ea39ce9e551b81986bed2e3be
4
- data.tar.gz: 2c41c225b69eeefec52cff061944896134ceb53d
3
+ metadata.gz: 06e05f3ffafe94d6a5df90db1b3289e8dde4ce54
4
+ data.tar.gz: a3300357574fb4a5de698ada1f8c340932c59d61
5
5
  SHA512:
6
- metadata.gz: 722bda344407f75f0b668f2be6951ccb46ab0707c5f1f5e50bf9841f80d2214d8ac1c77e5fc647a9b21646f3e67821fbf73d3fb213f9c9ef06025895dc375f69
7
- data.tar.gz: 769b7be9c54fa053858e5682b1edd9bf0d02b78b32705e35ad91926ccfd1beef4e1ad962237f5e84ae1955d00d1a9dcfae2798190bf8434910384d057be09623
6
+ metadata.gz: 8dd426661bd8d439a16b9eba2b79a4d6df7aeb6b3f35f9b2394d90e881ba1409e9135a7e202521fcfcb6bed950aec80dbdfb37cff2213e103f74c1bcbaea684c
7
+ data.tar.gz: d54dc5a9398948d71d040772b00718cc721a8d6632d29a99519d0044937d0c973e52bd15d5026056ca3e4a5255000ed180e77c30899b687c28f11375fcd5e93d
@@ -1,3 +1,3 @@
1
1
  module Bindeps
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/bindeps.rb CHANGED
@@ -66,6 +66,7 @@ module Bindeps
66
66
 
67
67
  def install_missing
68
68
  unless all_installed?
69
+ puts "Installing #{@name}..."
69
70
  download
70
71
  unpack
71
72
  end
@@ -104,7 +105,7 @@ module Bindeps
104
105
  end
105
106
  if !status.success?
106
107
  raise DownloadFailedError,
107
- "download of #{@url} for #{@name} failed"
108
+ "download of #{@url} for #{@name} failed:\n#{stdout}\n#{stderr}"
108
109
  end
109
110
  end
110
111
 
data/lib/unpacker.rb CHANGED
@@ -36,12 +36,16 @@ module Unpacker
36
36
  cmd = case file
37
37
  when /rar$/
38
38
  "unrar x -y #{file} #{dir}"
39
- when /(tar|tgz|tar\.gz|tar\.bz|tbz|bz2|tar\.bz2)$/
40
- "tar xvf #{file} --directory #{dir}"
39
+ when /(tar|tgz|tar\.gz)$/
40
+ "tar xzf #{file} --directory #{dir}"
41
+ when /(tar\.bz|tbz|tar\.bz2)$/
42
+ "tar xjf #{file} --directory #{dir}"
41
43
  when /zip$/
42
44
  "unzip #{file} -d #{dir}"
43
45
  when /gz$/
44
- "gunzip -c #{file} #{File.join(dir, "gz-contents")}"
46
+ "gunzip #{file}"
47
+ when /bz2$/
48
+ "bunzip #{file}"
45
49
  else
46
50
  raise UnrecognizedArchiveError
47
51
  end
@@ -61,7 +65,7 @@ module Unpacker
61
65
  supported << "rar"
62
66
  end
63
67
  if !which('tar').empty?
64
- %w[tar tgz tgz tar.gz tar.bz bz2 tar.bz2 tbz].each do |ext|
68
+ %w[tar tgz tgz tar.gz tar.bz tar.bz2 tbz].each do |ext|
65
69
  supported << ext
66
70
  end
67
71
  end
@@ -71,17 +75,22 @@ module Unpacker
71
75
  if !which('gunzip').empty?
72
76
  supported << "gz"
73
77
  end
78
+ if !which('bunzip2').empty?
79
+ supported << "bz2"
80
+ end
74
81
  support = supported.include? ext
75
82
  if !support
76
- help = case ext
77
- when /rar/
83
+ help = case file_name
84
+ when /rar$/
78
85
  "Please install unrar"
79
- when /(tar|tgz|tar\.gz|tar\.bz|tbz|bz2|tar\.bz2)$/
86
+ when /(tar|tgz|tar\.gz|tar\.bz|tbz|tar\.bz2)$/
80
87
  "Please install tar"
81
88
  when /zip$/
82
89
  "Please install unzip"
83
90
  when /gz$/
84
91
  "Please install gunzip"
92
+ when /bz2$/
93
+ "Please install bunzip2"
85
94
  else
86
95
  raise UnrecognizedArchiveError
87
96
  end
@@ -101,6 +110,8 @@ module Unpacker
101
110
  "zip -T #{file_path}"
102
111
  when /gz|tgz$/
103
112
  "gunzip -t #{file_path}"
113
+ when /bz2$/
114
+ "bunzip2 -t #{file_path}"
104
115
  else
105
116
  raise UnrecognizedArchiveError
106
117
  end
metadata CHANGED
@@ -1,175 +1,175 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bindeps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
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-08-06 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: which
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.0'
20
- - - '>='
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 0.0.2
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ~>
27
+ - - "~>"
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0.0'
30
- - - '>='
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 0.0.2
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: which_works
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.3'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '1.3'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ~>
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
67
  version: '10.3'
68
- - - '>='
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: 10.3.2
71
71
  type: :development
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ~>
75
+ - - "~>"
76
76
  - !ruby/object:Gem::Version
77
77
  version: '10.3'
78
- - - '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: 10.3.2
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: turn
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ~>
85
+ - - "~>"
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0.9'
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: 0.9.7
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ~>
95
+ - - "~>"
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0.9'
98
- - - '>='
98
+ - - ">="
99
99
  - !ruby/object:Gem::Version
100
100
  version: 0.9.7
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: minitest
103
103
  requirement: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - ~>
105
+ - - "~>"
106
106
  - !ruby/object:Gem::Version
107
107
  version: '4'
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: 4.7.5
111
111
  type: :development
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '4'
118
- - - '>='
118
+ - - ">="
119
119
  - !ruby/object:Gem::Version
120
120
  version: 4.7.5
121
121
  - !ruby/object:Gem::Dependency
122
122
  name: simplecov
123
123
  requirement: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - ~>
125
+ - - "~>"
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0.8'
128
- - - '>='
128
+ - - ">="
129
129
  - !ruby/object:Gem::Version
130
130
  version: 0.8.2
131
131
  type: :development
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - ~>
135
+ - - "~>"
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0.8'
138
- - - '>='
138
+ - - ">="
139
139
  - !ruby/object:Gem::Version
140
140
  version: 0.8.2
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: shoulda-context
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - ~>
145
+ - - "~>"
146
146
  - !ruby/object:Gem::Version
147
147
  version: '1.2'
148
- - - '>='
148
+ - - ">="
149
149
  - !ruby/object:Gem::Version
150
150
  version: 1.2.1
151
151
  type: :development
152
152
  prerelease: false
153
153
  version_requirements: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - ~>
155
+ - - "~>"
156
156
  - !ruby/object:Gem::Version
157
157
  version: '1.2'
158
- - - '>='
158
+ - - ">="
159
159
  - !ruby/object:Gem::Version
160
160
  version: 1.2.1
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: coveralls
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - ~>
165
+ - - "~>"
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0.7'
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
- - - ~>
172
+ - - "~>"
173
173
  - !ruby/object:Gem::Version
174
174
  version: '0.7'
175
175
  description: binary dependency management for ruby gems
@@ -179,8 +179,8 @@ executables: []
179
179
  extensions: []
180
180
  extra_rdoc_files: []
181
181
  files:
182
- - .gitignore
183
- - .travis.yml
182
+ - ".gitignore"
183
+ - ".travis.yml"
184
184
  - Gemfile
185
185
  - LICENSE.txt
186
186
  - README.md
@@ -215,17 +215,17 @@ require_paths:
215
215
  - lib
216
216
  required_ruby_version: !ruby/object:Gem::Requirement
217
217
  requirements:
218
- - - '>='
218
+ - - ">="
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  requirements:
223
- - - '>='
223
+ - - ">="
224
224
  - !ruby/object:Gem::Version
225
225
  version: '0'
226
226
  requirements: []
227
227
  rubyforge_project:
228
- rubygems_version: 2.1.4
228
+ rubygems_version: 2.2.2
229
229
  signing_key:
230
230
  specification_version: 4
231
231
  summary: binary dependency management for ruby gems
@@ -246,4 +246,3 @@ test_files:
246
246
  - test/data/wget
247
247
  - test/helper.rb
248
248
  - test/test_bindeps.rb
249
- has_rdoc: