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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 145e0125d8e949943a1bf237c1ad46f7606a427d
4
- data.tar.gz: 8f43a9cfed71aa16cfe46a5bb3d7cc1ff69126f2
3
+ metadata.gz: 1be5a0eeb327694f114c24aaa57f2aaad17d6f4a
4
+ data.tar.gz: 285a57a5dcfe003a5c16d5a6ba1a01c61573eb66
5
5
  SHA512:
6
- metadata.gz: abe1d415c3e7d0f5f4ee6b6944194dee479d9549ff8c0c74f4d343eba05751731175e90faede22d5b4034e6f4e49dd9784c8162a92a0e79f50e05b26f0467cf5
7
- data.tar.gz: 7b532fbc46970cba8763a740aacfc4ced2a0d56c970157be0b71412e11b84218061479da9f634fd4c9a0105e02b4a707428b3e8bbcc8061f9b644d248f4973b6
6
+ metadata.gz: dd8637488c7465b21ff900bab3a99bf3d215948b3c2f63eb3d4c97d858e39293bd0d0d032e24923c75e62f4afce92934e1c8e0c1504d7513fca3fd538307b17d
7
+ data.tar.gz: 92816769d91c33e43a80ceb3637c8aa4bd9d1b1552404101eb5f4e3fe96d0029ea78f41112614ebc80408d85c700af239cc98587eff2d4c9fd7efa8a3567d73a
data/CHANGES CHANGED
@@ -114,6 +114,6 @@
114
114
 
115
115
  * Add one more format for name section.
116
116
 
117
- == Version 1.7.6
117
+ == Version 1.7.6 - 1.7.7
118
118
 
119
119
  * Bug fixes.
data/Gemfile.lock CHANGED
@@ -27,7 +27,7 @@ GEM
27
27
  diff-lcs (>= 1.2.0, < 2.0)
28
28
  rspec-support (~> 3.3.0)
29
29
  rspec-support (3.3.0)
30
- text-interpolator (1.1.7)
30
+ text-interpolator (1.1.9)
31
31
  thor (0.19.1)
32
32
 
33
33
  PLATFORMS
@@ -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, params.empty? ? env : env.merge(params: params.join(' '))
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
- puts interpolator.errors if interpolator.errors.size > 0
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
@@ -1,3 +1,3 @@
1
1
  class ScriptExecutor
2
- VERSION = "1.7.6"
2
+ VERSION = "1.7.7"
3
3
  end
@@ -18,4 +18,4 @@ echo "#{ name }"
18
18
 
19
19
  echo "#{ name }"
20
20
 
21
- echo "#{params}"
21
+ echo "#{ARGV}"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: script_executor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.6
4
+ version: 1.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Shvets