chef-server-api 0.8.4 → 0.8.6

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.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/app/controllers/nodes.rb +2 -4
  3. metadata +3 -3
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'merb-core'
5
5
  require 'merb-core/tasks/merb'
6
6
 
7
7
  GEM_NAME = "chef-server-api"
8
- CHEF_SERVER_VERSION="0.8.4"
8
+ CHEF_SERVER_VERSION="0.8.6"
9
9
  AUTHOR = "Opscode"
10
10
  EMAIL = "chef@opscode.com"
11
11
  HOMEPAGE = "http://wiki.opscode.com/display/chef"
@@ -48,13 +48,11 @@ class ChefServerApi::Nodes < ChefServerApi::Application
48
48
 
49
49
  def create
50
50
  @node = params["inflated_object"]
51
- exists = true
52
51
  begin
53
- Chef::Node.cdb_load(@node.name)
52
+ Chef::Node.cdb_load(@node.name)
53
+ raise Conflict, "Node already exists"
54
54
  rescue Chef::Exceptions::CouchDBNotFound
55
- exists = false
56
55
  end
57
- raise Conflict, "Node already exists" if exists
58
56
  self.status = 201
59
57
  @node.cdb_save
60
58
  display({ :uri => absolute_slice_url(:node, @node.name) })
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 4
9
- version: 0.8.4
8
+ - 6
9
+ version: 0.8.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Opscode
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-02 00:00:00 -08:00
17
+ date: 2010-03-04 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency