kumogata 0.5.3 → 0.5.4

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: 19f66a07b454ab92e7351753a201b112702efcc7
4
- data.tar.gz: 189130373b0ba7b733acf56ddb4cafc296ccd907
3
+ metadata.gz: 737dc652de39e3d5aeeddda9e7c173aab549a4a7
4
+ data.tar.gz: 39afb226eeabe86714367d84eb14dc7316acd8e5
5
5
  SHA512:
6
- metadata.gz: 66df3ba400dcbb14e5888e3dd125406c594e514633cb6fb3329d02bd85c08c4aa4c5dcfe659392a6b3753a261326272e227a3a241beba68a6df12d6b8a5f2946
7
- data.tar.gz: 1aa6c374292cf938e5cd2e7d29044dcdc34c0fe444c9ce3a70df1044680a902cd3c1738602eacd43b0f9794cfb6614a2b2ea4987557aa4ac699be94c3e5188e2
6
+ metadata.gz: 03e90e8b9266662df9bcb11158c2a60950fe0c1e3f81046bdbb30ae4c5d322e57d7fe1748bee8d4f90bd8b00134b9eb79692a42ec7489d20f61a8a9d98e7134b
7
+ data.tar.gz: d128303f7165458dd6a149551d0226abc0c29929ea894ad30e637eb1d654e5c23a3f22366a0f9a999759f04740e5521f8d208103a2c32122761f5bd668c27eac
data/README.md CHANGED
@@ -91,8 +91,8 @@ Options:
91
91
  -k, --access-key ACCESS_KEY
92
92
  -s, --secret-key SECRET_KEY
93
93
  -r, --region REGION
94
- --config PATH
95
94
  --profile CONFIG_PROFILE
95
+ --credentials-path PATH
96
96
  --format TMPLATE_FORMAT
97
97
  --output-format FORMAT
98
98
  --skip-replace-underscore
data/bin/kumogata CHANGED
@@ -22,12 +22,16 @@ begin
22
22
 
23
23
  aws_opts = {}
24
24
 
25
- if options.config_profile
26
- provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new(
27
- :profile_name => options.config_profile
28
- )
25
+ if options.config_profile or options.credentials_path
26
+ credentials_opts = {}
27
+ credentials_opts[:profile_name] = options.config_profile if options.config_profile
28
+ credentials_opts[:path] = options.credentials_path if options.credentials_path
29
29
 
30
+ provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new(credentials_opts)
30
31
  aws_opts[:credential_provider] = provider
32
+
33
+ region = provider.send(:load_profile)['region']
34
+ aws_opts[:region] = region if region
31
35
  end
32
36
 
33
37
  [:access_key_id, :secret_access_key, :region].each do |key|
@@ -84,8 +84,8 @@ class Kumogata::ArgumentParser
84
84
  opt.on('-k', '--access-key ACCESS_KEY') {|v| options[:access_key_id] = v }
85
85
  opt.on('-s', '--secret-key SECRET_KEY') {|v| options[:secret_access_key] = v }
86
86
  opt.on('-r', '--region REGION') {|v| options[:region] = v }
87
- opt.on('' , '--config PATH') {|v| options[:config_path] = v }
88
87
  opt.on('' , '--profile CONFIG_PROFILE') {|v| options[:config_profile] = v }
88
+ opt.on('' , '--credentials-path PATH') {|v| options[:credentials_path] = v }
89
89
  opt.on('' , '--format TMPLATE_FORMAT', supported_formats) {|v| options[:format] = v }
90
90
  opt.on('' , '--output-format FORMAT', supported_formats) {|v| options[:output_format] = v }
91
91
  opt.on('' , '--skip-replace-underscore') { options[:skip_replace_underscore] = false }
@@ -1,3 +1,3 @@
1
1
  module Kumogata
2
- VERSION = '0.5.3'
2
+ VERSION = '0.5.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kumogata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-07 00:00:00.000000000 Z
11
+ date: 2015-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk