beaker-rspec 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- N2M0Mzc5ZjhlN2JjZTY3NGI5ZGMwZGUyN2UxM2UyNjA1ZTliMGE2Zg==
4
+ YzRmYjczM2IwYmUyMjI3NWI2ZGMwYjhmNzk3N2VkOGFjODg5NDRjZQ==
5
5
  data.tar.gz: !binary |-
6
- NGMyZmU0NzhkNzY0Y2VhNzgzMDE1NWJiMjRhMzIyZDFkNDQ1ZGFhNA==
7
- !binary "U0hBNTEy":
6
+ MWI2MDRiYWYzNjUyZGI0NTc5Nzk4YWIxOWFlM2FhNTk4MmQwZDFlYQ==
7
+ SHA512:
8
8
  metadata.gz: !binary |-
9
- MGFhNGM3ZDFlZjE5OTEyM2RkZGEyZGVmZDg2YzBkZGI5M2M1YjVjYmVhZDll
10
- YWQzNWEwODcyMjVkN2IyYzFiODE0MTU2MDA5NWEzZTk4NDhiMzgzZjVlMjAx
11
- YTNmZjVmOTRkNGY4NGE2MTA4YjczMDhhMGYwMTY0ZTM5NWUwODg=
9
+ ZDAwNGNiYjgwZjJlN2I0ZWM3ZjkxNWVjM2JhNmQ2NTk1ZTg1ZmFkOTE1MzNh
10
+ ODQ4ZGRkYzEzMTkwNWE2MDliZWZiMDgyMThlNWJiNmYwMzk2ZDAwMDY0MzZj
11
+ ZDU3MjQzZDIwOGRjZTBhMjRkMDg0ZTkzNDBkZThkYWQ4ZGFlZTM=
12
12
  data.tar.gz: !binary |-
13
- ZjBkNWFlNzgwYTI5OGNjNjA4NWQ1YTNjNWZmNWVlNTJiMDQ4MzliNmI4N2Qz
14
- MzkwMjdjYTg2MWVmOTMxZGY2OTVlM2E3NjQ3MGNlMzRjMzEwM2Q0YmYzODdj
15
- YTY4ZGJiNWYwNTI3NzFkYjVhOTUxMGQ4MGU3Mzk0NTk3ZWZlNmU=
13
+ MmFiZTU0ZWFkNWE4MzYxZTVkMTM3NjUwMDcwODMxOGI5MzY4ZjZmZGQ1ZjY5
14
+ MzlhNmViZjU5YmFiNGU3Y2EwM2YyYjJkZTg0NDU0NTE2YjE2MDdjMDdkYzJk
15
+ MTAzMmU3YjExM2JiZjI2Yjk0NDkyODQxNWMzZTg1M2M1NmYxMGI=
data/beaker-rspec.gemspec CHANGED
@@ -6,12 +6,12 @@ less_than_one_nine = ruby_conf['MAJOR'].to_i == 1 && ruby_conf['MINOR'].to_i < 9
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "beaker-rspec"
9
- s.version = '2.0.0'
9
+ s.version = '2.0.1'
10
10
  s.authors = ["Puppetlabs"]
11
11
  s.email = ["sqa@puppetlabs.com"]
12
12
  s.homepage = "https://github.com/puppetlabs/beaker-rspec"
13
13
  s.summary = %q{RSpec bindings for beaker}
14
- s.description = %q{RSpec bindings for beaker}
14
+ s.description = %q{RSpec bindings for beaker, see https://github.com/puppetlabs/beaker}
15
15
  s.license = 'Apache2'
16
16
 
17
17
 
@@ -21,10 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.require_paths = ["lib"]
22
22
 
23
23
  # Testing dependencies
24
- s.add_development_dependency 'rspec', '2.13.0'
25
24
  s.add_development_dependency 'fakefs', '0.4'
26
- s.add_development_dependency 'specinfra'
27
- s.add_development_dependency 'serverspec'
28
25
  s.add_development_dependency 'rake'
29
26
  s.add_development_dependency 'simplecov' unless less_than_one_nine
30
27
 
@@ -34,6 +31,8 @@ Gem::Specification.new do |s|
34
31
  s.add_development_dependency 'thin'
35
32
 
36
33
  # Run time dependencies
37
- s.add_runtime_dependency 'beaker'
38
- s.add_runtime_dependency 'rspec'
34
+ s.add_runtime_dependency 'beaker', '~> 1.3'
35
+ s.add_runtime_dependency 'rspec', '~> 2.14'
36
+ s.add_runtime_dependency 'serverspec', '~> 0.14'
37
+ s.add_runtime_dependency 'specinfra', '~> 0.3'
39
38
  end
@@ -18,14 +18,14 @@ module BeakerRSpec
18
18
  # Accessor for options hash
19
19
  # @return Hash options
20
20
  def options
21
- @options
21
+ RSpec.configuration.options
22
22
  end
23
23
 
24
24
  # Provision the hosts to run tests on.
25
25
  # Assumes #setup has already been called.
26
26
  #
27
27
  def provision
28
- @network_manager = Beaker::NetworkManager.new(@options, @logger)
28
+ @network_manager = Beaker::NetworkManager.new(options, @logger)
29
29
  RSpec.configuration.hosts = @network_manager.provision
30
30
  end
31
31
 
@@ -39,12 +39,13 @@ module BeakerRSpec
39
39
  # @param [Array<String>] args The argument array of options for configuring Beaker
40
40
  # See 'beaker --help' for full list of supported command line options
41
41
  def setup(args = [])
42
- @options_parser = Beaker::Options::Parser.new
43
- @options = @options_parser.parse_args(args)
44
- @options[:debug] = true
45
- @logger = Beaker::Logger.new(@options)
46
- @options[:logger] = @logger
42
+ options_parser = Beaker::Options::Parser.new
43
+ options = options_parser.parse_args(args)
44
+ options[:debug] = true
45
+ @logger = Beaker::Logger.new(options)
46
+ options[:logger] = @logger
47
47
  RSpec.configuration.hosts = []
48
+ RSpec.configuration.options = options
48
49
  end
49
50
 
50
51
  # Accessor for hosts object
@@ -8,6 +8,8 @@ RSpec.configure do |c|
8
8
 
9
9
  # Define persistant hosts setting
10
10
  c.add_setting :hosts, :default => []
11
+ # Define persistant options setting
12
+ c.add_setting :options, :default => {}
11
13
 
12
14
  # Defined target nodeset
13
15
  nodeset = ENV['RS_SET'] || 'default'
@@ -15,9 +17,11 @@ RSpec.configure do |c|
15
17
 
16
18
  preserve = ENV['RS_DESTROY'] == 'no' ? '--preserve-hosts' : ''
17
19
  fresh_nodes = ENV['RS_PROVISION'] == 'no' ? '--no-provision' : ''
20
+ keyfile = ENV['RS_KEYFILE'] ? ['--keyfile', ENV['RS_KEYFILE']] : []
21
+ debug = ENV['RS_DEBUG'] ? ['--log-level', 'debug'] : []
18
22
 
19
23
  # Configure all nodes in nodeset
20
- c.setup([preserve, fresh_nodes, '--type','git','--hosts', nodesetfile])
24
+ c.setup([preserve, fresh_nodes, '--hosts', nodesetfile, keyfile, debug].flatten)
21
25
  c.provision
22
26
  c.validate
23
27
 
data/sample.cfg CHANGED
@@ -11,6 +11,7 @@ HOSTS:
11
11
  box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210.box
12
12
  ip: 192.168.20.20
13
13
  distmoduledir: .
14
+ pe_dir: http://enterprise.delivery.puppetlabs.net/3.1/ci-ready/
14
15
  ubuntu-10-04-4-x64-agent:
15
16
  roles:
16
17
  - agent
@@ -20,6 +21,8 @@ HOSTS:
20
21
  box_url: http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-10044-x64-vbox4210.box
21
22
  ip: 192.168.21.21
22
23
  distmoduledir: .
24
+ pe_dir: http://enterprise.delivery.puppetlabs.net/3.1/ci-ready/
23
25
  CONFIG:
24
26
  nfs_server: none
25
27
  consoleport: 443
28
+ type: git
@@ -8,10 +8,15 @@ describe "ignore" do
8
8
  end
9
9
  end
10
10
 
11
+ example "access options hash" do
12
+ install_pe
13
+ end
14
+
11
15
  hosts.each do |node|
12
16
  describe service('ssh'), :node => node do
13
17
  it { should be_running }
14
18
  it { should be_enabled }
15
19
  end
16
20
  end
21
+
17
22
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,3 @@
1
- ENV['RS_SETFILE'] = 'sample.cfg'
1
+ ENV['RS_SETFILE'] ||= 'sample.cfg'
2
2
 
3
3
  require "beaker-rspec"
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-06 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: rspec
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '='
18
- - !ruby/object:Gem::Version
19
- version: 2.13.0
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '='
25
- - !ruby/object:Gem::Version
26
- version: 2.13.0
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: fakefs
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +25,7 @@ dependencies:
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0.4'
41
27
  - !ruby/object:Gem::Dependency
42
- name: specinfra
28
+ name: rake
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - ! '>='
@@ -53,7 +39,7 @@ dependencies:
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
- name: serverspec
42
+ name: simplecov
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - ! '>='
@@ -67,7 +53,7 @@ dependencies:
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
- name: rake
56
+ name: yard
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - ! '>='
@@ -81,7 +67,7 @@ dependencies:
81
67
  - !ruby/object:Gem::Version
82
68
  version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
- name: simplecov
70
+ name: markdown
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - ! '>='
@@ -95,7 +81,7 @@ dependencies:
95
81
  - !ruby/object:Gem::Version
96
82
  version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
- name: yard
84
+ name: thin
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - ! '>='
@@ -109,62 +95,62 @@ dependencies:
109
95
  - !ruby/object:Gem::Version
110
96
  version: '0'
111
97
  - !ruby/object:Gem::Dependency
112
- name: markdown
98
+ name: beaker
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - ! '>='
101
+ - - ~>
116
102
  - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
103
+ version: '1.3'
104
+ type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ! '>='
108
+ - - ~>
123
109
  - !ruby/object:Gem::Version
124
- version: '0'
110
+ version: '1.3'
125
111
  - !ruby/object:Gem::Dependency
126
- name: thin
112
+ name: rspec
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
- - - ! '>='
115
+ - - ~>
130
116
  - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
117
+ version: '2.14'
118
+ type: :runtime
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
- - - ! '>='
122
+ - - ~>
137
123
  - !ruby/object:Gem::Version
138
- version: '0'
124
+ version: '2.14'
139
125
  - !ruby/object:Gem::Dependency
140
- name: beaker
126
+ name: serverspec
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - ! '>='
129
+ - - ~>
144
130
  - !ruby/object:Gem::Version
145
- version: '0'
131
+ version: '0.14'
146
132
  type: :runtime
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - ! '>='
136
+ - - ~>
151
137
  - !ruby/object:Gem::Version
152
- version: '0'
138
+ version: '0.14'
153
139
  - !ruby/object:Gem::Dependency
154
- name: rspec
140
+ name: specinfra
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - ! '>='
143
+ - - ~>
158
144
  - !ruby/object:Gem::Version
159
- version: '0'
145
+ version: '0.3'
160
146
  type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - ! '>='
150
+ - - ~>
165
151
  - !ruby/object:Gem::Version
166
- version: '0'
167
- description: RSpec bindings for beaker
152
+ version: '0.3'
153
+ description: RSpec bindings for beaker, see https://github.com/puppetlabs/beaker
168
154
  email:
169
155
  - sqa@puppetlabs.com
170
156
  executables: []
@@ -203,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
189
  version: '0'
204
190
  requirements: []
205
191
  rubyforge_project:
206
- rubygems_version: 2.0.6
192
+ rubygems_version: 2.2.1
207
193
  signing_key:
208
194
  specification_version: 4
209
195
  summary: RSpec bindings for beaker