rspec-system 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.nodeset.yml ADDED
@@ -0,0 +1,55 @@
1
+ ---
2
+ default_set: 'centos-64-x64'
3
+ sets:
4
+ 'centos-58-x64':
5
+ nodes:
6
+ "main":
7
+ prefab: 'centos-58-x64'
8
+ 'centos-59-x64':
9
+ nodes:
10
+ "main":
11
+ prefab: 'centos-59-x64'
12
+ 'centos-63-x64':
13
+ nodes:
14
+ "main":
15
+ prefab: 'centos-63-x64'
16
+ 'centos-64-x64':
17
+ nodes:
18
+ "main":
19
+ prefab: 'centos-64-x64'
20
+ 'fedora-18-x64':
21
+ nodes:
22
+ "main":
23
+ prefab: 'fedora-18-x64'
24
+ 'debian-606-x64':
25
+ nodes:
26
+ "main":
27
+ prefab: 'debian-606-x64'
28
+ 'debian-607-x64':
29
+ nodes:
30
+ "main":
31
+ prefab: 'debian-607-x64'
32
+ 'debian-70rc1-x64':
33
+ nodes:
34
+ "main":
35
+ prefab: 'debian-70rc1-x64'
36
+ 'ubuntu-server-1004-x64':
37
+ nodes:
38
+ "main":
39
+ prefab: 'ubuntu-server-1004-x64'
40
+ 'ubuntu-server-10044-x64':
41
+ nodes:
42
+ "main":
43
+ prefab: 'ubuntu-server-10044-x64'
44
+ 'ubuntu-server-1204-x64':
45
+ nodes:
46
+ "main":
47
+ prefab: 'ubuntu-server-1204-x64'
48
+ 'ubuntu-server-12042-x64':
49
+ nodes:
50
+ "main":
51
+ prefab: 'ubuntu-server-12042-x64'
52
+ 'sles-11sp1-x64':
53
+ nodes:
54
+ "main":
55
+ prefab: 'sles-11sp1-x64'
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
+ gem 'rake'
6
7
  gem 'mocha', :require => 'mocha/api'
7
8
  end
8
9
 
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ Bundler.require :default
5
+
6
+ require 'rspec/core/rake_task'
7
+ require 'rspec-system/rake_task'
8
+
9
+ task :default do
10
+ sh %{rake -T}
11
+ end
@@ -42,7 +42,7 @@ module RSpecSystem
42
42
 
43
43
  result = ""
44
44
  Dir.chdir(@vagrant_path) do
45
- cmd = "vagrant ssh #{dest} --command \"cd /tmp && sudo -i #{cmd}\""
45
+ cmd = "vagrant ssh #{dest} --command \"cd /tmp && sudo #{cmd}\""
46
46
  log.debug("[vagrant#run] Running command: #{cmd}")
47
47
  result = systemu cmd
48
48
  log.debug("[Vagrant#run] Finished running command: #{cmd}. Result is #{result}.")
@@ -22,6 +22,29 @@
22
22
  vagrant:
23
23
  box: 'centos-58-x64'
24
24
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-58-x64.box'
25
+ 'centos-59-x64':
26
+ description: "Vagrant images obtained from http://puppet-vagrant-boxes.puppetlabs.com"
27
+ facts:
28
+ architecture: x86_64
29
+ kernel: Linux
30
+ operatingsystem: CentOS
31
+ lsbdistid: CentOS
32
+ facterversion: "1.6.18"
33
+ kernelmajversion: "2.6"
34
+ kernelrelease: "2.6.18-348.el5"
35
+ kernelversion: "2.6.18"
36
+ lsbdistcodename: Final
37
+ lsbdistdescription: "CentOS release 5.9 (Final)"
38
+ lsbdistrelease: "5.9"
39
+ lsbmajdistrelease: "5"
40
+ lsbrelease: ":core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch"
41
+ operatingsystemrelease: "5.9"
42
+ osfamily: RedHat
43
+ rubyversion: "1.9.2"
44
+ provider_specifics:
45
+ vagrant:
46
+ box: 'centos-59-x64-vbox4210-nocm'
47
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210-nocm.box'
25
48
  'centos-63-x64':
26
49
  description: "Vagrant images obtained from http://puppet-vagrant-boxes.puppetlabs.com"
27
50
  facts:
@@ -44,6 +67,40 @@
44
67
  vagrant:
45
68
  box: 'centos-63-x64'
46
69
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-63-x64.box'
70
+ 'centos-64-x64':
71
+ description: ""
72
+ facts:
73
+ kernelrelease: "2.6.32-358.el6.x86_64"
74
+ operatingsystem: CentOS
75
+ kernelmajversion: "2.6"
76
+ architecture: x86_64
77
+ facterversion: "1.6.18"
78
+ kernelversion: "2.6.32"
79
+ operatingsystemrelease: "6.4"
80
+ osfamily: RedHat
81
+ kernel: Linux
82
+ rubyversion: "1.8.7"
83
+ provider_specifics:
84
+ vagrant:
85
+ box: 'centos-64-x64-vbox4210-nocm'
86
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box'
87
+ 'fedora-18-x64':
88
+ description: ""
89
+ facts:
90
+ architecture: x86_64
91
+ kernel: Linux
92
+ operatingsystem: Fedora
93
+ facterversion: 1.6.18
94
+ kernelmajversion: "3.6"
95
+ kernelrelease: 3.6.10-4.fc18.x86_64
96
+ kernelversion: 3.6.10
97
+ operatingsystemrelease: "18"
98
+ osfamily: RedHat
99
+ rubyversion: 1.9.3
100
+ provider_specifics:
101
+ vagrant:
102
+ box: 'fedora-18-x64-vbox4210-nocm'
103
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box'
47
104
  'debian-606-x64':
48
105
  description: "Vagrant images obtained from http://puppet-vagrant-boxes.puppetlabs.com"
49
106
  facts:
@@ -63,6 +120,50 @@
63
120
  vagrant:
64
121
  box: 'debian-606-x64'
65
122
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-606-x64.box'
123
+ 'debian-607-x64':
124
+ description: ""
125
+ facts:
126
+ kernel: Linux
127
+ lsbmajdistrelease: "6"
128
+ operatingsystemrelease: "6.0.7"
129
+ kernelrelease: "2.6.32-5-amd64"
130
+ osfamily: Debian
131
+ lsbdistrelease: "6.0.7"
132
+ lsbdistcodename: squeeze
133
+ lsbdistdescription: "Debian GNU/Linux 6.0.7 (squeeze)"
134
+ kernelversion: "2.6.32"
135
+ operatingsystem: Debian
136
+ kernelmajversion: "2.6"
137
+ facterversion: "1.6.18"
138
+ rubyversion: "1.8.7"
139
+ lsbdistid: Debian
140
+ architecture: amd64
141
+ provider_specifics:
142
+ vagrant:
143
+ box: 'debian-607-x64-vbox4210-nocm'
144
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-607-x64-vbox4210-nocm.box'
145
+ 'debian-70rc1-x64':
146
+ description: ""
147
+ facts:
148
+ architecture: amd64
149
+ kernel: Linux
150
+ operatingsystem: Debian
151
+ lsbdistid: Debian
152
+ facterversion: "1.6.18"
153
+ kernelmajversion: "3.2"
154
+ kernelrelease: "3.2.0-4-amd64"
155
+ kernelversion: "3.2.0"
156
+ lsbdistcodename: wheezy
157
+ lsbdistdescription: "Debian GNU/Linux 7.0 (wheezy)"
158
+ lsbdistrelease: "7.0"
159
+ lsbmajdistrelease: "7"
160
+ operatingsystemrelease: "7.0"
161
+ osfamily: Debian
162
+ rubyversion: "1.9.3"
163
+ provider_specifics:
164
+ vagrant:
165
+ box: 'debian-70rc1-x64-vbox4210-nocm'
166
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210-nocm.box'
66
167
  'ubuntu-server-1004-x64':
67
168
  description: ''
68
169
  facts:
@@ -85,6 +186,28 @@
85
186
  vagrant:
86
187
  box: 'ubuntu-server-1004-x64'
87
188
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-1004-x64.box'
189
+ 'ubuntu-server-10044-x64':
190
+ description: ""
191
+ facts:
192
+ kernel: Linux
193
+ lsbmajdistrelease: "10"
194
+ operatingsystemrelease: "10.04"
195
+ kernelrelease: "2.6.32-46-server"
196
+ lsbdistrelease: "10.04"
197
+ osfamily: Debian
198
+ kernelversion: "2.6.32"
199
+ lsbdistcodename: lucid
200
+ lsbdistdescription: "Ubuntu 10.04.4 LTS"
201
+ kernelmajversion: "2.6"
202
+ operatingsystem: Ubuntu
203
+ facterversion: "1.6.18"
204
+ architecture: amd64
205
+ rubyversion: "1.8.7"
206
+ lsbdistid: Ubuntu
207
+ provider_specifics:
208
+ vagrant:
209
+ box: 'ubuntu-server-10044-x64-vbox4210-nocm'
210
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210-nocm.box'
88
211
  'ubuntu-server-1204-x64':
89
212
  description: ''
90
213
  facts:
@@ -107,6 +230,28 @@
107
230
  vagrant:
108
231
  box: 'ubuntu-server-1204-x64'
109
232
  box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-1204-x64.box'
233
+ 'ubuntu-server-12042-x64':
234
+ description: "Foo"
235
+ facts:
236
+ architecture: amd64
237
+ kernel: Linux
238
+ operatingsystem: Ubuntu
239
+ lsbdistid: Ubuntu
240
+ facterversion: "1.6.18"
241
+ kernelmajversion: "3.5"
242
+ kernelrelease: "3.5.0-23-generic"
243
+ kernelversion: "3.5.0"
244
+ lsbdistcodename: precise
245
+ lsbdistdescription: "Ubuntu 12.04.2 LTS"
246
+ lsbdistrelease: "12.04"
247
+ lsbmajdistrelease: "12"
248
+ operatingsystemrelease: "12.04"
249
+ osfamily: Debian
250
+ rubyversion: "1.9.3"
251
+ provider_specifics:
252
+ vagrant:
253
+ box: 'ubuntu-server-12042-x64-vbox4210-nocm'
254
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box'
110
255
  'sles-11sp1-x64':
111
256
  description: ''
112
257
  facts:
@@ -116,11 +261,11 @@
116
261
  osfamily: Suse
117
262
  kernelversion: "2.6.32.12"
118
263
  operatingsystem: SLES
119
- facterversion: "1.6.17"
264
+ facterversion: "1.6.18"
120
265
  kernelmajversion: "2.6"
121
266
  rubyversion: "1.8.7"
122
267
  architecture: x86_64
123
268
  provider_specifics:
124
269
  vagrant:
125
- box: 'sles-11sp1-x64'
126
- box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64.box'
270
+ box: 'sles-11sp1-x64-vbox4210-nocm'
271
+ box_url: 'http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210-nocm.box'
data/rspec-system.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  # Metadata
4
4
  s.name = "rspec-system"
5
- s.version = "0.1.5"
5
+ s.version = "0.2.0"
6
6
  s.authors = ["Ken Barber"]
7
7
  s.email = ["ken@bob.sh"]
8
8
  s.homepage = "https://github.com/kbarber/rspec-system"
@@ -0,0 +1,5 @@
1
+ require 'rspec-system/spec_helper'
2
+
3
+ RSpec.configure do |c|
4
+ c.include RSpecSystem::Helpers
5
+ end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper_system'
2
+
3
+ describe "basic tests:" do
4
+ it "check system_run works" do
5
+ system_run("cat /etc/hosts") do |s, o, e|
6
+ s.exitstatus.should == 0
7
+ o.should =~ /localhost/
8
+ end
9
+ end
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-system
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-07 00:00:00.000000000 Z
12
+ date: 2013-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -67,11 +67,13 @@ extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
69
  - .gitignore
70
+ - .nodeset.yml
70
71
  - .ruby-version
71
72
  - .travis.yml
72
73
  - Gemfile
73
74
  - LICENSE
74
75
  - README.md
76
+ - Rakefile
75
77
  - examples/.gitignore
76
78
  - examples/.nodeset.yml
77
79
  - examples/.ruby-version
@@ -99,6 +101,8 @@ files:
99
101
  - spec/fixtures/nodeset_example1.yml
100
102
  - spec/fixtures/nodeset_example2.yml
101
103
  - spec/spec_helper.rb
104
+ - spec/spec_helper_system.rb
105
+ - spec/system/basic_spec.rb
102
106
  - spec/unit/kwalify-schemas/nodeset_schema_spec.rb
103
107
  - spec/unit/kwalify-schemas/prefabs_schema_spec.rb
104
108
  homepage: https://github.com/kbarber/rspec-system
@@ -127,6 +131,7 @@ signing_key:
127
131
  specification_version: 3
128
132
  summary: System testing with rspec
129
133
  test_files:
134
+ - spec/system/basic_spec.rb
130
135
  - spec/unit/kwalify-schemas/nodeset_schema_spec.rb
131
136
  - spec/unit/kwalify-schemas/prefabs_schema_spec.rb
132
137
  has_rdoc: