opzworks 0.10.0 → 0.11.0

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: ab1543fcedf335dd55bf202dcce00c00876ece4d
4
- data.tar.gz: 823d039d9ce4c93e9040ce1aadaae9289ccd8e67
3
+ metadata.gz: 12ff3def664b96266a1a9f39c95651e4117ff54a
4
+ data.tar.gz: 0c86ce5c0e49152b810b881a0ac3aaf661f21dc2
5
5
  SHA512:
6
- metadata.gz: f07a659564cf9763deb42b7db455613af2c2419b6a2853ce383fdaa2cd1f0ea720f2fecf54d3d16f154f11ef8e22ab7b4e725632568b01dec582194cffa2ad3a
7
- data.tar.gz: 6418a9b09e65017e708dd71271b4d33210556737f66bdb7f1e8ed9f864a333fd96301ded9b043732855c1952cfab02cef5a6e0622807bfcc17785192e408db2c
6
+ metadata.gz: 152bb9dcf352a9f700a1c120ae47a957ec0001b4c87f9011cdce46f85dbba5c372cc17e573e63497579f3e962b48064b765eaab12f11d868137922a4023244cd
7
+ data.tar.gz: 9943adcb0a5cbd667be913c155556d7fe4b910ba958c054e8b552c5024af4cbf7144ba71551c60b3d384959fde384cbf32a5a8a83d53296173322fa53d4396fc
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
  changelog
2
2
  =========
3
3
 
4
+ 0.11.0
5
+ ------
6
+ * opzworks config file moved out of ~/.aws/config to ~/.opzworks/config
7
+ * default opzworks config block is now assumed to be `[default]` (previously `[opzworks]`)
8
+ * overriding of selected opzworks profile is done via ENV: `OPZWORKS_PROFILE=something`
9
+
4
10
  0.10.0
5
11
  ------
6
12
  * allow override of default [opzworks] config block via ENV var: `OPZWORKS_PROFILE`
@@ -11,32 +11,35 @@ module OpzWorks
11
11
  :berks_base_path, :berks_s3_bucket, :berks_tarball_name, :berks_github_org
12
12
 
13
13
  def initialize
14
- file = ENV['AWS_CONFIG_FILE'] || "#{ENV['HOME']}/.aws/config"
14
+ aws_config_file = ENV['AWS_CONFIG_FILE'] || "#{ENV['HOME']}/.aws/config"
15
+ opzworks_config_file = ENV['OPZWORKS_CONFIG_FILE'] || "#{ENV['HOME']}/.opzworks/config"
15
16
 
16
17
  # abort unless required conditions are met
17
- abort "Config file #{file} not found, exiting!".foreground(:red) unless File.exist? file
18
- ini = IniFile.load(file)
18
+ abort "AWS config file #{aws_config_file} not found, exiting!".foreground(:red) unless File.exist? aws_config_file
19
+ abort "Opzworks config file #{opzworks_config_file} not found, exiting!".foreground(:red) unless File.exist? opzworks_config_file
20
+ aws_ini = IniFile.load(aws_config_file)
21
+ opzworks_ini = IniFile.load(opzworks_config_file)
19
22
 
20
- @opzworks_profile = ENV['OPZWORKS_PROFILE'] || 'opzworks'
21
- abort "Could not find [#{@opzworks_profile}] config block in #{file}, exiting!".foreground(:red) if ini[@opzworks_profile].empty?
23
+ @opzworks_profile = ENV['OPZWORKS_PROFILE'] || 'default'
24
+ abort "Could not find [#{@opzworks_profile}] config block in #{opzworks_config_file}, exiting!".foreground(:red) if opzworks_ini[@opzworks_profile].empty?
22
25
 
23
26
  # set the region and the profile we want to pick up from ~/.aws/credentials
24
27
  @aws_profile = ENV['AWS_PROFILE'] || 'default'
25
- abort "Could not find [#{@aws_profile}] config block in #{file}, exiting!".foreground(:red) if ini[@aws_profile].empty?
26
- @aws_region = ENV['AWS_REGION'] || ini[@aws_profile]['region']
28
+ abort "Could not find [#{@aws_profile}] config block in #{aws_config_file}, exiting!".foreground(:red) if aws_ini[@aws_profile].empty?
29
+ @aws_region = ENV['AWS_REGION'] || aws_ini[@aws_profile]['region']
27
30
 
28
31
  @ssh_user_name =
29
- ini[@opzworks_profile]['ssh-user-name'].strip unless ini[@opzworks_profile]['ssh-user-name'].nil?
32
+ opzworks_ini[@opzworks_profile]['ssh-user-name'].strip unless opzworks_ini[@opzworks_profile]['ssh-user-name'].nil?
30
33
  @berks_repository_path =
31
- ini[@opzworks_profile]['berks-repository-path'].strip unless ini[@opzworks_profile]['berks-repository-path'].nil?
34
+ opzworks_ini[@opzworks_profile]['berks-repository-path'].strip unless opzworks_ini[@opzworks_profile]['berks-repository-path'].nil?
32
35
  @berks_base_path =
33
- ini[@opzworks_profile]['berks-base-path'].strip unless ini[@opzworks_profile]['berks-base-path'].nil?
36
+ opzworks_ini[@opzworks_profile]['berks-base-path'].strip unless opzworks_ini[@opzworks_profile]['berks-base-path'].nil?
34
37
  @berks_s3_bucket =
35
- ini[@opzworks_profile]['berks-s3-bucket'].strip unless ini[@opzworks_profile]['berks-s3-bucket'].nil?
38
+ opzworks_ini[@opzworks_profile]['berks-s3-bucket'].strip unless opzworks_ini[@opzworks_profile]['berks-s3-bucket'].nil?
36
39
  @berks_tarball_name =
37
- ini[@opzworks_profile]['berks-tarball-name'].strip unless ini[@opzworks_profile]['berks-tarball-name'].nil?
40
+ opzworks_ini[@opzworks_profile]['berks-tarball-name'].strip unless opzworks_ini[@opzworks_profile]['berks-tarball-name'].nil?
38
41
  @berks_github_org =
39
- ini[@opzworks_profile]['berks-github-org'].strip unless ini[@opzworks_profile]['berks-github-org'].nil?
42
+ opzworks_ini[@opzworks_profile]['berks-github-org'].strip unless opzworks_ini[@opzworks_profile]['berks-github-org'].nil?
40
43
  end
41
44
  end
42
45
  end
data/lib/opzworks/meta.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module OpzWorks
3
- VERSION = '0.10.0'.freeze
3
+ VERSION = '0.11.0'.freeze
4
4
  AUTHORS = ['Grant Heffernan', 'Mapzen'].freeze
5
5
  EMAIL = ['grant@mapzen.com'].freeze
6
6
  DESCRIPTION = 'OpzWorks Utilities'.freeze
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.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Heffernan