spec/support/chef_api.rb in berkshelf-5.5.0 vs spec/support/chef_api.rb in berkshelf-5.6.0

- old
+ new

@@ -56,17 +56,17 @@ "recipes", "templates/default", "files/default", "attributes", "providers", - "resources" + "resources", ] files = [ "recipes/default.rb", "templates/default/template.erb", "files/default/file.h", - "attributes/default.rb" + "attributes/default.rb", ] directories.each do |directory| FileUtils.mkdir_p(cookbook_path.join(directory)) end @@ -80,11 +80,10 @@ a << "version '#{version}'" a << "license '#{options[:license]}'" if options[:license] a << "" # ensure newline end.join("\n") - if options[:dependencies] options[:dependencies].each do |name, constraint| metadata << "depends '#{name}', '#{constraint}'\n" end end @@ -93,11 +92,11 @@ options[:recommendations].each do |name, constraint| metadata << "recommends '#{name}', '#{constraint}'\n" end end - File.open(cookbook_path.join("metadata.rb"), 'w+') do |f| + File.open(cookbook_path.join("metadata.rb"), "w+") do |f| f.write metadata end cookbook_path end @@ -118,16 +117,16 @@ !environment(environment_name).nil? end private - def ridley - @ridley ||= Ridley.new( - server_url: Berkshelf::RSpec::ChefServer.server_url, - client_name: Berkshelf.chef_config[:node_name], - client_key: Berkshelf.chef_config[:client_key], - ssl: { verify: false } - ) - end + def ridley + @ridley ||= Ridley.new( + server_url: Berkshelf::RSpec::ChefServer.server_url, + client_name: Berkshelf.chef_config[:node_name], + client_key: Berkshelf.chef_config[:client_key], + ssl: { verify: false } + ) + end end end end