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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/opzworks/config.rb +16 -13
- data/lib/opzworks/meta.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12ff3def664b96266a1a9f39c95651e4117ff54a
|
4
|
+
data.tar.gz: 0c86ce5c0e49152b810b881a0ac3aaf661f21dc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`
|
data/lib/opzworks/config.rb
CHANGED
@@ -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
|
-
|
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 "
|
18
|
-
|
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'] || '
|
21
|
-
abort "Could not find [#{@opzworks_profile}] config block in #{
|
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 #{
|
26
|
-
@aws_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
|
-
|
32
|
+
opzworks_ini[@opzworks_profile]['ssh-user-name'].strip unless opzworks_ini[@opzworks_profile]['ssh-user-name'].nil?
|
30
33
|
@berks_repository_path =
|
31
|
-
|
34
|
+
opzworks_ini[@opzworks_profile]['berks-repository-path'].strip unless opzworks_ini[@opzworks_profile]['berks-repository-path'].nil?
|
32
35
|
@berks_base_path =
|
33
|
-
|
36
|
+
opzworks_ini[@opzworks_profile]['berks-base-path'].strip unless opzworks_ini[@opzworks_profile]['berks-base-path'].nil?
|
34
37
|
@berks_s3_bucket =
|
35
|
-
|
38
|
+
opzworks_ini[@opzworks_profile]['berks-s3-bucket'].strip unless opzworks_ini[@opzworks_profile]['berks-s3-bucket'].nil?
|
36
39
|
@berks_tarball_name =
|
37
|
-
|
40
|
+
opzworks_ini[@opzworks_profile]['berks-tarball-name'].strip unless opzworks_ini[@opzworks_profile]['berks-tarball-name'].nil?
|
38
41
|
@berks_github_org =
|
39
|
-
|
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