spice 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "Spice",
3
+ "twitter": [
4
+ "iamdanryan"
5
+ ],
6
+ "google_analytics": "UA-8670854-16",
7
+ "travis": true,
8
+ "issues": true
9
+ }
@@ -1,3 +1,7 @@
1
+ # Release Notes - Spice - Version 1.0.3
2
+
3
+ * Fix create_node method. This was throwing a Spice::Error::NotFound exception because it was generating a wrong path (/nodes//nodes/...). The get_node() call at the end of the method returns the full node object. If just the attributes were used to create the node object, many things were missing.
4
+
1
5
  # Release Notes - Spice - Version 1.0.2
2
6
 
3
7
  * Fixed issue with bad variable when checking the format of a client key.
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
- # Spice - Chef API Wrapper [![Dependency Status](https://gemnasium.com/danryan/spice.png)][gemnasium]
2
-
3
- [gemnasium]: https://gemnasium.com/danryan/spice
1
+ # Spice - Chef API Wrapper
4
2
 
5
3
  Spice lets you easily integrate your apps with a [Chef](http://opscode.com/chef) server. Spice provides support for the [Chef API](http://wiki.opscode.com/display/chef/Server+API)
6
4
 
@@ -25,22 +25,20 @@ module Spice
25
25
  end # def node
26
26
 
27
27
  alias :get_node :node
28
-
28
+
29
29
  def create_node(params=Mash.new)
30
30
  node = Spice::Node.new(params)
31
- node_attributes = post("/nodes", node.to_hash)
32
- get_node("/nodes/#{node.name}")
33
- Spice::Node.get_or_new(attributes)
31
+ post("/nodes", node.attrs)
32
+ get_node(node.name)
34
33
  end # def create_node
35
34
 
36
- # TODO(dryan): be able to update a node
37
- # def update_node(params=Mash.new)
38
- # node = Spice::Node.new(params)
39
- # node.attrs.update get_node(node.name)
40
- # attributes = put("/nodes/#{node.name}", node.attrs)
41
- # Spice::Node.get_or_new(attributes)
42
- # end
43
-
35
+ def update_node(params=Mash.new)
36
+ node = get_node(params[:name])
37
+ node.attrs.update Spice::Node.new(params)
38
+ put("/nodes/#{node.name}", node.attrs)
39
+ get_node(node.name)
40
+ end
41
+
44
42
  end # module Nodes
45
43
  end # class Connection
46
44
  end # module Spice
@@ -1,3 +1,3 @@
1
1
  module Spice
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "https://github.com/danryan/spice"
12
12
  s.summary = %q{Chef API wrapper}
13
13
  s.description = %q{Spice is a zesty Chef API wrapper. Its primary purpose is to let you easily integrate your apps with a Chef server easily. Spice provides support for the entire released Chef API}
14
+ s.license = "MIT"
14
15
 
15
16
  s.rubyforge_project = "spice"
16
17
  s.add_dependency "faraday", "~> 0.8.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
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: 2012-06-13 00:00:00.000000000 Z
12
+ date: 2012-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -134,6 +134,7 @@ extra_rdoc_files: []
134
134
  files:
135
135
  - .bundle/config
136
136
  - .document
137
+ - .documentup.json
137
138
  - .gitignore
138
139
  - .rspec
139
140
  - .travis.yml
@@ -237,7 +238,8 @@ files:
237
238
  - spec/support/helpers.rb
238
239
  - spice.gemspec
239
240
  homepage: https://github.com/danryan/spice
240
- licenses: []
241
+ licenses:
242
+ - MIT
241
243
  post_install_message:
242
244
  rdoc_options: []
243
245
  require_paths: