script_executor 1.7.6 → 1.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +1 -1
- data/Gemfile.lock +1 -1
- data/lib/script_executor/base_provision.rb +1 -1
- data/lib/script_executor/script_locator.rb +9 -1
- data/lib/script_executor/version.rb +1 -1
- data/spec/support/script0.sh +1 -1
- data/spec/thor_spec.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1be5a0eeb327694f114c24aaa57f2aaad17d6f4a
|
4
|
+
data.tar.gz: 285a57a5dcfe003a5c16d5a6ba1a01c61573eb66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd8637488c7465b21ff900bab3a99bf3d215948b3c2f63eb3d4c97d858e39293bd0d0d032e24923c75e62f4afce92934e1c8e0c1504d7513fca3fd538307b17d
|
7
|
+
data.tar.gz: 92816769d91c33e43a80ceb3637c8aa4bd9d1b1552404101eb5f4e3fe96d0029ea78f41112614ebc80408d85c700af239cc98587eff2d4c9fd7efa8a3567d73a
|
data/CHANGES
CHANGED
data/Gemfile.lock
CHANGED
@@ -50,7 +50,7 @@ class BaseProvision
|
|
50
50
|
def create_script_methods
|
51
51
|
script_list.keys.each do |name|
|
52
52
|
singleton_class.send(:define_method, name.to_sym) do |type, params|
|
53
|
-
self.run name.to_s, type,
|
53
|
+
self.run name.to_s, type, env.merge(ARGV: params.join(' '))
|
54
54
|
end
|
55
55
|
end
|
56
56
|
end
|
@@ -6,6 +6,10 @@ require 'script_executor/scripts_transform'
|
|
6
6
|
|
7
7
|
module ScriptLocator
|
8
8
|
|
9
|
+
def errors
|
10
|
+
@errors ||= []
|
11
|
+
end
|
12
|
+
|
9
13
|
def scripts file
|
10
14
|
data = extract_data file
|
11
15
|
|
@@ -32,7 +36,11 @@ module ScriptLocator
|
|
32
36
|
|
33
37
|
result = interpolator.interpolate content, env
|
34
38
|
|
35
|
-
|
39
|
+
if interpolator.errors.size > 0
|
40
|
+
puts interpolator.errors
|
41
|
+
|
42
|
+
@errors = interpolator.errors
|
43
|
+
end
|
36
44
|
|
37
45
|
result
|
38
46
|
end
|
data/spec/support/script0.sh
CHANGED
data/spec/thor_spec.rb
CHANGED
@@ -19,12 +19,16 @@ describe ThorSpec do
|
|
19
19
|
ThorSpec.provision.env[:name] = 'name'
|
20
20
|
|
21
21
|
subject.invoke :test2
|
22
|
+
|
23
|
+
expect(ThorSpec.provision.errors).to be_empty
|
22
24
|
end
|
23
25
|
|
24
26
|
it "executes thor with parameters" do
|
25
27
|
ThorSpec.provision.env[:name] = 'name'
|
26
28
|
|
27
29
|
subject.invoke :test3, ['a', 'b','c']
|
30
|
+
|
31
|
+
expect(ThorSpec.provision.errors).to be_empty
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|