serverspec 0.10.13 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serverspec/helper.rb +4 -0
- data/lib/serverspec/helper/attributes.rb +2 -0
- data/lib/serverspec/helper/detect_os.rb +4 -4
- data/lib/serverspec/helper/properties.rb +14 -0
- data/lib/serverspec/properties.rb +17 -0
- data/lib/serverspec/version.rb +1 -1
- data/spec/helpers/properties_spec.rb +11 -0
- metadata +6 -4
- data/spec/helpers/attributes_spec.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 279b84aaad3e71e171fe5872691185331de88e42
|
4
|
+
data.tar.gz: cdbc4f32caca9fb007181aa281608f4ee9d32b83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee6180eac5a04397eec6491a327543fcd3afe864ece743929a3640953ac40a170e132792d1a817054debbfd0a69b263862ee2431c8dfca4a1b85a76201e28ed3
|
7
|
+
data.tar.gz: 3a835a4d699bbe5089b8e62e8f677b0db591493c9419a56713ce0bfd7e362a2f4d895ee62310c3fe64830fc4c9b4caba028791d798e233ed94ff0fb5a88df951
|
data/lib/serverspec/helper.rb
CHANGED
@@ -26,6 +26,10 @@ require 'serverspec/helper/detect_os'
|
|
26
26
|
require 'serverspec/helper/attributes'
|
27
27
|
include Serverspec::Helper::Attributes
|
28
28
|
|
29
|
+
# Properties helper
|
30
|
+
require 'serverspec/helper/properties'
|
31
|
+
include Serverspec::Helper::Properties
|
32
|
+
|
29
33
|
# Subject type helper
|
30
34
|
require 'serverspec/helper/type'
|
31
35
|
include Serverspec::Helper::Type
|
@@ -4,9 +4,11 @@ module Serverspec
|
|
4
4
|
module Helper
|
5
5
|
module Attributes
|
6
6
|
def attr
|
7
|
+
puts "Warning: attr method will be obsoleted. Please use property method instead."
|
7
8
|
Serverspec::Attributes.instance.attributes
|
8
9
|
end
|
9
10
|
def attr_set(attr)
|
11
|
+
puts "Warning: attr_set method will be obsoleted. Please use set_property method instead."
|
10
12
|
Serverspec::Attributes.instance.attributes(attr)
|
11
13
|
end
|
12
14
|
end
|
@@ -2,14 +2,14 @@ module Serverspec
|
|
2
2
|
module Helper
|
3
3
|
module DetectOS
|
4
4
|
def commands
|
5
|
-
|
5
|
+
property[:os_type] = {} if ! property[:os_type]
|
6
6
|
host = RSpec.configuration.ssh ? RSpec.configuration.ssh.host : 'localhost'
|
7
7
|
|
8
|
-
if
|
9
|
-
os =
|
8
|
+
if property[:os_type][host]
|
9
|
+
os = property[:os_type][host]
|
10
10
|
else
|
11
11
|
os = backend(Serverspec::Commands::Base).check_os
|
12
|
-
|
12
|
+
property[:os_type][host] = os
|
13
13
|
end
|
14
14
|
|
15
15
|
self.class.const_get('Serverspec').const_get('Commands').const_get(os).new
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'serverspec/properties'
|
2
|
+
|
3
|
+
module Serverspec
|
4
|
+
module Helper
|
5
|
+
module Properties
|
6
|
+
def property
|
7
|
+
Serverspec::Properties.instance.properties
|
8
|
+
end
|
9
|
+
def set_property(prop)
|
10
|
+
Serverspec::Properties.instance.properties(prop)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/serverspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- lib/serverspec/helper/freebsd.rb
|
144
144
|
- lib/serverspec/helper/gentoo.rb
|
145
145
|
- lib/serverspec/helper/plamo.rb
|
146
|
+
- lib/serverspec/helper/properties.rb
|
146
147
|
- lib/serverspec/helper/puppet.rb
|
147
148
|
- lib/serverspec/helper/redhat.rb
|
148
149
|
- lib/serverspec/helper/smartos.rb
|
@@ -173,6 +174,7 @@ files:
|
|
173
174
|
- lib/serverspec/matchers/return_exit_status.rb
|
174
175
|
- lib/serverspec/matchers/return_stderr.rb
|
175
176
|
- lib/serverspec/matchers/return_stdout.rb
|
177
|
+
- lib/serverspec/properties.rb
|
176
178
|
- lib/serverspec/setup.rb
|
177
179
|
- lib/serverspec/subject.rb
|
178
180
|
- lib/serverspec/type/base.rb
|
@@ -289,7 +291,7 @@ files:
|
|
289
291
|
- spec/gentoo/service_spec.rb
|
290
292
|
- spec/gentoo/user_spec.rb
|
291
293
|
- spec/gentoo/zfs_spec.rb
|
292
|
-
- spec/helpers/
|
294
|
+
- spec/helpers/properties_spec.rb
|
293
295
|
- spec/plamo/cgroup_spec.rb
|
294
296
|
- spec/plamo/command_spec.rb
|
295
297
|
- spec/plamo/cron_spec.rb
|
@@ -490,7 +492,7 @@ test_files:
|
|
490
492
|
- spec/gentoo/service_spec.rb
|
491
493
|
- spec/gentoo/user_spec.rb
|
492
494
|
- spec/gentoo/zfs_spec.rb
|
493
|
-
- spec/helpers/
|
495
|
+
- spec/helpers/properties_spec.rb
|
494
496
|
- spec/plamo/cgroup_spec.rb
|
495
497
|
- spec/plamo/command_spec.rb
|
496
498
|
- spec/plamo/cron_spec.rb
|