kelbim 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -1
  3. data/bin/kelbim +13 -6
  4. data/lib/kelbim/version.rb +1 -1
  5. metadata +19 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc9ddbdaa225037b5a7fe723186e3f7ab77504e5
4
- data.tar.gz: 2d343ae025602b690b9d690ab3fcee8f092f0c5e
3
+ metadata.gz: a13b5ff1e109412d1ef9671e1336a29719361f4b
4
+ data.tar.gz: f29e478efc5250f98f5e23754437e1932b7ab4cb
5
5
  SHA512:
6
- metadata.gz: 105ae56a2944767976c61070b28f0db90f0f20e9ac2d6da1ec1b5aa98d5f80ee06a1b34e322d1fc3e2383da240a2ddc2f1446f3a3b95c89ad9e9a86f99808785
7
- data.tar.gz: d7ba674637bfd9032dc9dd11dbf307aa9ac63b2c180b64bd33a9b058162b96271414c13cdde38f6af2d57af53c8db929c8beef6dd9277e462ec630635b585ab5
6
+ metadata.gz: 34d2700052e7f2d9b0d297825c4fce3c5ec29b896800344437cf928bae0afa5b8177888cb61223383d99644a6adca2ab3ef2879ac7e22e0f6c5269d8140d34c2
7
+ data.tar.gz: 441f707c128b882d1a338ea02162402898ad3e0df67c3e4529b50c2216b0f284307d1b84d16ac98b301cd2ed6a0c3b66b71fd82cd508bbd44f62707cf44ed5c5
data/README.md CHANGED
@@ -5,7 +5,7 @@ Kelbim is a tool to manage ELB.
5
5
  It defines the state of ELB using DSL, and updates ELB according to DSL.
6
6
 
7
7
  [![Gem Version](https://badge.fury.io/rb/kelbim.png)](http://badge.fury.io/rb/kelbim)
8
- [![Build Status](https://drone.io/bitbucket.org/winebarrel/kelbim/status.png)](https://drone.io/bitbucket.org/winebarrel/kelbim/latest)
8
+ [![Build Status](https://travis-ci.org/winebarrel/kelbim.svg?branch=master)](https://travis-ci.org/winebarrel/kelbim)
9
9
 
10
10
  **Notice**
11
11
 
@@ -41,6 +41,31 @@ kelbim -a --dry-run
41
41
  kelbim -a # apply `ELBfile` to ELB
42
42
  ```
43
43
 
44
+ ## Help
45
+
46
+ ```
47
+ Usage: kelbim [options]
48
+ -p, --profile PROFILE_NAME
49
+ -k, --access-key ACCESS_KEY
50
+ -s, --secret-key SECRET_KEY
51
+ -r, --region REGION
52
+ -a, --apply
53
+ -f, --file FILE
54
+ -n, --elb-names NAMES
55
+ --dry-run
56
+ --ec2s VPC_IDS
57
+ --without-deleting-policy
58
+ -e, --export
59
+ -o, --output FILE
60
+ --split
61
+ --split-more
62
+ -t, --test
63
+ --show-load-balancers
64
+ --show-policies
65
+ --no-color
66
+ --debug
67
+ ```
68
+
44
69
  ## ELBfile example
45
70
 
46
71
  ```ruby
@@ -67,6 +92,7 @@ ec2 do
67
92
  end
68
93
 
69
94
  attributes do
95
+ connection_settings :idle_timeout=>60
70
96
  access_log :enabled => false
71
97
  cross_zone_load_balancing :enabled => false
72
98
  connection_draining :enabled => false, :timeout => 300
data/bin/kelbim CHANGED
@@ -26,7 +26,9 @@ ARGV.options do |opt|
26
26
  access_key = nil
27
27
  secret_key = nil
28
28
  region = nil
29
+ profile_name = nil
29
30
 
31
+ opt.on('-p', '--profile PROFILE_NAME') {|v| profile_name = v }
30
32
  opt.on('-k', '--access-key ACCESS_KEY') {|v| access_key = v }
31
33
  opt.on('-s', '--secret-key SECRET_KEY') {|v| secret_key = v }
32
34
  opt.on('-r', '--region REGION') {|v| region = v }
@@ -47,17 +49,22 @@ ARGV.options do |opt|
47
49
  opt.on('' , '--debug') { options[:debug] = true }
48
50
  opt.parse!
49
51
 
52
+ aws_opts = {}
50
53
  if access_key and secret_key
51
- aws_opts = {
52
- :access_key_id => access_key,
53
- :secret_access_key => secret_key,
54
- }
55
- aws_opts[:region] = region if region
56
- AWS.config(aws_opts)
54
+ aws_opts[:access_key_id] = access_key
55
+ aws_opts[:secret_access_key] = secret_key
56
+ elsif profile_name
57
+ provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new(
58
+ :profile_name => profile_name
59
+ )
60
+ aws_opts[:credential_provider] = provider
57
61
  elsif (access_key and !secret_key) or (!access_key and secret_key) or mode.nil?
58
62
  puts opt.help
59
63
  exit 1
60
64
  end
65
+
66
+ aws_opts[:region] = region if region
67
+ AWS.config(aws_opts)
61
68
  rescue => e
62
69
  $stderr.puts("[ERROR] #{e.message}")
63
70
  exit 1
@@ -1,5 +1,5 @@
1
1
  module Kelbim
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
4
4
 
5
5
  Version = Kelbim::VERSION
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.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.37.0
19
+ version: 1.49.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.37.0
26
+ version: 1.49.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: uuid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: 2.14.1
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec-instafail
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
125
139
  description: Kelbim is a tool to manage ELB. It defines the state of ELB using DSL,
126
140
  and updates ELB according to DSL.
127
141
  email:
@@ -161,7 +175,7 @@ files:
161
175
  - lib/kelbim/wrapper/policy-collection.rb
162
176
  - lib/kelbim/wrapper/policy.rb
163
177
  - lib/kelbim.rb
164
- homepage: https://bitbucket.org/winebarrel/kelbim
178
+ homepage: https://github.com/winebarrel/kelbim
165
179
  licenses:
166
180
  - MIT
167
181
  metadata: {}
@@ -186,4 +200,3 @@ signing_key:
186
200
  specification_version: 4
187
201
  summary: Kelbim is a tool to manage ELB.
188
202
  test_files: []
189
- has_rdoc: