11#
22# Author:: Stephen Delano (<stephen@opscode.com>)
3- # Copyright:: Copyright (c) 2008 Opscode, Inc.
3+ # Copyright:: Copyright (c) 2010 Opscode, Inc.
44# License:: Apache License, Version 2.0
55#
66# Licensed under the Apache License, Version 2.0 (the "License");
77# you may not use this file except in compliance with the License.
88# You may obtain a copy of the License at
9- #
9+ #
1010# http://www.apache.org/licenses/LICENSE-2.0
11- #
11+ #
1212# Unless required by applicable law or agreed to in writing, software
1313# distributed under the License is distributed on an "AS IS" BASIS,
1414# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,7 +24,7 @@ class Environments < Application
2424
2525 before :authenticate_every
2626 before :is_admin , :only => [ :create , :update , :destroy ]
27-
27+
2828 # GET /environments
2929 def index
3030 environment_list = Chef ::Environment . cdb_list ( true )
@@ -45,11 +45,11 @@ def show
4545 # POST /environments
4646 def create
4747 env = params [ "inflated_object" ]
48- exists = true
48+ exists = true
4949 begin
5050 Chef ::Environment . cdb_load ( env . name )
5151 rescue Chef ::Exceptions ::CouchDBNotFound
52- exists = false
52+ exists = false
5353 end
5454 raise Conflict , "Environment already exists" if exists
5555
@@ -65,7 +65,7 @@ def update
6565 rescue Chef ::Exceptions ::CouchDBNotFound
6666 raise NotFound , "Cannot load environment #{ params [ :id ] } "
6767 end
68-
68+
6969 env . description ( params [ "inflated_object" ] . description )
7070 env . cdb_save
7171 env . couchdb_rev = nil
0 commit comments