From 0e6a49671fd97cbfbfb278c5cf2047ba1a65d735 Mon Sep 17 00:00:00 2001 From: Rob Di Marco Date: Tue, 10 Apr 2018 11:42:01 -0400 Subject: [PATCH 1/3] Change dependency to just rely on aws-sdk-ec2 --- cap-ec2.gemspec | 2 +- lib/cap-ec2/capistrano.rb | 2 +- lib/cap-ec2/ec2-handler.rb | 2 +- lib/cap-ec2/utils.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cap-ec2.gemspec b/cap-ec2.gemspec index fd6a3eb..35335b8 100644 --- a/cap-ec2.gemspec +++ b/cap-ec2.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake" - spec.add_dependency "aws-sdk", ">= 2.0" + spec.add_dependency "aws-sdk-ec2" spec.add_dependency "capistrano", ">= 3.0" spec.add_dependency "terminal-table" spec.add_dependency "colorize" diff --git a/lib/cap-ec2/capistrano.rb b/lib/cap-ec2/capistrano.rb index 4d6374f..e2fbe64 100644 --- a/lib/cap-ec2/capistrano.rb +++ b/lib/cap-ec2/capistrano.rb @@ -1,5 +1,5 @@ require 'capistrano/configuration' -require 'aws-sdk' +require 'aws-sdk-ec2' require 'colorize' require 'terminal-table' require 'yaml' diff --git a/lib/cap-ec2/ec2-handler.rb b/lib/cap-ec2/ec2-handler.rb index cc32a6e..2f33afd 100644 --- a/lib/cap-ec2/ec2-handler.rb +++ b/lib/cap-ec2/ec2-handler.rb @@ -1,4 +1,4 @@ -require 'aws-sdk' +equire 'aws-sdk-ec2' module CapEC2 class EC2Handler diff --git a/lib/cap-ec2/utils.rb b/lib/cap-ec2/utils.rb index 2c7a38d..30ef93c 100644 --- a/lib/cap-ec2/utils.rb +++ b/lib/cap-ec2/utils.rb @@ -1,4 +1,4 @@ -require 'aws-sdk' +require 'aws-sdk-ec2' module CapEC2 module Utils From 37f0a5f283af0596d0559864c79d32f71d085b55 Mon Sep 17 00:00:00 2001 From: Rob Di Marco Date: Tue, 10 Apr 2018 11:46:12 -0400 Subject: [PATCH 2/3] Fix typo --- lib/cap-ec2/ec2-handler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cap-ec2/ec2-handler.rb b/lib/cap-ec2/ec2-handler.rb index 2f33afd..06ae902 100644 --- a/lib/cap-ec2/ec2-handler.rb +++ b/lib/cap-ec2/ec2-handler.rb @@ -1,4 +1,4 @@ -equire 'aws-sdk-ec2' +require 'aws-sdk-ec2' module CapEC2 class EC2Handler From bef840f7cc9d7d1d3029895f4046c71f551d9a45 Mon Sep 17 00:00:00 2001 From: grmgarber Date: Mon, 9 Jan 2023 14:36:43 -0500 Subject: [PATCH 3/3] rename File.exists? to File.exist as the former is dropped from Ruby 3.2 --- cap-ec2.gemspec | 2 +- lib/cap-ec2/utils.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cap-ec2.gemspec b/cap-ec2.gemspec index 35335b8..e87b673 100644 --- a/cap-ec2.gemspec +++ b/cap-ec2.gemspec @@ -5,7 +5,7 @@ require 'cap-ec2/version' Gem::Specification.new do |spec| spec.name = "cap-ec2" - spec.version = CapEC2::VERSION + spec.version = "1.1.3" spec.authors = ["Andy Sykes", "Robert Coleman", "Forward3D Developers"] spec.email = ["github@tinycat.co.uk", "github@robert.net.nz", "developers@forward3d.com"] spec.description = %q{Cap-EC2 is used to generate Capistrano namespaces and tasks from Amazon EC2 instance tags, dynamically building the list of servers to be deployed to.} diff --git a/lib/cap-ec2/utils.rb b/lib/cap-ec2/utils.rb index 30ef93c..af4917e 100644 --- a/lib/cap-ec2/utils.rb +++ b/lib/cap-ec2/utils.rb @@ -55,7 +55,7 @@ def load_config end config_location = File.expand_path(fetch(:ec2_config), Dir.pwd) if fetch(:ec2_config) - if config_location && File.exists?(config_location) + if config_location && File.exist?(config_location) config = YAML.load(ERB.new(File.read(fetch(:ec2_config)))) if config set :ec2_project_tag, config['project_tag'] if config['project_tag']