diff --git a/Gemfile b/Gemfile index 821a61c..7727ca0 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,4 @@ source 'https://rubygems.org' # Specify your gem's dependencies in capify-v3-ec2.gemspec gemspec +gem 'aws-sdk-v1' diff --git a/lib/cap-ec2/ec2-handler.rb b/lib/cap-ec2/ec2-handler.rb index 2d54887..7c4125c 100644 --- a/lib/cap-ec2/ec2-handler.rb +++ b/lib/cap-ec2/ec2-handler.rb @@ -51,7 +51,11 @@ def stage end def application - Capistrano::Configuration.env.fetch(:application).to_s + appname = Capistrano::Configuration.env.fetch(:ec2_application).to_s + if appname.nil? || appname.length < 1 + appname = Capistrano::Configuration.env.fetch(:application).to_s + end + appname end def tag(tag_name)