Sha256: 9e9d51a0348a10a5b6c6310cf7684cc547faf972c4de6b6cc5e34f10c8cd8a3a
Contents?: true
Size: 1.31 KB
Versions: 2
Compression:
Stored size: 1.31 KB
Contents
#!/usr/bin/env ruby require 'optparse' require 'yaml' require 'beanstalkify/beanstalk' require 'beanstalkify/application' options = {} OptionParser.new do |opts| opts.on("-k", "--keyfile [file]", "Load credentials from yaml file") do |v| options[:credentials] = YAML.load_file(v) end opts.on("-a", "--archive [file]", "Archive to deploy (e.g. AppName-version.zip)") do |v| options[:archive] = v end opts.on("-e", "--environment [env]", "Environment to provision (e.g. AppName-test)") do |v| options[:environment] = v end opts.on("-s", "--stack [stack]", "Stack to provision (e.g. '64bit Amazon Linux running Node.js')") do |v| options[:stack] = v end opts.on("-c", "--config [file]", "Configuration overrides for the environment") do |v| options[:config] = YAML.load_file(v) end end.parse! required_params = [:credentials, :archive, :environment, :stack] unless (required_params - options.keys).empty? puts "Example usage: beanstalkify -k credentials.yml -a AppName-version.zip -e AppName-test -s '64bit Amazon Linux running Node.js' -c config.yml" exit end Beanstalkify::Beanstalk.configure! options[:credentials] app = Beanstalkify::Application.new(options[:stack], options[:config] || []) app.deploy!(options[:archive], options[:environment])
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
beanstalkify-0.0.2 | bin/beanstalkify |
beanstalkify-0.0.1 | bin/beanstalkify |