mini_portile 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/History.txt +8 -0
  2. data/Rakefile +2 -2
  3. data/lib/mini_portile.rb +12 -1
  4. metadata +8 -10
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 0.3.0 / 2012-03-23
2
+
3
+ * Enhancements:
4
+ * Use `gcc -v` to determine original host (platform) instead of Ruby one.
5
+
6
+ * Deprecations:
7
+ * Dropped support for Rubies older than 1.8.7
8
+
1
9
  === 0.2.2 / 2011-04-11
2
10
 
3
11
  * Minor enhancements:
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require "rubygems/package_task"
4
4
  GEM_SPEC = Gem::Specification.new do |s|
5
5
  # basic information
6
6
  s.name = "mini_portile"
7
- s.version = "0.2.2"
7
+ s.version = "0.3.0"
8
8
  s.platform = Gem::Platform::RUBY
9
9
 
10
10
  # description and details
@@ -12,7 +12,7 @@ GEM_SPEC = Gem::Specification.new do |s|
12
12
  s.description = "Simplistic port-like solution for developers. It provides a standard and simplified way to compile against dependency libraries without messing up your system."
13
13
 
14
14
  # requirements
15
- s.required_ruby_version = ">= 1.8.6"
15
+ s.required_ruby_version = ">= 1.8.7"
16
16
  s.required_rubygems_version = ">= 1.3.5"
17
17
 
18
18
  # dependencies (add_dependency)
data/lib/mini_portile.rb CHANGED
@@ -16,7 +16,7 @@ class MiniPortile
16
16
  @files = []
17
17
  @logger = STDOUT
18
18
 
19
- @original_host = @host = RbConfig::CONFIG['arch']
19
+ @original_host = @host = detect_host
20
20
  end
21
21
 
22
22
  def download
@@ -182,6 +182,17 @@ private
182
182
  end
183
183
  end
184
184
 
185
+ def detect_host
186
+ return @detect_host if defined?(@detect_host)
187
+
188
+ output = `gcc -v 2>&1`
189
+ if m = output.match(/^Target\: (.*)$/)
190
+ @detect_host = m[1]
191
+ end
192
+
193
+ @detect_host
194
+ end
195
+
185
196
  def extract_file(file, target)
186
197
  filename = File.basename(file)
187
198
  FileUtils.mkdir_p target
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 2
10
- version: 0.2.2
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Luis Lavena
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-11 00:00:00 -03:00
19
- default_executable:
18
+ date: 2012-03-23 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: Simplistic port-like solution for developers. It provides a standard and simplified way to compile against dependency libraries without messing up your system.
@@ -36,7 +35,6 @@ files:
36
35
  - README.rdoc
37
36
  - History.txt
38
37
  - LICENSE.txt
39
- has_rdoc: true
40
38
  homepage: http://github.com/luislavena/mini_portile
41
39
  licenses:
42
40
  - MIT
@@ -53,12 +51,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
51
  requirements:
54
52
  - - ">="
55
53
  - !ruby/object:Gem::Version
56
- hash: 59
54
+ hash: 57
57
55
  segments:
58
56
  - 1
59
57
  - 8
60
- - 6
61
- version: 1.8.6
58
+ - 7
59
+ version: 1.8.7
62
60
  required_rubygems_version: !ruby/object:Gem::Requirement
63
61
  none: false
64
62
  requirements:
@@ -73,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
71
  requirements: []
74
72
 
75
73
  rubyforge_project:
76
- rubygems_version: 1.6.2
74
+ rubygems_version: 1.8.21
77
75
  signing_key:
78
76
  specification_version: 3
79
77
  summary: Simplistic port-like solution for developers