euca 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/LICENSE.txt +19 -17
- data/euca.gemspec +3 -3
- data/lib/euca.rb +19 -15
- data/lib/euca/api/keypair.rb +1 -1
- data/lib/euca/version.rb +1 -1
- data/lib/euca/wrapper.rb +2 -1
- data/spec/euca_spec.rb +9 -0
- metadata +13 -11
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzliODA2MmY3ZWUyNThjODllMWViZWJlY2IyY2E2MjI4ZDU1MjY1MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjliYjA2NGU0MTJjZTIwMzMzN2YyMDhkYzVlZjYxODUwZmYxZTIyOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDkzMTNiZmYyMzlmYTA2Y2QyOTM5MjdkMGViYjk4MjdiMmYxNDJmYjI5Yjli
|
10
|
+
NGYyNDFiYjYyN2VkNDVlNWUwN2ZjZDk3YTY2NjE3ODEyZDRhZGJhOGMzMzE2
|
11
|
+
N2E4MGQ5OWFiMzk2ZDE5M2I2ZGQwNDg5MDFlMTQzYjYxNTQzODQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGNmMTAwYmI1YTY1ZjljY2U1MTNmNjAyZDY5YzRjN2M4ZGM0NzhjNGJiYzAz
|
14
|
+
YTJmYjk1MDlmMzU5NzIwYmQ0NmNiMTM4MDFiNWU4YjgzNzlkNjEwYjlkMzEw
|
15
|
+
MWJhYmNmYTdiZmYyMTAwZWIzZDkxMzI0ZDZjMGFjNzJmMDA5MmE=
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,24 @@
|
|
1
|
-
|
1
|
+
This is free and unencumbered software released into the public domain.
|
2
2
|
|
3
|
-
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
4
|
+
distribute this software, either in source code form or as a compiled
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
6
|
+
means.
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
9
|
+
of this software dedicate any and all copyright interest in the
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
11
|
+
of the public at large and to the detriment of our heirs and
|
12
|
+
successors. We intend this dedication to be an overt act of
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
14
|
+
software under copyright law.
|
15
15
|
|
16
16
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
17
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|
data/euca.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Onur Uyar"]
|
10
10
|
spec.email = ["me@onuruyar.com"]
|
11
11
|
spec.summary = %q{Ultra thin Ruby wrapper for euca2ools command line tools}
|
12
|
-
spec.homepage = ""
|
13
|
-
spec.license = "
|
12
|
+
spec.homepage = "https://github.com/lemmycaution/euca"
|
13
|
+
spec.license = "Unlicense"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_development_dependency "bundler", "~> 1.5"
|
21
21
|
spec.add_development_dependency "rake"
|
22
22
|
spec.add_development_dependency "minitest"
|
23
|
-
spec.add_dependency 'vhs', '~> 0.0.4'
|
24
23
|
spec.add_dependency 'activesupport', '~> 4.0.2'
|
24
|
+
spec.add_dependency 'rye', '0.9.12'
|
25
25
|
end
|
data/lib/euca.rb
CHANGED
@@ -1,32 +1,36 @@
|
|
1
|
-
require '
|
2
|
-
require 'vhs'
|
3
|
-
require "euca/version"
|
1
|
+
require 'rye'
|
4
2
|
require "euca/api"
|
5
3
|
|
6
4
|
module Euca
|
7
|
-
BIN_NAME="euca2ools".freeze
|
8
|
-
BIN_VERSION="euca-version".freeze
|
9
|
-
UBUNTU_13_10="qmi-c4c45230"
|
10
|
-
UBUNTU_12_04="qmi-b58041dd"
|
11
|
-
T1_NANO="t1.nano"
|
12
5
|
|
13
|
-
|
14
|
-
|
15
|
-
|
6
|
+
EUCA_VERSION = "euca-version".freeze
|
7
|
+
UBUNTU_13_10 = "qmi-c4c45230"
|
8
|
+
UBUNTU_12_04 = "qmi-b58041dd"
|
9
|
+
T1_NANO = "t1.nano"
|
16
10
|
|
17
11
|
def self.has_cli?
|
18
|
-
|
12
|
+
self.version.exit_status == 0
|
19
13
|
end
|
20
14
|
|
21
15
|
def self.version
|
22
|
-
sh(BIN_VERSION)
|
16
|
+
sh(BIN_VERSION)
|
23
17
|
end
|
24
18
|
|
25
19
|
def self.api_methods
|
26
|
-
@@api_methods ||=
|
20
|
+
@@api_methods ||= begin
|
21
|
+
sh(:ls, :"1", "#{self.exec_path}/euca-*").
|
22
|
+
gsub(/#{self.exec_path}\/euca-/m,"").split("\n")
|
23
|
+
end
|
27
24
|
end
|
28
25
|
|
29
26
|
def self.exec_path
|
30
|
-
@@euca_home ||= sh(
|
27
|
+
@@euca_home ||= sh(:dirname, "$(which euca-version)")
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.sh *args
|
31
|
+
ret = Rye.shell *args
|
32
|
+
raise RuntimeError.new(ret.stderr.join($/)) if ret.exit_status != 0
|
33
|
+
ret.to_s
|
31
34
|
end
|
35
|
+
|
32
36
|
end
|
data/lib/euca/api/keypair.rb
CHANGED
data/lib/euca/version.rb
CHANGED
data/lib/euca/wrapper.rb
CHANGED
@@ -7,7 +7,8 @@ module Euca
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def run api, *args
|
10
|
-
|
10
|
+
raise NoMethodError.new("Euca#run: #{api} not found") and return false unless Euca.api_methods.include?(api)
|
11
|
+
parse Euca.sh(:"euca-#{api}", *args).to_s
|
11
12
|
end
|
12
13
|
|
13
14
|
def parse response
|
data/spec/euca_spec.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: euca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Onur Uyar
|
@@ -53,33 +53,33 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 4.0.2
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 4.0.2
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rye
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.9.12
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.9.12
|
83
83
|
description:
|
84
84
|
email:
|
85
85
|
- me@onuruyar.com
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- lib/euca/version.rb
|
106
106
|
- lib/euca/wrapper.rb
|
107
107
|
- spec/address_spec.rb
|
108
|
+
- spec/euca_spec.rb
|
108
109
|
- spec/fixtures/address.yml
|
109
110
|
- spec/fixtures/images.yml
|
110
111
|
- spec/fixtures/instance.yml
|
@@ -114,9 +115,9 @@ files:
|
|
114
115
|
- spec/model_spec.rb
|
115
116
|
- spec/support/minitest_helper.rb
|
116
117
|
- spec/wrapper_spec.rb
|
117
|
-
homepage:
|
118
|
+
homepage: https://github.com/lemmycaution/euca
|
118
119
|
licenses:
|
119
|
-
-
|
120
|
+
- Unlicense
|
120
121
|
metadata: {}
|
121
122
|
post_install_message:
|
122
123
|
rdoc_options: []
|
@@ -140,6 +141,7 @@ specification_version: 4
|
|
140
141
|
summary: Ultra thin Ruby wrapper for euca2ools command line tools
|
141
142
|
test_files:
|
142
143
|
- spec/address_spec.rb
|
144
|
+
- spec/euca_spec.rb
|
143
145
|
- spec/fixtures/address.yml
|
144
146
|
- spec/fixtures/images.yml
|
145
147
|
- spec/fixtures/instance.yml
|