autobuild 1.7.4.rc1 → 1.7.4.rc2
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/lib/autobuild/environment.rb +18 -4
- data/lib/autobuild/version.rb +1 -1
- metadata +3 -3
|
@@ -121,9 +121,17 @@ module Autobuild
|
|
|
121
121
|
# Returns true if the given environment variable must not be reset by the
|
|
122
122
|
# env.sh script, but that new values should simply be prepended to it.
|
|
123
123
|
#
|
|
124
|
-
#
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
# @param [String,nil] name the environment variable that we want to check
|
|
125
|
+
# for inheritance. If nil, the global setting is returned.
|
|
126
|
+
#
|
|
127
|
+
# @see env_inherit env_inherit=
|
|
128
|
+
def self.env_inherit?(name = nil)
|
|
129
|
+
if @env_inherit
|
|
130
|
+
if name
|
|
131
|
+
@env_inherited_variables.include?(name)
|
|
132
|
+
else true
|
|
133
|
+
end
|
|
134
|
+
end
|
|
127
135
|
end
|
|
128
136
|
|
|
129
137
|
# If true (the default), the environment variables that are marked as
|
|
@@ -133,6 +141,8 @@ module Autobuild
|
|
|
133
141
|
# Otherwise, only the environment that is explicitely set in autobuild
|
|
134
142
|
# will be passed on to subcommands, and saved in the environment
|
|
135
143
|
# scripts.
|
|
144
|
+
#
|
|
145
|
+
# @see env_inherit? env_inherit
|
|
136
146
|
def self.env_inherit=(value)
|
|
137
147
|
@env_inherit = value
|
|
138
148
|
inherited_environment.keys.each do |env_name|
|
|
@@ -143,12 +153,16 @@ module Autobuild
|
|
|
143
153
|
# Declare that the given environment variable must not be reset by the
|
|
144
154
|
# env.sh script, but that new values should simply be prepended to it.
|
|
145
155
|
#
|
|
146
|
-
#
|
|
156
|
+
# @return [Boolean] true if environment inheritance is globally enabled and
|
|
157
|
+
# false otherwise. This is controlled by {env_inherit=}
|
|
158
|
+
#
|
|
159
|
+
# @see env_inherit? env_inherit=
|
|
147
160
|
def self.env_inherit(*names)
|
|
148
161
|
@env_inherited_variables |= names
|
|
149
162
|
names.each do |env_name|
|
|
150
163
|
env_init_from_env(env_name)
|
|
151
164
|
end
|
|
165
|
+
@env_inherit
|
|
152
166
|
end
|
|
153
167
|
|
|
154
168
|
def self.env_init_from_env(name)
|
data/lib/autobuild/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: autobuild
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 165251369
|
|
5
5
|
prerelease: 6
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 7
|
|
9
9
|
- 4
|
|
10
10
|
- rc
|
|
11
|
-
-
|
|
12
|
-
version: 1.7.4.
|
|
11
|
+
- 2
|
|
12
|
+
version: 1.7.4.rc2
|
|
13
13
|
platform: ruby
|
|
14
14
|
authors:
|
|
15
15
|
- Sylvain Joyeux
|