opzworks 0.3.10 → 0.3.11

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: 5267c45661f0c2c65ddcf850d56716763009d426
4
- data.tar.gz: 68d82248bbf8a14ac9b29dabf1de5ad8a4f77b34
3
+ metadata.gz: f3b61c0b4454c4e8c85d0e261937f7c0a9a3b810
4
+ data.tar.gz: 9fc6f7ef2868eb33c90567940bc3d21627d4c81a
5
5
  SHA512:
6
- metadata.gz: 860703816532d659d4f981d124f4e6e160f7ca79b134d78b98962921d971ec00de6009100de2ae693b6c2e904b6802267096c88d5c79b39261506cd60e353fab
7
- data.tar.gz: 92314206dfae0cb6c0c4fe2c3e1c1cb14833297c7db3414ce276446f8a64c6e5a872d05fac60c1948b61ac6798c9bb7974366e05f03bba18bf9c7f41bfb80852
6
+ metadata.gz: c3602a5c078273782fff81d5f1cae986ee0982d171d71815416916626f800b2bc061e15324b5a3b4f821285fd9d80918453ed8967832a4c9a68bec8012e4e4a1
7
+ data.tar.gz: fd9adda1cb636e83dd0cc5f61cf52b34e37e9e627e688fa30d35506030cc37d40ed25fdae14c29115b461e364c1c65b65bc63c9c631a94fcf3abe158f344092c
@@ -139,7 +139,7 @@ module OpzWorks
139
139
  begin
140
140
  opsworks.create_deployment(hash)
141
141
  rescue Aws::OpsWorks::Errors::ServiceError => e
142
- puts "Caught error while attempting to trigger deployment: ".foreground(:red)
142
+ puts 'Caught error while attempting to trigger deployment: '.foreground(:red)
143
143
  puts e
144
144
  end
145
145
  else
@@ -13,16 +13,20 @@ module OpzWorks
13
13
  def initialize
14
14
  file = ENV['AWS_CONFIG_FILE'] || "#{ENV['HOME']}/.aws/config"
15
15
 
16
- fail 'AWS config file not found!'.foreground(:red) unless File.exist? file
16
+ # abort unless required conditions are met
17
+ abort "Config file #{file} not found, exiting!".foreground(:red) unless File.exist? file
17
18
  ini = IniFile.load(file)
18
19
 
20
+ abort "Could not find [opzworks] config block in #{file}, exiting!".foreground(:red) if ini['opzworks'].empty?
21
+
19
22
  # set the region and the profile we want to pick up from ~/.aws/credentials
20
23
  @aws_profile = ENV['AWS_PROFILE'] || 'default'
21
24
  @aws_region = ENV['AWS_REGION'] || ini[@aws_profile]['region']
22
25
 
23
- @ssh_user_name = ini['opzworks']['ssh-user-name'].strip
24
- @berks_repository_path = ini['opzworks']['berks-repository-path'].strip
25
-
26
+ @ssh_user_name =
27
+ ini['opzworks']['ssh-user-name'].strip unless ini['opzworks']['ssh-user-name'].nil?
28
+ @berks_repository_path=
29
+ ini['opzworks']['berks-repository-path'].strip unless ini['opzworks']['berks-repository-path'].nil?
26
30
  @berks_base_path =
27
31
  ini['opzworks']['berks-base-path'].strip unless ini['opzworks']['berks-base-path'].nil?
28
32
  @berks_s3_bucket =
data/lib/opzworks/meta.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module OpzWorks
2
- VERSION = '0.3.10'
2
+ VERSION = '0.3.11'
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.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Heffernan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-10 00:00:00.000000000 Z
12
+ date: 2016-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk