mini_portile 0.5.0 → 0.5.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.
- data/History.txt +5 -0
- data/Rakefile +1 -1
- data/lib/mini_portile.rb +19 -3
- metadata +3 -3
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/lib/mini_portile.rb
CHANGED
@@ -40,7 +40,7 @@ class MiniPortile
|
|
40
40
|
next unless File.exists?(full_path)
|
41
41
|
output "Running git apply with #{full_path}..."
|
42
42
|
execute('patch', %Q(git apply #{full_path}))
|
43
|
-
end
|
43
|
+
end
|
44
44
|
end
|
45
45
|
|
46
46
|
def configure_options
|
@@ -186,11 +186,27 @@ private
|
|
186
186
|
|
187
187
|
def tar_exe
|
188
188
|
@@tar_exe ||= begin
|
189
|
-
dev_null = RbConfig::CONFIG['host_os'] =~ /mingw|mswin/ ? 'NUL' : '/dev/null'
|
190
189
|
%w[tar bsdtar basic-bsdtar].find { |c|
|
191
|
-
|
190
|
+
which(c)
|
191
|
+
}
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# From: http://stackoverflow.com/a/5471032/7672
|
196
|
+
# Thanks, Mislav!
|
197
|
+
#
|
198
|
+
# Cross-platform way of finding an executable in the $PATH.
|
199
|
+
#
|
200
|
+
# which('ruby') #=> /usr/bin/ruby
|
201
|
+
def which(cmd)
|
202
|
+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
|
203
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
|
204
|
+
exts.each { |ext|
|
205
|
+
exe = File.join(path, "#{cmd}#{ext}")
|
206
|
+
return exe if File.executable? exe
|
192
207
|
}
|
193
208
|
end
|
209
|
+
return nil
|
194
210
|
end
|
195
211
|
|
196
212
|
def detect_host
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_portile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-07-07 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Simplistic port-like solution for developers. It provides a standard
|
15
15
|
and simplified way to compile against dependency libraries without messing up your
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
version: 1.3.5
|
54
54
|
requirements: []
|
55
55
|
rubyforge_project:
|
56
|
-
rubygems_version: 1.8.
|
56
|
+
rubygems_version: 1.8.25
|
57
57
|
signing_key:
|
58
58
|
specification_version: 3
|
59
59
|
summary: Simplistic port-like solution for developers
|