rundock 1.0.8 → 1.1.0

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: 98f0161c6ca4ad171cede29edf9f91560ef25a28
4
- data.tar.gz: 8e6a81eac352b785e4684785619e5052c3b8c3cd
3
+ metadata.gz: fbd82387cd2af5b8416ca898c1195d206c2d1125
4
+ data.tar.gz: 3142354f64b527b7ab56d3f0ef4b8e523bbff554
5
5
  SHA512:
6
- metadata.gz: 6e514a919db53432ad753bcccd29b0697af2044928f1e6dede1deb0baa065f24f03f32997b0261219432178fe88b0f89023fc471b75100e642f7dabeebec58d3
7
- data.tar.gz: 05d7196e1b3f3d851d66bd7485f510ea6516c7d55ea9087eab17dfced86aa1ed1d2295ca509e9598f099f436ddcb913b8ebd4af43e83b10a062de105e2d6e00f
6
+ metadata.gz: bf24ed1fa1eb8fe67c635c87e19c59cfe3e0420f776c3ea8b6cbcb4496ab217f7a6a60d074402fb810fb28b08cb84bb7bc2dd8b53f50c1f71bb9a8f7e85b3bed
7
+ data.tar.gz: d4d6e4a40db0e57811cdc12de94c05bc0c3d50575f962aa68b1b50e4d9240c03d2a21279cd742b6406c565ed4e5bdb1c6e9ef62df79fb27025247778f072209f
data/.rubocop.yml CHANGED
@@ -69,5 +69,8 @@ Style/NumericPredicate:
69
69
  Style/MethodMissing:
70
70
  Enabled: false
71
71
 
72
+ Style/FormatStringToken:
73
+ Enabled: false
74
+
72
75
  Lint/UnusedMethodArgument:
73
76
  Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## v1.1.0
2
+
3
+ Update
4
+
5
+ - Support ssh configure
6
+ - Support task with environment variables
7
+
1
8
  ## v1.0.2
2
9
 
3
10
  Update
@@ -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]*/) { |arg_n| args[arg_n.chars[1..-1].join.to_i - 1] }
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
@@ -1,3 +1,3 @@
1
1
  module Rundock
2
- VERSION = '1.0.8'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -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('/var/tmp/hello_rundock_from_task_with_args_scenario_two') do
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.8
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-07 00:00:00.000000000 Z
11
+ date: 2017-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler