capistrano-aws 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36f8068fe4189961d4b658b2327961eba895a6d7
4
- data.tar.gz: 964f33859ec0721fb3c3d4680c16eec25d1f76f3
3
+ metadata.gz: f9a08454f9875f788224339ae54185ca956ea899
4
+ data.tar.gz: dc9b7706d0373bb002500afde3cd815ef8218f94
5
5
  SHA512:
6
- metadata.gz: c45c598219bb94f3df58a60aace8e89d309601bcbaf0de8f67e5cc0bc4217ce40c641396dce549983cf7e073a4e28faf769224b47dab0abd3965d7c9fc32e06b
7
- data.tar.gz: 913f99fc03edcebc48f02d39e65debdce046f01bc0c2c3f91f95f20219beee908b88460b61ffd184eab9c2af79ffb83f4fe1a313bf4fff5db928f7d5f7eb21d8
6
+ metadata.gz: 15ab2c9d09f60403b2433c83a7f30938c14ba5d0027cb032975294fec0779b56b4545028675964fc6b2460cd052dc1433496f3f86b895aa644c086dc3cdd5b62
7
+ data.tar.gz: 9baad33b5e7d6b205670369416d82f9f615c5ffd1ac8a4796f9f7edba0cb9b766bd2787147a3b429be0bdf4b1b78ddf39228446e2d7b4af2ad38c5cc2851c8f9
@@ -0,0 +1,9 @@
1
+ 2017-05-05 - 1.0.1 - Improved instances access
2
+
3
+ * Turn instances result into a hash, being able to access the instance by its id.
4
+ * Fixed aws_ec2 not being exposed to SSHKit.
5
+
6
+ 2017-05-05 - 1.0.0 - Initial Release
7
+
8
+ * Add servers from multiple regions.
9
+ * Access EC2 client with the DSL in your custom tasks.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-aws (0.0.1)
4
+ capistrano-aws (1.0.0)
5
5
  aws-sdk (~> 2.9)
6
6
  colorize (~> 0.8)
7
7
  terminal-table (~> 1.7)
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |gem|
7
7
  gem.name = 'capistrano-aws'
8
- gem.version = '1.0.0'
8
+ gem.version = '1.0.1'
9
9
  gem.author = 'Fernando Carletti'
10
10
  gem.email = 'contact@fernandocarletti.net'
11
11
  gem.homepage = 'http://github.com/xurumelous/capistrano-aws'
@@ -2,6 +2,8 @@ require 'capistrano/aws/ec2/ec2'
2
2
  require 'capistrano/dsl/aws'
3
3
  extend Capistrano::DSL::Aws
4
4
 
5
+ SSHKit::Backend::Netssh.send(:include, Capistrano::DSL::Aws)
6
+
5
7
  load File.expand_path('../tasks/ec2.rake', __FILE__)
6
8
 
7
9
  namespace :load do
@@ -25,7 +25,7 @@ module Capistrano
25
25
  application = fetch(:aws_ec2_application)
26
26
  raise 'application not set.' if application.nil?
27
27
 
28
- instances = []
28
+ instances = {}
29
29
 
30
30
  filters = [
31
31
  {
@@ -44,7 +44,7 @@ module Capistrano
44
44
 
45
45
  @ec2.each do |_region, client|
46
46
  client.instances(filters: filters).each do |instance|
47
- instances << instance
47
+ instances[instance.id] = instance
48
48
  end
49
49
  end
50
50
 
@@ -22,7 +22,7 @@ module Capistrano
22
22
  table.add_row header_row
23
23
 
24
24
  number = 1
25
- @instances.each do |instance|
25
+ @instances.each do |_id, instance|
26
26
  table.add_row instance_row(number, instance)
27
27
  number += 1
28
28
  end
@@ -7,7 +7,7 @@ module Capistrano
7
7
  end
8
8
 
9
9
  def aws_ec2_register(options = {})
10
- aws_ec2.instances.each do |instance|
10
+ aws_ec2.instances.each do |_id, instance|
11
11
  ip = Capistrano::Aws::EC2.contact_point(instance)
12
12
  roles = Capistrano::Aws::EC2.parse_tag(instance, fetch(:aws_ec2_roles_tag)).split(',')
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Carletti
@@ -75,6 +75,7 @@ files:
75
75
  - ".editorconfig"
76
76
  - ".gitignore"
77
77
  - ".rubocop.yml"
78
+ - CHANGELOG.md
78
79
  - Gemfile
79
80
  - Gemfile.lock
80
81
  - LICENSE