elastic_beans 0.4.0 → 0.4.1

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: 661efbe2cb8fd10a68a49a3ebc7899ec3b30b61a
4
- data.tar.gz: 6dee6beefb1f0dcd55f5cf7c8f7f73898c9e1432
3
+ metadata.gz: 70a69de3c656c7d828c6b47684f3806a8bfb54dc
4
+ data.tar.gz: 5e257058d7649f152d69964d6ff9c5cfcfe5c3e4
5
5
  SHA512:
6
- metadata.gz: 63dc0a28f1482b67a2d96fa6edefd65f768acbbe377357acec498bc7b34dafe9242f7ef4c365c82c15d24c80ea6e81a5d6c41cc92e85d3c39002cc969e2f04fc
7
- data.tar.gz: ca7b8ffd98f6218a0bb935aea9bfce0cf3d3e804467a709e20d9d0adf83f313ba606ff9057aebffdb2e7dbf80d42e360f2689f0bdc6cc07f8ac5f0ddc6e2de84
6
+ metadata.gz: c7f8b3ed1abc7fc073ca31cd1fa876c30081ac3365f3318e3add6631ef5740389b6a22a60ac6fa73cad3cfb2c85c28977350e7772a05484338983c06c5f28608
7
+ data.tar.gz: e0a78ebe606867f4dd9845f3bf5bbb476588ff2571d99f2aa7cf9f5ff6c82a1f536b10adb7ee03a15718cb907745cf4379b7d914aed7cd621e298c25fabee595
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /.elasticbeanstalk
11
+ /.idea
@@ -48,7 +48,7 @@ Requires AWS credentials to be set in the environment, i.e. AWS_ACCESS_KEY_ID an
48
48
  end
49
49
  version_thread.join
50
50
 
51
- progressbar.log("Deploying version #{version} to #{application.name}...")
51
+ progressbar.log("Deploying version '#{version}' to #{application.name}...")
52
52
  progressbar.title = "Deploying"
53
53
  deploy_threads = environments.map { |environment|
54
54
  progressbar.log("Deploying version '#{version}' to environment `#{environment.name}'...")
@@ -125,7 +125,7 @@ module ElasticBeans
125
125
  raise MissingConfigurationError.new(cause: e)
126
126
  end
127
127
 
128
- def template_option_setting(template: configuration_settings_description, namespace:, option_name:, default: nil, override: nil)
128
+ def template_option_setting(template: configuration_settings_description, namespace:, option_name:, default: nil, override: nil, allow_blank: true)
129
129
  option_setting = {namespace: namespace, option_name: option_name, value: default}
130
130
  if override
131
131
  return option_setting.merge!(value: override)
@@ -134,13 +134,21 @@ module ElasticBeans
134
134
  if template.nil?
135
135
  return option_setting
136
136
  end
137
+
137
138
  setting = template.to_h[:option_settings].find { |setting|
138
139
  setting[:namespace] == namespace && setting[:option_name] == option_name
139
140
  }
141
+
140
142
  if setting.nil?
141
143
  return option_setting
142
144
  end
143
145
 
146
+ # So, here's the thing. AWS might return NULL on items that actually DO have a value set, in which case,
147
+ # we should tell beans NOT to use this erroneous NULL value, and to use our specified default value.
148
+ if !allow_blank && (setting[:value].nil? || setting[:value].empty?)
149
+ return option_setting
150
+ end
151
+
144
152
  option_setting.merge!(value: setting[:value])
145
153
  end
146
154
 
@@ -22,7 +22,7 @@ module ElasticBeans
22
22
  end
23
23
 
24
24
  super + [
25
- template_option_setting(namespace: "aws:elasticbeanstalk:application", option_name: "Application Healthcheck URL", default: "HTTPS:443/"),
25
+ template_option_setting(namespace: "aws:elasticbeanstalk:application", option_name: "Application Healthcheck URL", default: "HTTPS:443/", allow_blank: false),
26
26
  template_option_setting(namespace: "aws:elasticbeanstalk:application:environment", option_name: "RAILS_SKIP_ASSET_COMPILATION", default: "false"),
27
27
  template_option_setting(namespace: "aws:elasticbeanstalk:application:environment", option_name: "RAILS_SKIP_MIGRATIONS", default: "false"),
28
28
  template_option_setting(namespace: "aws:elb:listener:443", option_name: "InstancePort", default: "443"),
@@ -1,3 +1,3 @@
1
1
  module ElasticBeans
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_beans
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Stegman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-12-02 00:00:00.000000000 Z
11
+ date: 2016-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk