eb_deployer 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14aad1fa4d35f019209b2d9cb3050586b829267f
4
- data.tar.gz: 9564952bbde7b1172e4aa6de39c6e89e6391bebf
3
+ metadata.gz: a1dfbd8d4f385399972ca9ee421f054ea8644ae9
4
+ data.tar.gz: ff4d16c027d33272e6d6a6fb2a08bb869aa74847
5
5
  SHA512:
6
- metadata.gz: a20e0b2939902e59bca484b029677035e6c2f63c046ef50eea48bafd739fced95f5c7b941d3b0ab75e232d744107193a3c4e795341fb634a6f163bb02b47371e
7
- data.tar.gz: 447edf1d15f8a77f4495832c794e8f98212956bbb4a39a0a7a2c296c50b6bc5653ab927a7a2c86a2f310933832c2e480727f3e8b3136a98e2bb3b83dec22bfee
6
+ metadata.gz: 46de86d6c03d0e4f8c37578194d8965c78c1a88296c3f28e48f1186ccef65bd52eacbe3153d413d959f4eaacb50be7bb2ad2c0af8cc3bb0c71fddc25c99c1ab6
7
+ data.tar.gz: e0cad16af0d8a1b3bac871a2a6ac200b10b1ad33ed653abdd3f72d2a99af27725fd7af220fbffefbdb765b4ba63bc95eb5fab4b8e000ec5f94ed4c41ad42fd42
@@ -91,7 +91,7 @@ module EbDeployer
91
91
 
92
92
  def environment_cname_prefix(app_name, env_name)
93
93
  cname = environment_cname(app_name, env_name)
94
- if cname =~ /^(.+)\.elasticbeanstalk\.com/
94
+ if cname =~ /^([^\.]+)(?:\.(?:[a-z0-9\-]+))?\.elasticbeanstalk\.com/i
95
95
  $1
96
96
  end
97
97
  end
@@ -1,3 +1,3 @@
1
1
  module EbDeployer
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
3
3
  end
@@ -145,7 +145,7 @@ class EBStub
145
145
  def environment_cname(app_name, env_name)
146
146
  return unless @envs[env_key(app_name, env_name)]
147
147
  if cname_prefix = environment_cname_prefix(app_name, env_name)
148
- cname_prefix + ".elasticbeanstalk.com"
148
+ cname_prefix + ".us-west-1.elasticbeanstalk.com"
149
149
  end
150
150
  end
151
151
 
@@ -0,0 +1,23 @@
1
+ require 'test_helper'
2
+
3
+ class BeanstalkTest < Test::Unit::TestCase
4
+
5
+ class StubbedCnameResponder
6
+ def initialize(stubbed_response)
7
+ @stubbed_response = stubbed_response
8
+ end
9
+
10
+ def describe_environments(options)
11
+ {:environments => [@stubbed_response.merge(:status => "online")]}
12
+ end
13
+ end
14
+
15
+ def test_cname_prefix_will_parse_both_legacy_and_regionalized_domains
16
+ legacy_domain = "mingle-saas.elasticbeanstalk.com"
17
+ regionalized_domain = "mingle-saas.us-west-1.elasticbeanstalk.com"
18
+
19
+ assert_equal "mingle-saas", EbDeployer::AWSDriver::Beanstalk.new(StubbedCnameResponder.new(:cname => legacy_domain)).environment_cname_prefix("mingle", "saas")
20
+ assert_equal "mingle-saas", EbDeployer::AWSDriver::Beanstalk.new(StubbedCnameResponder.new(:cname => regionalized_domain)).environment_cname_prefix("mingle", "saas")
21
+ end
22
+
23
+ end
@@ -34,9 +34,9 @@ class BlueGreenDeployTest < DeployTest
34
34
  do_deploy(version_label, :smoke_test => smoke_test)
35
35
  end
36
36
 
37
- assert_equal ['simple-production.elasticbeanstalk.com',
38
- 'simple-production-inactive.elasticbeanstalk.com',
39
- 'simple-production-inactive.elasticbeanstalk.com'], smoked_host
37
+ assert_equal ['simple-production.us-west-1.elasticbeanstalk.com',
38
+ 'simple-production-inactive.us-west-1.elasticbeanstalk.com',
39
+ 'simple-production-inactive.us-west-1.elasticbeanstalk.com'], smoked_host
40
40
  end
41
41
 
42
42
  def test_blue_green_deploy_should_blue_green_terminate_inactive_env_if_blue_green_terminate_inactive_is_enabled
@@ -36,9 +36,9 @@ class BlueOnlyDeployTest < DeployTest
36
36
  do_deploy(version_label, :smoke_test => smoke_test)
37
37
  end
38
38
 
39
- assert_equal ['simple-production.elasticbeanstalk.com',
40
- 'simple-production-inactive.elasticbeanstalk.com',
41
- 'simple-production-inactive.elasticbeanstalk.com'], smoked_host
39
+ assert_equal ['simple-production.us-west-1.elasticbeanstalk.com',
40
+ 'simple-production-inactive.us-west-1.elasticbeanstalk.com',
41
+ 'simple-production-inactive.us-west-1.elasticbeanstalk.com'], smoked_host
42
42
  end
43
43
 
44
44
 
@@ -53,7 +53,7 @@ class InplaceUpdateDeployTest < DeployTest
53
53
  :cname_prefix => 'foobar',
54
54
  :smoke_test => lambda { |host| host_for_smoke_test = host },
55
55
  :version_label => 42)
56
- assert_equal 'foobar.elasticbeanstalk.com', host_for_smoke_test
56
+ assert_equal 'foobar.us-west-1.elasticbeanstalk.com', host_for_smoke_test
57
57
 
58
58
  host_for_smoke_test = nil
59
59
  deploy(:application => 'simple',
@@ -62,7 +62,7 @@ class InplaceUpdateDeployTest < DeployTest
62
62
  :smoke_test => lambda { |host| host_for_smoke_test = host },
63
63
  :version_label => 43)
64
64
 
65
- assert_equal 'foobar.elasticbeanstalk.com', host_for_smoke_test
65
+ assert_equal 'foobar.us-west-1.elasticbeanstalk.com', host_for_smoke_test
66
66
  end
67
67
 
68
68
  def test_should_terminate_old_environment_if_phoenix_mode_is_enabled
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eb_deployer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - wpc
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-19 00:00:00.000000000 Z
12
+ date: 2016-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk
@@ -88,6 +88,7 @@ files:
88
88
  - lib/generators/eb_deployer/install/templates/ebextensions/01_postgres_packages.config
89
89
  - lib/generators/eb_deployer/install/templates/postgres_rds.json
90
90
  - test/aws_driver_stubs.rb
91
+ - test/beanstalk_test.rb
91
92
  - test/blue_green_deploy_test.rb
92
93
  - test/blue_only_deploy_test.rb
93
94
  - test/cf_event_poller_test.rb
@@ -132,6 +133,7 @@ summary: Low friction deployments should be a breeze. Elastic Beanstalk provides
132
133
  top to automate the whole flow out of the box.
133
134
  test_files:
134
135
  - test/aws_driver_stubs.rb
136
+ - test/beanstalk_test.rb
135
137
  - test/blue_green_deploy_test.rb
136
138
  - test/blue_only_deploy_test.rb
137
139
  - test/cf_event_poller_test.rb