lib/sfn/command/export.rb in sfn-3.0.30 vs lib/sfn/command/export.rb in sfn-3.0.32

- old
+ new

@@ -1,20 +1,20 @@ -require 'sfn' +require "sfn" module Sfn class Command # Export command class Export < Command include Sfn::CommandModule::Base include Sfn::Utils::ObjectStorage # Run export action def execute! - raise NotImplementedError.new 'Implementation updates required' + raise NotImplementedError.new "Implementation updates required" stack_name = name_args.first - ui.info "#{ui.color('Stack Export:', :bold)} #{stack_name}" - ui.confirm 'Perform export' + ui.info "#{ui.color("Stack Export:", :bold)} #{stack_name}" + ui.confirm "Perform export" stack = provider.stacks.get(stack_name) if stack export_options = Smash.new.tap do |opts| [:chef_popsicle, :chef_environment_parameter, :ignore_parameters].each do |key| opts[key] = config[key] unless config[key].nil? @@ -25,14 +25,14 @@ outputs = [ write_to_file(result, stack), write_to_bucket(result, stack), ].compact if outputs.empty? - ui.warn 'No persistent output location defined. Printing export:' + ui.warn "No persistent output location defined. Printing export:" ui.info _format_json(result) end - ui.info "#{ui.color('Stack export', :bold)} (#{name_args.first}): #{ui.color('complete', :green)}" + ui.info "#{ui.color("Stack export", :bold)} (#{name_args.first}): #{ui.color("complete", :green)}" unless outputs.empty? outputs.each do |output| ui.info ui.color(" -> #{output}", :blue) end end @@ -69,13 +69,13 @@ if config[:path] full_path = File.join( config[:path], export_file_name(stack) ) - _, bucket, path = full_path.split('/', 3) + _, bucket, path = full_path.split("/", 3) directory = provider.service_for(:storage, :provider => :local, - :local_root => '/').directories.get(bucket) + :local_root => "/").directories.get(bucket) file_store(payload, path, directory) end end # Write stack export to remote bucket