Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.2
Metrics/AbcSize:
Enabled: false
Metrics/CyclomaticComplexity:
Expand Down
6 changes: 2 additions & 4 deletions bora.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# coding: utf-8

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'bora/version'
Expand Down Expand Up @@ -29,8 +27,8 @@ Gem::Specification.new do |spec|

spec.add_development_dependency 'bundler', '~> 1.7'
spec.add_development_dependency 'hashie', '~> 3.4.6'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'rspec', '~> 3.0'
spec.add_development_dependency 'simplecov', '~> 0.12'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'simplecov', '~> 0.12'
end
2 changes: 1 addition & 1 deletion lib/bora.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def stack(stack_name)
end

def rake_tasks
@templates.each { |_, t| t.rake_tasks }
@templates.each_value { |_, t| t.rake_tasks }
end

protected
Expand Down
2 changes: 1 addition & 1 deletion lib/bora/cli_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class Bora
class CliBase < Thor
# Fix for incorrect subcommand help. See https://github.com/erikhuda/thor/issues/261
def self.banner(command, _namespace = nil, subcommand = false)
def self.banner(command, _namespace = nil, _subcommand = false)
subcommand = subcommand_prefix
subcommand_str = subcommand ? " #{subcommand}" : ''
"#{basename}#{subcommand_str} #{command.usage}"
Expand Down
2 changes: 1 addition & 1 deletion lib/bora/resolver/ami.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def resolve(uri)
end

raise NoAMI, "No Matching AMI's for prefix #{ami_prefix}" if images.empty?
images.sort! { |a, b| DateTime.parse(a.creation_date) <=> DateTime.parse(b.creation_date) }.last.image_id
images.sort! { |a, b| Time.parse(a.creation_date) <=> Time.parse(b.creation_date) }.last.image_id
end
end
end
Expand Down
5 changes: 3 additions & 2 deletions lib/bora/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ def stacks
end

def rake_tasks
@stacks.each { |_, s| s.rake_tasks }
@stacks.each_value { |_, s| s.rake_tasks }
end

private

def resolve_stack_config(template_config, stack_config, override_config)
inheritable_properties(template_config).deep_merge!(stack_config).merge(overridable_properties(override_config))
template_config_copy = Marshal.load(Marshal.dump(template_config))
inheritable_properties(template_config_copy).deep_merge!(stack_config).merge(overridable_properties(override_config))
end

def inheritable_properties(config)
Expand Down