bora 1.7.1 → 1.7.2

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: d145303611497605607c623bdda4ef8d51396155
4
- data.tar.gz: 23d4d5b11a9f373219ddcf583c4faf1c96c21113
3
+ metadata.gz: 98937093f12858baa7c05e4fb2aa5116c0c2e44d
4
+ data.tar.gz: bad360b491a6b00001b5508e1920f9c7595c7fd9
5
5
  SHA512:
6
- metadata.gz: ad934b35b1569718613640b8c84c7fd274d1c38e93411292c399c7ae9af51ef1a85a8a447f3a63b3586396743823c79be1770609a54f3bef1d0e95cf9793c446
7
- data.tar.gz: ef010ea3118919bd1646d6d2d50923349f81b74e45d558a0196cb96bc491b3d2d199372a47fd5f18b72c421efec3d6821ee0442c9d1ac9c2d571cfddece23d6c
6
+ metadata.gz: 65b3f927ca72e8fee031e0a7dd76fecb7f9e03ee9e3ed6e664cb501a38f4f7d621808508614b466997c23c15f28384700808a0fd0d289e1e60edac429d1aae9e
7
+ data.tar.gz: e1e2ba38350ac9f847d042db5e49becad7dfb813199f0db7c1cf6e33eef93ee4695780ee13b6e0e26b0403b937308bd62ef2a7292a5cae424f32dd3d73c6163d
data/README.md CHANGED
@@ -369,7 +369,7 @@ If Bora doesn't meet your needs, one of these might.
369
369
 
370
370
  ## Development
371
371
 
372
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
372
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
373
373
 
374
374
  ## Contributing
375
375
 
data/Rakefile CHANGED
@@ -5,4 +5,4 @@ require 'rubocop/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
  RuboCop::RakeTask.new
7
7
 
8
- task default: :spec
8
+ task default: %i[rubocop spec]
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'bora/version'
@@ -24,8 +24,8 @@ class Bora
24
24
 
25
25
  def update(options, &block)
26
26
  # Parameters that are not valid for the update_stack api
27
- invalid_update_stack_options = %i(on_failure disable_rollback)
28
- update_options = options.select { |key| !invalid_update_stack_options.include?(key) }
27
+ invalid_update_stack_options = %i[on_failure disable_rollback]
28
+ update_options = options.reject { |key| invalid_update_stack_options.include?(key) }
29
29
  call_cfn_action(:update_stack, update_options, &block)
30
30
  end
31
31
 
@@ -64,7 +64,7 @@ class Bora
64
64
  end
65
65
 
66
66
  def validate(options)
67
- cloudformation.validate_template(options.select { |k| [:template_body, :template_url].include?(k) })
67
+ cloudformation.validate_template(options.select { |k| %i[template_body template_url].include?(k) })
68
68
  end
69
69
 
70
70
  def status
@@ -311,15 +311,21 @@ class Bora
311
311
  end
312
312
 
313
313
  def cfn_options_from_stack_config
314
- valid_options = %w(capabilities tags disable_rollback on_failure)
314
+ valid_options = %w[capabilities tags disable_rollback on_failure]
315
315
 
316
+ # Pick out any stack config keys that are valid cfn options
316
317
  cfn_options = @stack_config.select { |k| valid_options.include?(k) }
317
- # Expand any Tags to "key" => key, "value" => value pairs
318
- if cfn_options['tags']
319
- cfn_options['tags'] = cfn_options['tags'].map do |k, v|
318
+
319
+ # Replace string keys with symbols
320
+ cfn_options = cfn_options.map { |k, v| [k.to_sym, v] }.to_h
321
+
322
+ # Expand any Tags to {key: key, value: => value} pairs
323
+ if cfn_options[:tags]
324
+ cfn_options[:tags] = cfn_options[:tags].map do |k, v|
320
325
  { key: k, value: v }
321
326
  end
322
327
  end
328
+
323
329
  cfn_options
324
330
  end
325
331
 
@@ -4,11 +4,10 @@ require 'deep_merge'
4
4
  class Bora
5
5
  class Template
6
6
  # These are properties that you can define on the template, but which can also be defined and overriden in the stack
7
-
8
- INHERITABLE_PROPERTIES = %w(capabilities default_region tags on_failure disable_rollback).freeze
7
+ INHERITABLE_PROPERTIES = %w[capabilities default_region tags on_failure disable_rollback].freeze
9
8
 
10
9
  # These are properties that can be passed in from the command line to override what's defined inthe stack
11
- OVERRIDABLE_PROPERTIES = %w(cfn_stack_name).freeze
10
+ OVERRIDABLE_PROPERTIES = %w[cfn_stack_name].freeze
12
11
 
13
12
  def initialize(template_name, template_config, override_config = {})
14
13
  @template_name = template_name
@@ -1,3 +1,3 @@
1
1
  class Bora
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.7.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bora
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Blaxland
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-24 00:00:00.000000000 Z
11
+ date: 2017-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk