bindeps 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74eff957e81c9566dfc40705887561816cc26905
4
- data.tar.gz: 4e00ae4f42c5d9af3e910a32a4e17e7d811f0d3c
3
+ metadata.gz: 45da4fb7879992fb4582eb78d8c6b8e3e2af9b15
4
+ data.tar.gz: 50f1910e1f4a1a9e780fc10b3b1bd909bd854eb6
5
5
  SHA512:
6
- metadata.gz: 75ecdcde7c39fee9581ac6db23f76221f7f167efa318367672fbe456a97c44df0e407bcc97cf195b207e2cd9ad8b32c87f5edf8ec92fdfc69dd8ace71b5fca65
7
- data.tar.gz: 716dabef22b28961c101eaab322efc503c9fac190df05a815e3f6d2cb07f133842457488d01c886487c06d4acfc26c48dc9dffc6149ece3b5d32663787627221
6
+ metadata.gz: 9d2b316cbe9aad95f91e117ef12f7b51839614843686d27c490a50125cb3cb1a287d55bec292b3dfdecc31c55aee52f1949e26a60f0f4b395016a22227fc8331
7
+ data.tar.gz: a575c1cf35619c26b724154478fd85fa45c945b3a2a2dc0add90ae45ddac917447c542d54759dd21bf575118176529320ac8de3f7a201fc3e2df1bb3c72cb74f
data/README.md CHANGED
@@ -17,7 +17,7 @@ $ gem install bindeps
17
17
 
18
18
  ## Usage
19
19
 
20
- Create a YAML file describing your dependencies as a dictionary. Read the [bindeps YAML format specifications](wiki/bindeps_YAML_format_specifications).
20
+ Create a YAML file describing your dependencies as a dictionary. Read the [bindeps YAML format specifications](https://github.com/Blahah/bindeps/wiki/bindeps_YAML_format_specifications).
21
21
 
22
22
  ```yaml
23
23
  bowtie2:
@@ -11,6 +11,7 @@ module Bindeps
11
11
  class UnsupportedSystemError < StandardError; end
12
12
 
13
13
  def self.require(dependencies, destdir = '')
14
+ destdir = File.expand_path destdir unless destdir.empty?
14
15
  if dependencies.is_a? String
15
16
  dependencies = YAML.load_file dependencies
16
17
  end
@@ -78,6 +79,7 @@ module Bindeps
78
79
  end
79
80
 
80
81
  def install_missing destdir=''
82
+ destdir = File.expand_path destdir unless destdir.empty?
81
83
  unless all_installed?
82
84
  puts "Installing #{@name} (#{@version})..."
83
85
  download
@@ -125,9 +127,10 @@ module Bindeps
125
127
  end
126
128
 
127
129
  def unpack destdir = ''
130
+ destdir = File.expand_path destdir unless destdir.empty?
128
131
  archive = File.basename(@url)
129
- Unpacker.archive? archive
130
132
  if @unpack
133
+ Unpacker.archive? archive
131
134
  Unpacker.unpack(archive) do |dir|
132
135
  Dir.chdir dir do
133
136
  Dir['**/*'].each do |extracted|
@@ -136,14 +139,15 @@ module Bindeps
136
139
  dir = File.dirname(extracted).split(File::PATH_SEPARATOR).last
137
140
  dir = %w[bin lib].include?(dir) ? dir : '.'
138
141
  unless File.directory?(extracted)
139
- install(extracted, dir, destdir)
142
+ install(extracted, extracted, dir, destdir)
140
143
  end
141
144
  end
142
145
  end
143
146
  end
144
147
  end
145
148
  else
146
- install(@binaries.first, 'bin', destdir)
149
+ bin = File.basename(@url)
150
+ install(bin, @binaries.first, 'bin', destdir)
147
151
  end
148
152
  end
149
153
 
@@ -175,7 +179,7 @@ module Bindeps
175
179
  false
176
180
  end
177
181
 
178
- def install(src, destprefix, destdir = '')
182
+ def install(src, dest, destprefix, destdir = '')
179
183
  gem_home = ENV['GEM_HOME']
180
184
  home = ENV['HOME']
181
185
  basedir = File.join(home, '.local')
@@ -189,7 +193,7 @@ module Bindeps
189
193
  FileUtils.mkdir_p File.join(basedir, 'bin')
190
194
  FileUtils.mkdir_p File.join(basedir, 'lib')
191
195
  destprefix = 'bin' if destprefix == '.'
192
- install_location = File.join(basedir, destprefix, File.basename(src))
196
+ install_location = File.join(basedir, destprefix, File.basename(dest))
193
197
  FileUtils.install(src, install_location, :mode => 0775)
194
198
  end
195
199
 
@@ -1,3 +1,3 @@
1
1
  module Bindeps
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
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.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Smith-Unna
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-03 00:00:00.000000000 Z
12
+ date: 2016-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fixwhich
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  requirements: []
218
218
  rubyforge_project:
219
- rubygems_version: 2.2.2
219
+ rubygems_version: 2.4.6
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: binary dependency management for ruby gems