kelbim 0.2.6 → 0.2.7

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: a13b5ff1e109412d1ef9671e1336a29719361f4b
4
- data.tar.gz: f29e478efc5250f98f5e23754437e1932b7ab4cb
3
+ metadata.gz: 98475033d7688faa312b278ccdfd6d5bc7ca681f
4
+ data.tar.gz: 8eedc96af4b4355a31853021a58f2eb9e3164bc0
5
5
  SHA512:
6
- metadata.gz: 34d2700052e7f2d9b0d297825c4fce3c5ec29b896800344437cf928bae0afa5b8177888cb61223383d99644a6adca2ab3ef2879ac7e22e0f6c5269d8140d34c2
7
- data.tar.gz: 441f707c128b882d1a338ea02162402898ad3e0df67c3e4529b50c2216b0f284307d1b84d16ac98b301cd2ed6a0c3b66b71fd82cd508bbd44f62707cf44ed5c5
6
+ metadata.gz: b81b1a71bde1623c87a933626cbf2a5a299ee9b3bc8e5574f2e6bd64dc31c6c9ff940665b5a6f7b6f6b66af675e97c22fa20472f0a023090296d6591892c4fd5
7
+ data.tar.gz: 94e7c7aa7628c02a38d096a42b3b2c7e93b06ea7ebb7ef7d91db2beb2ef23206f5f540e7cb67c03dd2d4398b3f3514f85cc57cbfc03b443c9c40d4204b40278f
data/README.md CHANGED
@@ -46,6 +46,7 @@ kelbim -a # apply `ELBfile` to ELB
46
46
  ```
47
47
  Usage: kelbim [options]
48
48
  -p, --profile PROFILE_NAME
49
+ --credentials-path PATH
49
50
  -k, --access-key ACCESS_KEY
50
51
  -s, --secret-key SECRET_KEY
51
52
  -r, --region REGION
data/bin/kelbim CHANGED
@@ -27,8 +27,10 @@ ARGV.options do |opt|
27
27
  secret_key = nil
28
28
  region = nil
29
29
  profile_name = nil
30
+ credentials_path = nil
30
31
 
31
32
  opt.on('-p', '--profile PROFILE_NAME') {|v| profile_name = v }
33
+ opt.on('' , '--credentials-path PATH') {|v| credentials_path = v }
32
34
  opt.on('-k', '--access-key ACCESS_KEY') {|v| access_key = v }
33
35
  opt.on('-s', '--secret-key SECRET_KEY') {|v| secret_key = v }
34
36
  opt.on('-r', '--region REGION') {|v| region = v }
@@ -53,10 +55,11 @@ ARGV.options do |opt|
53
55
  if access_key and secret_key
54
56
  aws_opts[:access_key_id] = access_key
55
57
  aws_opts[:secret_access_key] = secret_key
56
- elsif profile_name
57
- provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new(
58
- :profile_name => profile_name
59
- )
58
+ elsif profile_name or credentials_path
59
+ credentials_opts = {}
60
+ credentials_opts[:profile_name] = profile_name if profile_name
61
+ credentials_opts[:path] = credentials_path if credentials_path
62
+ provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new(credentials_opts)
60
63
  aws_opts[:credential_provider] = provider
61
64
  elsif (access_key and !secret_key) or (!access_key and secret_key) or mode.nil?
62
65
  puts opt.help
@@ -1,5 +1,5 @@
1
1
  module Kelbim
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.7"
3
3
  end
4
4
 
5
5
  Version = Kelbim::VERSION
@@ -190,7 +190,15 @@ module Kelbim
190
190
 
191
191
  def compare_attributes(dsl)
192
192
  return true unless dsl.attributes
193
- same = (@load_balancer.attributes.sort == dsl.attributes.sort)
193
+
194
+ # Comparison only key that is included in the DSL
195
+ lb_attributes = {}
196
+
197
+ dsl.attributes.keys.each do |key|
198
+ lb_attributes[key] = @load_balancer.attributes[key]
199
+ end
200
+
201
+ same = (lb_attributes.sort == dsl.attributes.sort)
194
202
  yield if !same && block_given?
195
203
  return same
196
204
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kelbim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-26 00:00:00.000000000 Z
11
+ date: 2014-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk