roadworker 0.5.8.beta3 → 0.5.8.beta4

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: e6b0a7139c4566052199edfb2a24b29c31032bec
4
- data.tar.gz: 6ca4cc7b514955cbb733bc2bcb443f4080652053
3
+ metadata.gz: bc35f600b3ec83655e747b63fff74fc181d54147
4
+ data.tar.gz: 20c6b948cba37a174335c120a760fee39ada5348
5
5
  SHA512:
6
- metadata.gz: b62ef33c4e934b423996087067a89b4ae9f38989453bbe156427d15751d139fe10681ac507d32e63238637df497302e05cafcb0133fec2a243775641b1e5a3b7
7
- data.tar.gz: 89ec5c3c4df3e4059df1be3785e8cf73d31b051b49899d55e66ac94d792d6a76267e53fe1462cbcbe18b53de90c06af7e3e55843b3acfaca76f8b132448d4910
6
+ metadata.gz: 21acfca59425084c2cd3215a5e129b1befdb0efc70d279291d6e09131adbe41b3e6a43007bdb76103e941cc0afdfb4515e9392ef7ad62c129b53beb2091a721a
7
+ data.tar.gz: 372f4cebd7adc15e5f4ae27454693ff4fcef45acc8e5b1013af1e763e6d5bb8bb8cfa868b42ea90d5f68dc8fd000782a00f09c4cb9ffadde7f656d598658db6b
@@ -50,6 +50,22 @@ module Aws
50
50
  # http://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html
51
51
  CF_HOSTED_ZONE_ID = 'Z2FDTNDATAQYW2'
52
52
 
53
+ # http://docs.aws.amazon.com/general/latest/gr/rande.html#elasticbeanstalk_region
54
+ ELASTIC_BEANSTALK_HOSTED_ZONE_NAME_IDS = {
55
+ 'ap-northeast-1' => 'Z1R25G3KIG2GBW',
56
+ 'ap-northeast-2' => 'Z3JE5OI70TWKCP',
57
+ 'ap-south-1' => 'Z18NTBI3Y7N9TZ',
58
+ 'ap-southeast-1' => 'Z16FZ9L249IFLT',
59
+ 'ap-southeast-2' => 'Z2PCDNR3VC2G1N',
60
+ 'eu-central-1' => 'Z1FRNW7UH4DEZJ',
61
+ 'eu-west-1' => 'Z2NYPWQ7DFZAZH',
62
+ 'sa-east-1' => 'Z10X7K2B4QSOFV',
63
+ 'us-east-1' => 'Z117KPS5GTRQ2G',
64
+ 'us-east-2' => 'Z14LCN19Q5QHIC',
65
+ 'us-west-1' => 'Z1LQECGX5PH1X',
66
+ 'us-west-2' => 'Z38NKT9BP95V3O',
67
+ }
68
+
53
69
  class << self
54
70
  def normalize_dns_name_options(src)
55
71
  dst = {}
@@ -81,6 +97,9 @@ module Aws
81
97
  cf_dns_name_to_alias_target(name)
82
98
  elsif name =~ /(\A|\.)#{Regexp.escape(hosted_zone_name)}\z/i
83
99
  this_hz_dns_name_to_alias_target(name, hosted_zone_id)
100
+ elsif name =~ /\.([^.]+)\.elasticbeanstalk\.com\z/i
101
+ region = $1.downcase
102
+ eb_dns_name_to_alias_target(name, region)
84
103
  else
85
104
  raise "Invalid DNS Name: #{name}"
86
105
  end
@@ -139,6 +158,14 @@ module Aws
139
158
  :evaluate_target_health => false, # XXX:
140
159
  }
141
160
  end
161
+
162
+ def eb_dns_name_to_alias_target(name, region)
163
+ {
164
+ :hosted_zone_id => ELASTIC_BEANSTALK_HOSTED_ZONE_NAME_IDS[region],
165
+ :dns_name => name,
166
+ :evaluate_target_health => false, # XXX:
167
+ }
168
+ end
142
169
  end # of class method
143
170
 
144
171
  end # Route53
@@ -1,3 +1,3 @@
1
1
  module Roadworker
2
- VERSION = "0.5.8.beta3"
2
+ VERSION = "0.5.8.beta4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roadworker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8.beta3
4
+ version: 0.5.8.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel