serverspec-runner 1.1.8 → 1.1.9

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: d760f5bf858ebb1d1814fd4f38b8e784c81102aa
4
- data.tar.gz: fd06be5ae9eee9a3ed81337e807eb39100a5cf15
3
+ metadata.gz: 26cbd7ddb81935a654b0bd87ac49a2d91ca4e199
4
+ data.tar.gz: c10302a87857547e9d122a581a6fae66067a8502
5
5
  SHA512:
6
- metadata.gz: 6c01617db414009714ee756564a30c822a2c7e8b1c723e9d40bc9a865cd26dd5f7e8185e464563177ce507b836b0cc1bee34ee798929956c8eda80bc84b648e1
7
- data.tar.gz: 7670c6300d5eb66944a163ce7f2b757931f965f38096c2b3a03aafb9bcb534b127fe5dffcd9c8ba50610a32385d439fba02b315dccd7c33f194913e55a3176b5
6
+ metadata.gz: 5467ca5d527762709dbef2903765487e0d2232724275814ccc909cd665f05064af885a751be33915a27a07f19d9f5938edb18bdd8e9c3c55ea070151fc77c8cf
7
+ data.tar.gz: da79a445f3ffafd13143e36c46baa64f0a03891eb6ecaa0026712bea22079c077aa4f65ddd970d84543fec415f22abf0d43776e011816dc5790582054f6d1f7b
data/README.md CHANGED
@@ -24,21 +24,22 @@ Edit your [spec-files](http://serverspec.org/resource_types.html).
24
24
  Edit your infrastructure or middleware tests scenario to "scenario.yml".
25
25
 
26
26
  ```
27
- test_top_dir: # test directory top
28
- : # test hierarchy directories
29
- test_bottom_dir: # test directory bottom
30
- - servername # ssh-accessible ip address or fqdn. or alias
27
+ test_top_dir: # test directory top
28
+ : # test hierarchy directories
29
+ test_bottom_dir: # test directory bottom
30
+ - servername # ssh-accessible ip address or fqdn. or alias
31
31
  - :
32
32
  - :
33
33
  :
34
34
  ---
35
- servername: # alias name(not required)
36
- host: 192.168.0.11 # ssh-accessible ip address or fqdn(required if alias exist)
37
- ssh_opts: # ssh options(not required)
38
- port: 22 # ssh port option(not required)
39
- user: "anyone" # ssh user option(not required)
40
- : # any other Net::SSH Options(not required)
41
- any_attribute: "aaa" # host attributes. left example available to get "property[:servername][:any_attribute]" from code(not required)
35
+ servername: # alias name(not required)
36
+ host: 192.168.0.11 # ssh-accessible ip address or fqdn(required if alias exist)
37
+ ssh_opts: # ssh options(not required)
38
+ port: 22 # ssh port option(not required)
39
+ user: "anyone" # ssh user option(not required)
40
+ keys: ["~/.ssh/id_rsa"] # ssh private keys option(not required)
41
+ : # any other Net::SSH Options(not required)
42
+ any_attribute: "aaa" # host attributes. this example available to get "property[:any_attribute]" from your codes(not required)
42
43
  :
43
44
  :
44
45
  ```
data/Rakefile CHANGED
@@ -6,6 +6,7 @@ require 'fileutils'
6
6
  require 'net/ssh'
7
7
  require 'open-uri'
8
8
  require 'serverspec-runner'
9
+ require 'serverspec-runner/util/hash'
9
10
 
10
11
  desc "Run serverspec to all scenario"
11
12
  task :spec => 'spec:all'
@@ -159,10 +160,7 @@ namespace :spec do
159
160
  scenarios = data
160
161
  else
161
162
  data.each do |k, v|
162
- platform[k.to_sym] = {}
163
- v.each do |kk, vv|
164
- platform[k.to_sym][kk.to_sym] = vv
165
- end
163
+ platform[k.to_sym] = v.deep_symbolize_keys
166
164
  end
167
165
  end
168
166
  end
@@ -2,4 +2,17 @@ class Hash
2
2
  def depth
3
3
  1 + (values.map{|v| Hash === v ? v.depth : 1}.max)
4
4
  end
5
+
6
+ def deep_symbolize_keys
7
+ self.each_with_object({}) do |(k, v), h|
8
+
9
+ if v.is_a?(Array)
10
+ v = v.map{|vv| vv.deep_symbolize_keys}
11
+ elsif v.is_a?(Hash)
12
+ v = v.deep_symbolize_keys
13
+ end
14
+
15
+ h[k.to_s.to_sym] = v
16
+ end
17
+ end
5
18
  end
@@ -1,3 +1,3 @@
1
1
  module ServerspecRunner
2
- VERSION = "1.1.8"
2
+ VERSION = "1.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverspec-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - hiracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-27 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: serverspec