teapot 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/teapot/platform.rb +1 -1
- data/lib/teapot/version.rb +1 -1
- data/test/test_environment.rb +18 -1
- metadata +3 -3
data/lib/teapot/platform.rb
CHANGED
@@ -53,8 +53,8 @@ module Teapot
|
|
53
53
|
def environment
|
54
54
|
if @available
|
55
55
|
return Environment.combine(
|
56
|
-
@record.options[:environment],
|
57
56
|
Environment.new(&@configure),
|
57
|
+
@record.options[:environment],
|
58
58
|
)
|
59
59
|
else
|
60
60
|
raise UnavailableError.new("Platform is not available for configuration!")
|
data/lib/teapot/version.rb
CHANGED
data/test/test_environment.rb
CHANGED
@@ -50,7 +50,7 @@ class TestEnvironment < Test::Unit::TestCase
|
|
50
50
|
expected = {'SDK' => "bob-2.8", 'CFLAGS' => "-sdk=bob-2.8"}
|
51
51
|
|
52
52
|
assert_equal [:cflags, :sdk], b.flatten.to_hash.keys.sort
|
53
|
-
assert_equal expected, b.flatten.
|
53
|
+
assert_equal expected, b.flatten.to_env_hash
|
54
54
|
end
|
55
55
|
|
56
56
|
def test_combine
|
@@ -66,4 +66,21 @@ class TestEnvironment < Test::Unit::TestCase
|
|
66
66
|
assert_equal b.values, top.parent.parent.values
|
67
67
|
assert_equal a.values, top.parent.parent.parent.values
|
68
68
|
end
|
69
|
+
|
70
|
+
def test_combine_defaults
|
71
|
+
local = Teapot::Environment.new do
|
72
|
+
architectures ["-m64"]
|
73
|
+
end
|
74
|
+
|
75
|
+
platform = Teapot::Environment.new do
|
76
|
+
default architectures ["-arch", "i386"]
|
77
|
+
end
|
78
|
+
|
79
|
+
combined = Teapot::Environment.combine(
|
80
|
+
platform,
|
81
|
+
local
|
82
|
+
)
|
83
|
+
|
84
|
+
assert_equal ["-m64"], combined[:architectures]
|
85
|
+
end
|
69
86
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teapot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -100,7 +100,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
segments:
|
102
102
|
- 0
|
103
|
-
hash: -
|
103
|
+
hash: -3652039777535418332
|
104
104
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
segments:
|
111
111
|
- 0
|
112
|
-
hash: -
|
112
|
+
hash: -3652039777535418332
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
115
|
rubygems_version: 1.8.24
|