rundock 1.0.8 → 1.1.0
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +7 -0
- data/lib/rundock/backend.rb +1 -3
- data/lib/rundock/builder/backend_builder.rb +1 -3
- data/lib/rundock/operation/command.rb +2 -1
- data/lib/rundock/version.rb +1 -1
- data/spec/integration/platforms/localhost/scenarios/task_with_args_scenario.yml +1 -0
- data/spec/integration/recipes/task_with_args_spec.rb +2 -1
- data/spec/integration/scenarios/task_with_args_scenario.yml +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbd82387cd2af5b8416ca898c1195d206c2d1125
|
4
|
+
data.tar.gz: 3142354f64b527b7ab56d3f0ef4b8e523bbff554
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf24ed1fa1eb8fe67c635c87e19c59cfe3e0420f776c3ea8b6cbcb4496ab217f7a6a60d074402fb810fb28b08cb84bb7bc2dd8b53f50c1f71bb9a8f7e85b3bed
|
7
|
+
data.tar.gz: d4d6e4a40db0e57811cdc12de94c05bc0c3d50575f962aa68b1b50e4d9240c03d2a21279cd742b6406c565ed4e5bdb1c6e9ef62df79fb27025247778f072209f
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/rundock/backend.rb
CHANGED
@@ -71,9 +71,7 @@ module Rundock
|
|
71
71
|
Logger.debug("exit status: #{exit_status}")
|
72
72
|
end
|
73
73
|
|
74
|
-
if exec_options[:errexit] && exit_status != 0
|
75
|
-
raise CommandResultStatusError
|
76
|
-
end
|
74
|
+
raise CommandResultStatusError if exec_options[:errexit] && exit_status != 0
|
77
75
|
|
78
76
|
result
|
79
77
|
end
|
@@ -42,9 +42,7 @@ module Rundock
|
|
42
42
|
# set unless scenario file and cli options specified and not localhost
|
43
43
|
next if localhost?
|
44
44
|
opt = oo.to_s.gsub(/_ssh_default/, '').to_sym
|
45
|
-
if !@node_info[@nodename.to_sym][:ssh_opts][opt] && !@options[opt]
|
46
|
-
@node_info[@nodename.to_sym][:ssh_opts][opt] = @options[oo]
|
47
|
-
end
|
45
|
+
@node_info[@nodename.to_sym][:ssh_opts][opt] = @options[oo] if !@node_info[@nodename.to_sym][:ssh_opts][opt] && !@options[opt]
|
48
46
|
end
|
49
47
|
|
50
48
|
# replace cli ssh options if exists
|
@@ -22,7 +22,8 @@ module Rundock
|
|
22
22
|
return cmd unless args
|
23
23
|
cmd.gsub(/\$#/, args.length.to_s)
|
24
24
|
.gsub(/\$@/, args.join(' '))
|
25
|
-
.gsub(/\$[1-9]
|
25
|
+
.gsub(/\$[1-9]/) { |arg_n| args[arg_n.chars[1..-1].join.to_i - 1] }
|
26
|
+
.gsub(/(\$\{)(\w+)(\})/) { ENV[Regexp.last_match(2)] }
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
data/lib/rundock/version.rb
CHANGED
@@ -10,3 +10,4 @@ write_echo:
|
|
10
10
|
- mkdir /var/tmp/hello_rundock_from_$1_scenario
|
11
11
|
- echo 'Hello Rundock from task with args Scenario. $@ $#' > /var/tmp/hello_rundock_from_$1_scenario/hello_rundock_from_$1_scenario
|
12
12
|
- cp /var/tmp/hello_rundock_from_$1_scenario/hello_rundock_from_$1_scenario /var/tmp/hello_rundock_from_$1_scenario_$2
|
13
|
+
- cp /var/tmp/hello_rundock_from_$1_scenario/hello_rundock_from_$1_scenario /var/tmp/hello_rundock_from_${USER}_scenario
|
@@ -5,6 +5,7 @@ describe file('/var/tmp/hello_rundock_from_task_with_args_scenario/hello_rundock
|
|
5
5
|
its(:content) { should match(/Hello Rundock from task with args Scenario. task_with_args two 2/) }
|
6
6
|
end
|
7
7
|
|
8
|
-
describe file(
|
8
|
+
describe file("/var/tmp/hello_rundock_from_#{ENV['USER']}_scenario") do
|
9
9
|
it { should be_file }
|
10
|
+
its(:content) { should match(/Hello Rundock from task with args Scenario. task_with_args two 2/) }
|
10
11
|
end
|
@@ -17,3 +17,4 @@ write_echo:
|
|
17
17
|
- mkdir /var/tmp/hello_rundock_from_$1_scenario
|
18
18
|
- echo 'Hello Rundock from task with args Scenario. $@ $#' > /var/tmp/hello_rundock_from_$1_scenario/hello_rundock_from_$1_scenario
|
19
19
|
- cp /var/tmp/hello_rundock_from_$1_scenario/hello_rundock_from_$1_scenario /var/tmp/hello_rundock_from_$1_scenario_$2
|
20
|
+
- cp /var/tmp/hello_rundock_from_$1_scenario/hello_rundock_from_$1_scenario /var/tmp/hello_rundock_from_${USER}_scenario
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rundock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hiracy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|