summaryrefslogtreecommitdiff
path: root/lib/chef/environment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/environment.rb')
-rw-r--r--lib/chef/environment.rb26
1 files changed, 12 insertions, 14 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb
index 164901c107..0d01fcd05c 100644
--- a/lib/chef/environment.rb
+++ b/lib/chef/environment.rb
@@ -28,7 +28,6 @@ require "chef/server_api"
class Chef
class Environment
-
DEFAULT = "default"
include Chef::Mixin::ParamsValidate
@@ -55,7 +54,7 @@ class Chef
Chef::ServerAPI.new(Chef::Config[:chef_server_url])
end
- def name(arg=nil)
+ def name(arg = nil)
set_or_return(
:name,
arg,
@@ -63,7 +62,7 @@ class Chef
)
end
- def description(arg=nil)
+ def description(arg = nil)
set_or_return(
:description,
arg,
@@ -71,7 +70,7 @@ class Chef
)
end
- def default_attributes(arg=nil)
+ def default_attributes(arg = nil)
set_or_return(
:default_attributes,
arg,
@@ -83,7 +82,7 @@ class Chef
default_attributes(attrs)
end
- def override_attributes(arg=nil)
+ def override_attributes(arg = nil)
set_or_return(
:override_attributes,
arg,
@@ -95,7 +94,7 @@ class Chef
override_attributes(attrs)
end
- def cookbook_versions(arg=nil)
+ def cookbook_versions(arg = nil)
set_or_return(
:cookbook_versions,
arg,
@@ -110,12 +109,12 @@ class Chef
def cookbook(cookbook, version)
validate({
- :version => version
- },{
- :version => {
- :callbacks => { "should be a valid version requirement" => lambda { |v| Chef::Environment.validate_cookbook_version(v) } }
- }
- },)
+ :version => version
+ }, {
+ :version => {
+ :callbacks => { "should be a valid version requirement" => lambda { |v| Chef::Environment.validate_cookbook_version(v) } }
+ }
+ },)
@cookbook_versions[cookbook] = version
end
@@ -231,7 +230,7 @@ class Chef
environment
end
- def self.list(inflate=false)
+ def self.list(inflate = false)
if inflate
response = Hash.new
Chef::Search::Query.new.search(:environment) do |e|
@@ -321,6 +320,5 @@ class Chef
false
end
end
-
end
end