opzworks 0.3.2 → 0.3.3

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: 7698febfaf963b46c1f624109efe82aa9efbb41b
4
- data.tar.gz: 328d933bf61e97a034712c15eb6efa1e1292f776
3
+ metadata.gz: 54a8db4d18a1f2f35249675c31e549b5abf8af6d
4
+ data.tar.gz: 3ec49b3d90823083a8c8c01a22df12c3fb09deda
5
5
  SHA512:
6
- metadata.gz: ef32d7d217453da1a83a1f5c5d9fad2c63e49d6c3b4e2cb1e76d348405194d0658caade49af0dbd67bbc34eb484079baea5a8aee58090ef9d527bff62e3529af
7
- data.tar.gz: 08f5435373c44b23f3c3635c9587ca50ea590205e271ba9761a3365f0382e3e17162baf1ac574d6793f4e89fb0178a5d3cd305b8948ddb0c92a20732147fe4b8
6
+ metadata.gz: 52886e13f13d4b5fc104d42b350ea2dcc800fafc74a5aa76cfe08dd35770487721851e7764d381a60b2663651437a625dd54275ce9aea6f14586980df7de41a2
7
+ data.tar.gz: 058975fdb065b9c4f518abb18fe9736140b650fe58ff0a5359b6004614c4d9643cf4a6a9f79421da732e607846098790004361cb2234d61e333349e650039963
@@ -40,11 +40,11 @@ module OpzWorks
40
40
 
41
41
  # loops over inputs
42
42
  ARGV.each do |opt|
43
- populate_stack(opt, response)
44
- next if @populate_stack_failure == true
43
+ var = populate_stack(opt, response)
44
+ next if var == false
45
45
 
46
- manage_berks_repos
47
- next if @berks_repo_failure == true
46
+ var = manage_berks_repos
47
+ next if var == false
48
48
 
49
49
  berks_cook_path = config.berks_base_path || '/tmp'
50
50
  cook_path = "#{berks_cook_path}/#{@project}-#{@branch}"
@@ -5,7 +5,7 @@ def manage_berks_repos
5
5
  if !File.directory?(@target_path)
6
6
  if config.berks_github_org.nil?
7
7
  puts "#{@target_path} does not exist, and 'berks-github-org' is not set in ~/.aws/config, skipping.".foreground(:yellow)
8
- @berks_repo_failure = true
8
+ return false
9
9
  else
10
10
  repo = "git@github.com:#{config.berks_github_org}/opsworks-#{@project}.git"
11
11
  puts "#{@target_path} does not exist!".foreground(:red)
@@ -12,10 +12,10 @@ def populate_stack(input, data = {})
12
12
  # break?
13
13
  if count < 1
14
14
  puts 'No matching stacks found for input '.foreground(:yellow) + input.foreground(:green) + ', skipping.'.foreground(:yellow)
15
- @populate_stack_failure = true
15
+ return false
16
16
  elsif count > 1
17
17
  puts 'Found more than one stack matching input '.foreground(:yellow) + input.foreground(:green) + ', skipping.'.foreground(:yellow)
18
- @populate_stack_failure = true
18
+ return false
19
19
  else
20
20
  @stack_json = match[:custom_json]
21
21
  @project = match[:name].split('::').first
@@ -38,11 +38,11 @@ module OpzWorks
38
38
 
39
39
  # loops over inputs
40
40
  ARGV.each do |opt|
41
- populate_stack(opt, response)
42
- next if @populate_stack_failure == true
41
+ var = populate_stack(opt, response)
42
+ next if var == false
43
43
 
44
- manage_berks_repos
45
- next if @berks_repo_failure == true
44
+ var = manage_berks_repos
45
+ next if var == false
46
46
 
47
47
  json = File.read("#{@target_path}/stack.json")
48
48
  diff = Diffy::Diff.new(@stack_json + "\n", json, context: options[:context])
data/lib/opzworks/meta.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module OpzWorks
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  AUTHORS = ['Grant Heffernan', 'Mapzen']
4
4
  EMAIL = ['grant@mapzen.com']
5
5
  DESCRIPTION = 'OpzWorks Utilities'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opzworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Heffernan