cucumber-puppet 0.1.1 → 0.2.0

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.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :build:
3
- :patch: 1
4
- :minor: 1
3
+ :patch: 0
4
+ :minor: 2
5
5
  :major: 0
@@ -34,8 +34,14 @@ class CucumberPuppet
34
34
 
35
35
  # Define Puppet classes to include in a feature's testnode.
36
36
  def klass=(klass)
37
- # XXX sth like klass.split(/,/) and remove whitespace
38
- @klass = klass.to_a
37
+ if klass.class == String
38
+ # XXX sth like klass.split(/,/) and remove whitespace
39
+ @klass = klass.to_a
40
+ elsif klass.class == Hash
41
+ @klass = klass
42
+ else
43
+ raise "unsupported class #{klass.class} for klass."
44
+ end
39
45
  end
40
46
 
41
47
  # Compile catalog for configured testnode.
@@ -2,6 +2,14 @@ Given /^a node of class "([^\"]*)"$/ do |klass|
2
2
  @klass = klass
3
3
  end
4
4
 
5
+ Given /^a node of class "([^\"]*)" with parameters:$/ do |klass, params|
6
+ parameters = {}
7
+ params.hashes.each do |param|
8
+ parameters[param['name']] = param['value']
9
+ end
10
+ @klass = { klass => parameters }
11
+ end
12
+
5
13
  Given /^a node named "([^\"]*)"$/ do |name|
6
14
  @facts['hostname'] = name
7
15
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
7
+ - 2
8
+ - 0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nikolay Sturm
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-01 00:00:00 +01:00
17
+ date: 2011-03-06 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency