lib/stevenson/application.rb in stevenson-2.0.0 vs lib/stevenson/application.rb in stevenson-2.1.0

- old
+ new

@@ -20,29 +20,39 @@ # Data Options method_option :data, aliases: "-d", desc: 'The path to related data yml files' - # Output Options + # Output Filter Options method_option :output, type: :array, + enum: [:zip], aliases: "-o", desc: 'Array of output filters to be applied in order' method_option :zip, type: :boolean, aliases: "-z", desc: 'Zip compresses the output directory' + # Deploy Options + method_option :s3, + type: :array, + banner: 'bucket key access_key access_secret', + desc: 'The s3 information necessary for deploying to S3' + def new(output_directory, config_path) # Load the template using the template loader template = Stevenson::Template.load(options[:template], options) # Place yml files template.place_config(config_path) template.place_files(options[:data], '_data') if options[:data] # Run output filters, in order, against the template - puts Stevenson::OutputFilter.generate!(template, options) + directory = Stevenson::OutputFilter.generate!(template, options) + + # Run deployers against filtered template directory + Stevenson::Deployer.deploy(directory, options) rescue StandardError => e say e.message ensure template.close