ec2ctl 0.5.0 → 0.6.0

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: 10f21431c2984ee435c8c10d01117df3b250e5fb
4
- data.tar.gz: b3663c38dd7e16453dd1572f504ff06b35d64d5c
3
+ metadata.gz: 3d7a6433b5c621fa7c9fee1cc099f4982b2373bf
4
+ data.tar.gz: 794818375ced3f00fd1cee3fe28107f2b6d854fd
5
5
  SHA512:
6
- metadata.gz: 22c80abc9c7515dacc42919dbcfb8b892e91a92299091de9349d5218098e0d884347e5247ac475f25c96b24acd9b1419b2922f95a5c4b02878dfd5f346837b6c
7
- data.tar.gz: 897298be82f07d1053047e6ffa8c7f3e199620cf90e72a30603085c1db32f72b79f59b7fbe688f2327a2eeda437364749606b1d6393e1d138fc17ccefbfd8195
6
+ metadata.gz: a7c5657494083f21c8283ab76c84dba0a745b9d7d55169bdc9b91842142c4d64cfc9f544d9e7350aadfc8dd1c2be941534c09b86580b47ba1f1e6728043b8d2f
7
+ data.tar.gz: b2ccbf0e10a90f4013a8aff487a51789c98c9775b802836e70e8c82002ec5e873b42109ce2e3218e2196d70c68317e6a523354abfb3b09f1d0f37d78c7f99180
data/ec2ctl.gemspec CHANGED
@@ -19,7 +19,9 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency "thor"
22
+ spec.add_dependency "nokogiri"
22
23
  spec.add_dependency "aws-sdk-v1"
24
+ spec.add_dependency "aws-sdk"
23
25
  spec.add_dependency "net-ssh"
24
26
  spec.add_dependency "colorize"
25
27
  spec.add_dependency "terminal-table"
@@ -1,3 +1,3 @@
1
1
  module Ec2ctl
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
data/lib/ec2ctl.rb CHANGED
@@ -2,6 +2,8 @@ require "ec2ctl/version"
2
2
 
3
3
  require "thor"
4
4
  require "aws-sdk-v1"
5
+ require "aws-sdk"
6
+ require "aws"
5
7
  require "net/ssh"
6
8
  require "net/http"
7
9
  require "colorize"
@@ -164,21 +166,24 @@ module Ec2ctl
164
166
 
165
167
  private
166
168
 
169
+ def get_profile_name
170
+ profile_name = (options[:profile] == nil) ? "default" : options[:profile]
171
+ profile_name
172
+ end
173
+
167
174
  def aws_config
168
175
  hash = {}
169
176
 
170
- if options[:profile]
171
- config = AWSConfig.profiles[options[:profile]]
172
-
173
- if config
174
- hash.update config.config_hash
175
- else
176
- provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new profile_name: options[:profile]
177
- hash.update credential_provider: provider
178
- end
177
+ if options[:access_key_id] && options[:secret_access_key]
178
+ hash.update access_key_id: options[:access_key_id]
179
+ hash.update secret_access_key: options[:secret_access_key]
179
180
  else
180
- hash.update access_key_id: options[:access_key_id] if options[:access_key_id]
181
- hash.update secret_access_key: options[:secret_access_key] if options[:secret_access_key]
181
+ provider = AWS::Core::CredentialProviders::SharedCredentialFileProvider.new profile_name: get_profile_name
182
+ #config.update credential_provider: provider
183
+
184
+ # aws credential bug fix
185
+ hash = provider.get_credentials
186
+ hash[:access_key_id].strip!
182
187
  end
183
188
 
184
189
  hash.update region: options[:region] if options[:region]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2ctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - y13i
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-16 00:00:00.000000000 Z
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: aws-sdk-v1
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +52,20 @@ dependencies:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: aws-sdk
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: net-ssh
43
71
  requirement: !ruby/object:Gem::Requirement