diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-07-02 10:25:16 -0700 |
commit | 35603c7ce1bd3ccf35334ed65152140f0ecaf080 (patch) | |
tree | 452c84ce196ce00d672c71a8fa65f86c5a074fac /lib/chef/environment.rb | |
parent | eda2808dce8146bfdb308dd658b1dd565df3562b (diff) | |
download | chef-35603c7ce1bd3ccf35334ed65152140f0ecaf080.tar.gz |
fix Style/HashSyntax
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/environment.rb')
-rw-r--r-- | lib/chef/environment.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb index be05b58989..61777fb7b4 100644 --- a/lib/chef/environment.rb +++ b/lib/chef/environment.rb @@ -57,7 +57,7 @@ class Chef set_or_return( :name, arg, - { :regex => /^[\-[:alnum:]_]+$/, :kind_of => String } + { regex: /^[\-[:alnum:]_]+$/, kind_of: String } ) end @@ -65,7 +65,7 @@ class Chef set_or_return( :description, arg, - :kind_of => String + kind_of: String ) end @@ -73,7 +73,7 @@ class Chef set_or_return( :default_attributes, arg, - :kind_of => Hash + kind_of: Hash ) end @@ -85,7 +85,7 @@ class Chef set_or_return( :override_attributes, arg, - :kind_of => Hash + kind_of: Hash ) end @@ -98,8 +98,8 @@ class Chef :cookbook_versions, arg, { - :kind_of => Hash, - :callbacks => { + kind_of: Hash, + callbacks: { "should be a valid set of cookbook version requirements" => lambda { |cv| Chef::Environment.validate_cookbook_versions(cv) }, }, } @@ -108,10 +108,10 @@ class Chef def cookbook(cookbook, version) validate({ - :version => version, + version: version, }, { - :version => { - :callbacks => { "should be a valid version requirement" => lambda { |v| Chef::Environment.validate_cookbook_version(v) } }, + version: { + callbacks: { "should be a valid version requirement" => lambda { |v| Chef::Environment.validate_cookbook_version(v) } }, }, }) @cookbook_versions[cookbook] = version |