capistrano-ec2filter 0.0.3 → 0.1.0

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: 780dd08d23ab6e157d524ed5804a80f58b20aa9b
4
- data.tar.gz: c891cdf96a529e5f5458903c8e7312f5661335b4
3
+ metadata.gz: a280f2bd6e50b263b311425d0bc91ba3f3a1490b
4
+ data.tar.gz: 6b29abed08226fa49bae324385cc545a2ea6c799
5
5
  SHA512:
6
- metadata.gz: 078ccfb75101d75f811f35930c26343f9ad248d39df3569ee0fb2571b59bb0952580ce27f9facad3964e23c32d51b5402075ce2908f7be2f43f57a8b172f4287
7
- data.tar.gz: 2c5457f06d99f6fa7630d1365d68f9be1251a8da2c7315d8888eed87f26b2bc3d73d3fd99a42db35836860c693c9b1e7f38fa1056ca64a1b8a265dffc9371889
6
+ metadata.gz: af7c7cc736212a2928e9ef97c5f700966c898f5c30cad781dcc33bcf58d997a0bec895acba076426b97cc0577c4b515e764c3783f89a394e1547ff95c8fcaff0
7
+ data.tar.gz: bd4cf33bcfdb80e6b182eb318aea05d9c574bf6611b8385f6a2477e78962fc82429ce67bcea30caf279c7f896f392589d480dde80062f44a05af8a6bc8dfd896
data/README.md CHANGED
@@ -47,15 +47,15 @@ set :aws_secret_access_key, "..."
47
47
  Define your servers:
48
48
 
49
49
  ```ruby
50
- ec2_group("tag:application"=>"SuperApp", "tag:layer"=>"application") do |address|
50
+ ec2_filter("tag:application"=>"SuperApp", "tag:layer"=>"application") do |address|
51
51
  server address, :web, :app
52
52
  end
53
53
 
54
- ec2_group("tag:application"=>"SuperApp", "tag:layer"=>"workers") do |address, instance|
54
+ ec2_filter("tag:application"=>"SuperApp", "tag:layer"=>"workers") do |address, instance|
55
55
  server address, :app, :jobs, :min_job_priority: 10
56
56
  end
57
57
 
58
- ec2_group("placement-group-name"=>"matrix") do |address, instance|
58
+ ec2_filter("placement-group-name"=>"matrix") do |address, instance|
59
59
  server address, :matrix, platform: instance.platform
60
60
  end
61
61
  ```
@@ -64,10 +64,10 @@ end
64
64
 
65
65
  `address` - dns/ip address of instance = `instance.dns_name || instance.ip_address || instance.private_ip_address`
66
66
 
67
- By default ec2_group apply `"instance-state-name" => "running"` filter. You can overwrite this:
67
+ By default ec2_filter apply `"instance-state-name" => "running"` filter. You can overwrite this:
68
68
 
69
69
  ```ruby
70
- ec2_group("instance-state-name" => ["stopped", "stopping"], "tag:layer"=>"application") do |address|
70
+ ec2_filter("instance-state-name" => ["stopped", "stopping"], "tag:layer"=>"application") do |address|
71
71
  server address, :app, stopped: true
72
72
  end
73
73
  ```
@@ -13,7 +13,7 @@ module Capistrano
13
13
  _cset(:aws_secret_access_key, ENV["AWS_SECRET_ACCESS_KEY"])
14
14
  _cset(:aws_ec2_endpoint, ENV["AWS_EC2_ENDPOINT"])
15
15
 
16
- def ec2_group(filters = {})
16
+ def ec2_filter(filters = {})
17
17
  filters = { "instance-state-name" => "running" }.merge(filters)
18
18
  @aws_ec2 ||= AWS::EC2.new(
19
19
  access_key_id: fetch(:aws_access_key_id),
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Ec2filter
3
- VERSION = "0.0.3"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-ec2filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Rogowski