elastic-beanstalk 1.1.12 → 1.1.13

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: a2f7ad000128a315ac2e977837675b9748b2a3c8
4
- data.tar.gz: b9635f456392b73eb7fc0c7e006b84762e36a042
3
+ metadata.gz: cd59a6abb4c4ca4065f57594fe18c82cfe5baeb9
4
+ data.tar.gz: 2a9c61cf2e3cc42588976de27028f674f4bd91b4
5
5
  SHA512:
6
- metadata.gz: 1193ddd38c373267a2d57c0fe1818311abe45a186acad424a70206d67151f98e0ea5d6280f526ca0706053540bfa5b15b7e71533d994daad26d9df90427c061d
7
- data.tar.gz: e3ac2c58fb5d4b77eda3fa319736b3f181f39509439bea46a8d594299e76d6d056d6ed3938826aae4af85125f63a9c8bc2e20013ddd315fc91d7b4314719c425
6
+ metadata.gz: b63bc9f1f7c88c2783604f1d56703bcfee1ee04da20f9c97b471429e0012efc44e51514559d02fcc88041851a249eb1afa5bdef48e0e0f5262543e14486ed45b
7
+ data.tar.gz: 31094b7cc28f368d613100fc39aa21f02172b5bed8da8a1e813950018f9c15c75f503b3e18b17350bd861ac91aebde00f763dec4366d167f6eebc8285e24490e
data/README.md CHANGED
@@ -220,7 +220,10 @@ options:
220
220
  inactive:
221
221
  aws:autoscaling:asg:
222
222
  MinSize: 0
223
- Cooldown: 900
223
+ MaxSize: 0
224
+ Cooldown: 900
225
+ aws:autoscaling:updatepolicy:rollingupdate:
226
+ RollingUpdateEnabled: false
224
227
 
225
228
  #---
226
229
  development:
@@ -160,9 +160,17 @@ namespace :eb do
160
160
  end
161
161
  EbConfig.load!(environment, filename)
162
162
 
163
- # Let's be explicit regardless of 'production' being the eb's default shall we? Set RACK_ENV and RAILS_ENV based on the given environment
164
- EbConfig.set_option(:'aws:elasticbeanstalk:application:environment', 'RACK_ENV', "#{EbConfig.environment}")
165
- EbConfig.set_option(:'aws:elasticbeanstalk:application:environment', 'RAILS_ENV', "#{EbConfig.environment}")
163
+ # Set RACK_ENV and RAILS_ENV based on the given environment or the provided configuration
164
+ unless EbConfig.configuration.fetch(:options, {})
165
+ .fetch(:'aws:elasticbeanstalk:application:environment',{})
166
+ .fetch(:RACK_ENV, nil)
167
+ EbConfig.set_option(:'aws:elasticbeanstalk:application:environment', 'RACK_ENV', "#{EbConfig.environment}")
168
+ end
169
+ unless EbConfig.configuration.fetch(:options, {})
170
+ .fetch(:'aws:elasticbeanstalk:application:environment',{})
171
+ .fetch(:RAILS_ENV, nil)
172
+ EbConfig.set_option(:'aws:elasticbeanstalk:application:environment', 'RAILS_ENV', "#{EbConfig.environment}")
173
+ end
166
174
 
167
175
  #-------------------------------------------------------------------------------
168
176
  # resolve the version and set the APP_VERSION environment variable
@@ -1,5 +1,5 @@
1
1
  module Elastic
2
2
  module Beanstalk
3
- VERSION = '1.1.12'
3
+ VERSION = '1.1.13'
4
4
  end
5
5
  end
@@ -40,6 +40,7 @@ ebextensions:
40
40
  options:
41
41
  aws:elasticbeanstalk:application:environment:
42
42
  RAILS_ENV: foobar
43
+ RACK_ENV: bizbaz
43
44
 
44
45
  aws:autoscaling:launchconfiguration:
45
46
  InstanceType: foo
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+ require 'rake'
3
+
4
+ # The `credentials` method is called against the main ruby object.
5
+ # We maintain a reference to it so that we can avoid setting real credentials in the test.
6
+ # This test reaches in to set the @credentials ivar instead of stubbing a method because
7
+ # reliably stubbing and unstubbing a global object is error prone and would affect other tests.
8
+ $main = self
9
+
10
+ describe 'eb namespace rake task' do
11
+ describe 'eb:config' do
12
+ before do
13
+ load 'lib/elastic/beanstalk/tasks/eb.rake'
14
+ Rake::Task.define_task(:environment)
15
+ $main.instance_variable_set(:@credentials, {})
16
+ allow(EbConfig).to receive(:resolve_path).and_return('spec/lib/elastic/beanstalk/eb_spec.yml')
17
+ # We could run eb:show_config, but it is easier to access the data directly
18
+ Rake::Task['eb:config'].invoke('staging')
19
+ end
20
+
21
+ after do
22
+ $main.remove_instance_variable(:@credentials)
23
+ end
24
+
25
+ it 'should not override the RAILS_ENV in eb.yml' do
26
+ rails_env = EbConfig.configuration.fetch(:options, {})
27
+ .fetch(:'aws:elasticbeanstalk:application:environment', {})
28
+ .fetch(:RAILS_ENV, nil)
29
+ expect(rails_env).to eq('foobar')
30
+ end
31
+
32
+ it 'should not override the RACK_ENV in eb.yml' do
33
+ rack_env = EbConfig.configuration.fetch(:options, {})
34
+ .fetch(:'aws:elasticbeanstalk:application:environment', {})
35
+ .fetch(:RACK_ENV, nil)
36
+ expect(rack_env).to eq('bizbaz')
37
+ end
38
+ end
39
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-beanstalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.12
4
+ version: 1.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Ross
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -209,6 +209,7 @@ files:
209
209
  - spec/lib/elastic/beanstalk/eb_extensions_spec.rb
210
210
  - spec/lib/elastic/beanstalk/eb_smoke_tester_spec.rb
211
211
  - spec/lib/elastic/beanstalk/eb_spec.yml
212
+ - spec/lib/elastic/beanstalk/tasks/eb_rake_spec.rb
212
213
  - spec/spec_helper.rb
213
214
  homepage: https://github.com/alienfast/elastic-beanstalk
214
215
  licenses:
@@ -241,4 +242,5 @@ test_files:
241
242
  - spec/lib/elastic/beanstalk/eb_extensions_spec.rb
242
243
  - spec/lib/elastic/beanstalk/eb_smoke_tester_spec.rb
243
244
  - spec/lib/elastic/beanstalk/eb_spec.yml
245
+ - spec/lib/elastic/beanstalk/tasks/eb_rake_spec.rb
244
246
  - spec/spec_helper.rb