kitchen-verifier-shell 0.1.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5a69160ce452a13c34cfed86673677aee72454d8
4
- data.tar.gz: 2e78c9402cfdd2186b329219b69f2102c55c7fd3
3
+ metadata.gz: ce4506347f7d67c10f86d0120ba07ee1bc286520
4
+ data.tar.gz: 202f626e545f47267ee8a0ad88b3403d53b8d867
5
5
  SHA512:
6
- metadata.gz: f8bdd9edbc01c2fa7649f02715b45c4b953ecacf76b414e40ec3f9a3c6b0df171e581bcd16805a7e5d3ec6d4459ca7f788d5fd65d7b2c5cdf768140c5751fe90
7
- data.tar.gz: ecbb8bb3f5a86a7b521ccd27c81dce6e1e6d0f3cee093210c4e7eccb8cce3e52e8757976f13d0b88057ba13020fc140c546e103b3587b990e07dcf9285e438c2
6
+ metadata.gz: c16929ee3a8cd86792bb117125d33b74525a46696f0fa4265aa186451c82b2388a71feef7e9b780a83c7c69c138336accfb6def1e0b360db2ce6fe5740e348e9
7
+ data.tar.gz: 4bce1f4dcb470995bd3169ab66dc18ba94595398122fdb2e877ff04721a37fd498819536b64e5288dbb68ab3c165d7364e6f26ef961929eade1c9889d8f477c5
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "kitchen-verifier-shell"
7
- spec.version = "0.1.1"
7
+ spec.version = "0.2.0"
8
8
  spec.authors = ["sawanoboly"]
9
9
  spec.email = ["sawanoboriyu@higanworks.com"]
10
10
 
@@ -36,16 +36,33 @@ module Kitchen
36
36
  default_config :command, "true"
37
37
  default_config :shellout_opts, {}
38
38
  default_config :live_stream, $stdout
39
+ default_config :remote_exec, false
39
40
 
40
41
  # (see Base#call)
41
42
  def call(state)
42
43
  info("[#{name}] Verify on instance=#{instance} with state=#{state}")
43
44
  sleep_if_set
44
45
  merge_state_to_env(state)
45
- shellout
46
+ if config[:remote_exec]
47
+ instance.transport.connection(state) do |conn|
48
+ conn.execute(config[:command])
49
+ end
50
+ else
51
+ shellout
52
+ end
46
53
  debug("[#{name}] Verify completed.")
47
54
  end
48
55
 
56
+ ## for legacy drivers.
57
+ def run_command
58
+ if config[:remote_exec]
59
+ config[:command]
60
+ else
61
+ shellout
62
+ nil
63
+ end
64
+ end
65
+
49
66
  private
50
67
 
51
68
  # Sleep for a period of time, if a value is set in the config.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-verifier-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-03 00:00:00.000000000 Z
11
+ date: 2015-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen