cloudformation-tool 0.4.2 → 0.4.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: e7b9610569b0d65c7af93fc51430e33d2020f8cc
4
- data.tar.gz: 9d0199f6d1ed1193418eb7a912c313abadd10e5e
3
+ metadata.gz: 89f6e35519b2dc452816d1de7d739239a0ff82b1
4
+ data.tar.gz: fe7eef6f7d6f6b0d7e94fe7bbf2a3da4536b003e
5
5
  SHA512:
6
- metadata.gz: d1e0e9be5c9ece04814e98fb42831508cc1310adbae7c615e2b4fba6b604b0fdf0b5132a094a0f8bd8a327c9c8af53666fd6d67cdc189589ac156923b7756169
7
- data.tar.gz: c9aced3e58604de4d2c33285ccb9ffcb99eba55ec1b77f0320770550ea99b78035303279777c1d9a56782a33c53ee253a3dddc464ecb31ff843ed491d0b3369f
6
+ metadata.gz: 70745be5ac9ef3596e51faa8e5a87f9531ad2614bf1e232a23435077389e553b52f358ded04e9c5a8789d1f560f553560f861b638ebc91f6751abbfdd3a5d875
7
+ data.tar.gz: 8b5afc00c304caeb8351abb8a2bb632697c9d2be495f76c1c7b13c540cfa0d9fb8732a05d0061b99598b2ac7a47f88b7f3ec1fcc798a72df00a2b636d21e99a5
@@ -1,3 +1,3 @@
1
1
  module CloudFormationTool
2
- VERSION = '0.4.2'
2
+ VERSION = '0.4.3'
3
3
  end
@@ -16,9 +16,9 @@ module CloudFormationTool
16
16
  autoloaded.with :CLI
17
17
  end
18
18
 
19
- def find_profile(dir = nil)
19
+ def find_profile(dir = nil, default = nil)
20
20
  dir ||= Dir.pwd
21
- return profile if (dir == "/")
21
+ return default if (dir == "/")
22
22
  begin
23
23
  return File.read("#{dir}/.awsprofile").chomp
24
24
  rescue Errno::ENOENT
@@ -31,11 +31,11 @@ module CloudFormationTool
31
31
  end
32
32
 
33
33
  def profile
34
- $__profile ||= (ENV['AWS_DEFAULT_PROFILE'] || 'default')
34
+ $__profile ||= find_profile(nil, ENV['AWS_DEFAULT_PROFILE'] || 'default')
35
35
  end
36
36
 
37
37
  def awscreds
38
- $__aws_creds ||= Aws::SharedCredentials.new(profile_name: find_profile)
38
+ $__aws_creds ||= Aws::SharedCredentials.new(profile_name: profile)
39
39
  end
40
40
 
41
41
  def aws_config
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudformation-tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oded Arbel