knife_sous 0.1.0pre → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/knife_sous.gemspec +1 -1
- data/lib/knife_sous/node.rb +1 -4
- data/spec/lib/knife_sous/node_spec.rb +4 -15
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2c77c4b1ded63abf5028f5565cb4aa1528d8d10
|
4
|
+
data.tar.gz: 2fb6c81078d94c3829c7f33ec9bfd9467e715a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b1b706fecd1bcd663075e396e323738f2beb2c5823688a406a09c4f4ab93b57c2311cc247834a2299991805060789ae45c2d664e46e074445b75e2079b303b9
|
7
|
+
data.tar.gz: df0353b97fd0587c4890341844d55c6b519afc0e186877a6de4e3dc25de7d8a33d08c32f4bcbcc5b39aab4d56033b48bfa634ec6f8dac7ef0bf43def8ca86404
|
data/Gemfile
CHANGED
data/knife_sous.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.email = "shaun@substantail.com"
|
7
7
|
|
8
8
|
s.name = 'knife_sous'
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.2.0"
|
10
10
|
s.description = %q{Knife plugin for managing knife-solo nodes}
|
11
11
|
s.summary = %q{A Chef Knife plugin which uses a DSL to configure and
|
12
12
|
manage knife solo nodes. Run knife solo commands on one or multiple nodes.}
|
data/lib/knife_sous/node.rb
CHANGED
@@ -15,6 +15,7 @@ module KnifeSous
|
|
15
15
|
|
16
16
|
def update_config(other_config={})
|
17
17
|
config = convert_aliases(normalize_hash(other_config))
|
18
|
+
@config[:chef_node_name] = @name
|
18
19
|
@config.merge!(config)
|
19
20
|
end
|
20
21
|
|
@@ -28,10 +29,6 @@ module KnifeSous
|
|
28
29
|
config_hash
|
29
30
|
end
|
30
31
|
|
31
|
-
def node_name
|
32
|
-
@config[:node_name] || @name
|
33
|
-
end
|
34
|
-
|
35
32
|
def method_missing(method_name, *args, &block)
|
36
33
|
@config[method_name.to_sym]
|
37
34
|
end
|
@@ -12,19 +12,7 @@ describe KnifeSous::Node do
|
|
12
12
|
|
13
13
|
it "should accept config arguments as a hash" do
|
14
14
|
options_hash = {ssh_config: 'stuff', other_something: 'foo' }
|
15
|
-
KnifeSous::Node.new(:node_tastic, options_hash).config.should == options_hash
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
describe "#node_name" do
|
20
|
-
it "should set the node name" do
|
21
|
-
node = KnifeSous::Node.new('some node', node_name: 'node_tastic')
|
22
|
-
node.node_name.should == 'node_tastic'
|
23
|
-
end
|
24
|
-
|
25
|
-
it "should default to the node name" do
|
26
|
-
node = KnifeSous::Node.new('some node')
|
27
|
-
node.node_name.should == 'some node'
|
15
|
+
KnifeSous::Node.new(:node_tastic, options_hash).config.should == options_hash.merge!(chef_node_name: "node_tastic")
|
28
16
|
end
|
29
17
|
end
|
30
18
|
|
@@ -32,13 +20,14 @@ describe KnifeSous::Node do
|
|
32
20
|
it "should merge config options" do
|
33
21
|
node = KnifeSous::Node.new(:node_tastic, foo: 'bar', baz: 'stuff')
|
34
22
|
node.update_config(baz: 'new stuff')
|
35
|
-
node.config.should == { foo: 'bar', baz: 'new stuff' }
|
23
|
+
node.config.should == { foo: 'bar', baz: 'new stuff', chef_node_name: 'node_tastic' }
|
36
24
|
end
|
37
25
|
end
|
38
26
|
|
39
27
|
describe "config hash" do
|
40
28
|
it "should sanitize hash keys" do
|
41
|
-
KnifeSous::Node.new(:node_tastic, 'fOO-BAr' => 'baz')
|
29
|
+
node = KnifeSous::Node.new(:node_tastic, 'fOO-BAr' => 'baz')
|
30
|
+
node.config.keys.should include :foo_bar
|
42
31
|
end
|
43
32
|
end
|
44
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife_sous
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun Dern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -139,9 +139,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- - '
|
142
|
+
- - '>='
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
144
|
+
version: '0'
|
145
145
|
requirements: []
|
146
146
|
rubyforge_project: knife_sous
|
147
147
|
rubygems_version: 2.0.6
|