specinfra 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/specinfra.rb +2 -1
- data/lib/specinfra/command.rb +21 -0
- data/lib/specinfra/command/aix.rb +66 -0
- data/lib/specinfra/command/base.rb +305 -0
- data/lib/specinfra/command/darwin.rb +44 -0
- data/lib/specinfra/command/debian.rb +24 -0
- data/lib/specinfra/command/freebsd.rb +23 -0
- data/lib/specinfra/command/gentoo.rb +18 -0
- data/lib/specinfra/command/linux.rb +68 -0
- data/lib/specinfra/command/plamo.rb +21 -0
- data/lib/specinfra/command/redhat.rb +37 -0
- data/lib/specinfra/command/smartos.rb +21 -0
- data/lib/specinfra/command/solaris.rb +117 -0
- data/lib/specinfra/command/solaris10.rb +78 -0
- data/lib/specinfra/command/solaris11.rb +7 -0
- data/lib/specinfra/command/windows.rb +213 -0
- data/lib/specinfra/helper/backend.rb +4 -4
- data/lib/specinfra/helper/detect_os.rb +2 -2
- data/lib/specinfra/helper/os.rb +1 -1
- data/lib/specinfra/version.rb +1 -1
- data/spec/spec_helper.rb +0 -10
- metadata +97 -60
- checksums.yaml +0 -7
@@ -5,9 +5,9 @@ module SpecInfra
|
|
5
5
|
module #{backend}
|
6
6
|
def backend(commands_object=nil)
|
7
7
|
if ! respond_to?(:commands)
|
8
|
-
commands_object =
|
8
|
+
commands_object = SpecInfra::Command::Base.new
|
9
9
|
end
|
10
|
-
instance =
|
10
|
+
instance = SpecInfra::Backend::#{backend}.instance
|
11
11
|
instance.set_commands(commands_object || commands)
|
12
12
|
instance
|
13
13
|
end
|
@@ -18,9 +18,9 @@ module SpecInfra
|
|
18
18
|
module Backend
|
19
19
|
def backend_for(type)
|
20
20
|
if ! respond_to?(:commands)
|
21
|
-
commands_object =
|
21
|
+
commands_object = SpecInfra::Command::Base.new
|
22
22
|
end
|
23
|
-
instance = self.class.const_get('SpecInfra').const_get('Backend').const_get(
|
23
|
+
instance = self.class.const_get('SpecInfra').const_get('Backend').const_get(type.to_s.capitalize).instance
|
24
24
|
instance.set_commands(commands_object || commands)
|
25
25
|
instance
|
26
26
|
end
|
@@ -8,10 +8,10 @@ module SpecInfra
|
|
8
8
|
if property[:os_by_host][host]
|
9
9
|
os = property[:os_by_host][host]
|
10
10
|
else
|
11
|
-
os = backend(
|
11
|
+
os = backend(SpecInfra::Command::Base).check_os
|
12
12
|
property[:os_by_host][host] = os
|
13
13
|
end
|
14
|
-
self.class.const_get(
|
14
|
+
self.class.const_get('SpecInfra').const_get('Command').const_get(os[:family]).new
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/specinfra/helper/os.rb
CHANGED
data/lib/specinfra/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,64 +1,76 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Gosuke Miyashita
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2013-12-04 00:00:00 +09:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
14
22
|
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.3'
|
20
|
-
type: :development
|
21
23
|
prerelease: false
|
22
|
-
|
23
|
-
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
24
27
|
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
- - '>='
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 9
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 3
|
33
|
+
version: "1.3"
|
34
34
|
type: :development
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rake
|
35
38
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
- - '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
48
|
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: rspec
|
49
52
|
prerelease: false
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
type: :development
|
63
|
+
version_requirements: *id003
|
55
64
|
description: Common layer for serverspec and configspec
|
56
|
-
email:
|
65
|
+
email:
|
57
66
|
- gosukenator@gmail.com
|
58
67
|
executables: []
|
68
|
+
|
59
69
|
extensions: []
|
70
|
+
|
60
71
|
extra_rdoc_files: []
|
61
|
-
|
72
|
+
|
73
|
+
files:
|
62
74
|
- .gitignore
|
63
75
|
- .travis.yml
|
64
76
|
- Gemfile
|
@@ -83,6 +95,21 @@ files:
|
|
83
95
|
- lib/specinfra/backend/shellscript.rb
|
84
96
|
- lib/specinfra/backend/ssh.rb
|
85
97
|
- lib/specinfra/backend/winrm.rb
|
98
|
+
- lib/specinfra/command.rb
|
99
|
+
- lib/specinfra/command/aix.rb
|
100
|
+
- lib/specinfra/command/base.rb
|
101
|
+
- lib/specinfra/command/darwin.rb
|
102
|
+
- lib/specinfra/command/debian.rb
|
103
|
+
- lib/specinfra/command/freebsd.rb
|
104
|
+
- lib/specinfra/command/gentoo.rb
|
105
|
+
- lib/specinfra/command/linux.rb
|
106
|
+
- lib/specinfra/command/plamo.rb
|
107
|
+
- lib/specinfra/command/redhat.rb
|
108
|
+
- lib/specinfra/command/smartos.rb
|
109
|
+
- lib/specinfra/command/solaris.rb
|
110
|
+
- lib/specinfra/command/solaris10.rb
|
111
|
+
- lib/specinfra/command/solaris11.rb
|
112
|
+
- lib/specinfra/command/windows.rb
|
86
113
|
- lib/specinfra/configuration.rb
|
87
114
|
- lib/specinfra/helper.rb
|
88
115
|
- lib/specinfra/helper/backend.rb
|
@@ -97,31 +124,41 @@ files:
|
|
97
124
|
- spec/helper/properties_spec.rb
|
98
125
|
- spec/spec_helper.rb
|
99
126
|
- specinfra.gemspec
|
100
|
-
|
101
|
-
|
127
|
+
has_rdoc: true
|
128
|
+
homepage: ""
|
129
|
+
licenses:
|
102
130
|
- MIT
|
103
|
-
metadata: {}
|
104
131
|
post_install_message:
|
105
132
|
rdoc_options: []
|
106
|
-
|
133
|
+
|
134
|
+
require_paths:
|
107
135
|
- lib
|
108
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
hash: 3
|
142
|
+
segments:
|
143
|
+
- 0
|
144
|
+
version: "0"
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
hash: 3
|
151
|
+
segments:
|
152
|
+
- 0
|
153
|
+
version: "0"
|
118
154
|
requirements: []
|
155
|
+
|
119
156
|
rubyforge_project:
|
120
|
-
rubygems_version:
|
157
|
+
rubygems_version: 1.6.2
|
121
158
|
signing_key:
|
122
|
-
specification_version:
|
159
|
+
specification_version: 3
|
123
160
|
summary: Common layer for serverspec and configspec
|
124
|
-
test_files:
|
161
|
+
test_files:
|
125
162
|
- spec/configurtaion_spec.rb
|
126
163
|
- spec/helper/backend_spec.rb
|
127
164
|
- spec/helper/properties_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: edbba5bc30cf23808d8e828ac95c1f398526df6f
|
4
|
-
data.tar.gz: a669a05b82327a45f7b61651b83cf9c7b2c43046
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 3bbb954c0da945b9299b7bb058c62913c469cc57a3217153c0fddc81583fe9580859810ba425f646c7f21bc052f3428d60429237c334cdc6e457b450768dbfcc
|
7
|
-
data.tar.gz: a3b0b7dea9ce2e7800b8ba03cb11586508c98f9493f90aecb153baeb162cc97e14d1d99e724950eee11472f8d9c98b5c2bef10b586c76d72bbe842c8b9903077
|