tass 0.1.3 → 0.2.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: 7477b740521cfffcab21dc81e51ab3d81c76457d
4
- data.tar.gz: 724f1459c3ddfa7997e5975d4dc325caeb8e6e14
3
+ metadata.gz: ca68ee303c37d72f4f6181190b335f69ebb08246
4
+ data.tar.gz: b4682c05d5e4d33331a3593f6f5057d7d6ef5a4f
5
5
  SHA512:
6
- metadata.gz: c09942370add8729fbf7480e1819da06b1029d3aee25677d670886f1eb82f457146013d2cd3e05d37cfa899cf7b1f9b4aec7045d6a87b1e05513c1814eabc8bf
7
- data.tar.gz: c65b5f549e3ece2517df0ff1d0c70fcd8191f71d6070d32b3823070d77e0d4afb5222d1de3fff871f02672232d546059f194cdb4fadb4072eba761ac23221dfb
6
+ metadata.gz: 45dab2e4592a57fad381569449b5d7a345cfccbe087f2dc82ba0ffc657c4f933eb0689372e1ce281467ab339c85ac2b9b88db729038e43b85046d8666795f60d
7
+ data.tar.gz: 0f54f9b7845553c64a9846a130496d79a8d16182f6a4725e4ffa3933727cc29f53af1ee4849dc42634acf384549ff9e5ccc2c009880126fbf45197ac01d3b1ec
@@ -21,6 +21,8 @@ module Tapjoy
21
21
  **config, **aws_env, user_data: user_data)
22
22
  rescue Aws::AutoScaling::Errors::ValidationError => err
23
23
  STDERR.puts "Cannot create launch configuration: #{err}"
24
+ rescue Aws::AutoScaling::Errors::LimitExceeded => err
25
+ STDERR.puts "Maximum launch configurations exceeded: #{err}"
24
26
  end
25
27
  end
26
28
 
@@ -2,8 +2,8 @@ module Tapjoy
2
2
  module AutoscalingBootstrap
3
3
  module Version
4
4
  MAJOR = 0
5
- MINOR = 1
6
- PATCH = 3
5
+ MINOR = 2
6
+ PATCH = 0
7
7
  end
8
8
 
9
9
  VERSION = [Version::MAJOR, Version::MINOR, Version::PATCH].join('.')
@@ -154,13 +154,22 @@ module Tapjoy
154
154
  end
155
155
 
156
156
  # configure environment
157
+
157
158
  def configure_environment(filename, env=nil, config_dir)
158
- defaults_hash = self.load_yaml("#{config_dir}/config/common/defaults.yaml")
159
- facet_hash = self.load_yaml("#{config_dir}/config/clusters/#{filename}")
159
+ if filename.include?(File::SEPARATOR)
160
+ facet_file = filename
161
+ config_dir = File.expand_path('../../..', facet_file)
162
+ else
163
+ facet_file = File.join(config_dir, 'config', 'clusters', filename)
164
+ end
165
+
166
+ common_path = File.join(config_dir, 'config', 'common')
167
+ defaults_hash = self.load_yaml(File.join(common_path, 'defaults.yaml'))
168
+ facet_hash = self.load_yaml(facet_file)
160
169
  env ||= facet_hash[:environment]
161
170
  env ||= defaults_hash[:environment]
162
171
  Tapjoy::AutoscalingBootstrap.is_valid_env?(config_dir, env)
163
- env_hash = self.load_yaml("#{config_dir}/config/common/#{env}.yaml")
172
+ env_hash = self.load_yaml(File.join(common_path, "#{env}.yaml"))
164
173
 
165
174
  new_config = defaults_hash.merge!(env_hash).merge(facet_hash)
166
175
  new_config[:config_dir] = config_dir
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Tayarani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-05 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.2
61
+ version: '0.2'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.2
68
+ version: '0.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement