diff options
author | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
commit | 51cfbdc4d16739caac4d946fadbe678444aafe34 (patch) | |
tree | 56dfd8f1cd9fd933de27268b32402e955a43ac2b /lib/chef/knife/cookbook_metadata.rb | |
parent | 05064423057d4cf46f4713b81b08829cf6d20af6 (diff) | |
download | chef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz |
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go
along with chef/chefstyle#5 . We should pick something and use it
consistently, and my opinion is that double quotes are the appropriate
thing.
Diffstat (limited to 'lib/chef/knife/cookbook_metadata.rb')
-rw-r--r-- | lib/chef/knife/cookbook_metadata.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/knife/cookbook_metadata.rb b/lib/chef/knife/cookbook_metadata.rb index dfa69ae39f..66cb452d39 100644 --- a/lib/chef/knife/cookbook_metadata.rb +++ b/lib/chef/knife/cookbook_metadata.rb @@ -17,15 +17,15 @@ # limitations under the License. # -require 'chef/knife' +require "chef/knife" class Chef class Knife class CookbookMetadata < Knife deps do - require 'chef/cookbook_loader' - require 'chef/cookbook/metadata' + require "chef/cookbook_loader" + require "chef/cookbook/metadata" end banner "knife cookbook metadata COOKBOOK (options)" @@ -62,7 +62,7 @@ class Chef def generate_metadata(cookbook) Array(config[:cookbook_path]).reverse.each do |path| - file = File.expand_path(File.join(path, cookbook, 'metadata.rb')) + file = File.expand_path(File.join(path, cookbook, "metadata.rb")) if File.exists?(file) generate_metadata_from_file(cookbook, file) else @@ -76,7 +76,7 @@ class Chef md = Chef::Cookbook::Metadata.new md.name(cookbook) md.from_file(file) - json_file = File.join(File.dirname(file), 'metadata.json') + json_file = File.join(File.dirname(file), "metadata.json") File.open(json_file, "w") do |f| f.write(Chef::JSONCompat.to_json_pretty(md)) end @@ -91,7 +91,7 @@ class Chef end def validate_metadata_json(path, cookbook) - json_file = File.join(path, cookbook, 'metadata.json') + json_file = File.join(path, cookbook, "metadata.json") if File.exist?(json_file) Chef::Cookbook::Metadata.validate_json(IO.read(json_file)) end |