smartdc 0.4.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +0 -1
- data/.travis.yml +5 -0
- data/Gemfile +7 -10
- data/README.md +42 -69
- data/Rakefile +47 -0
- data/VERSION +1 -1
- data/bin/sdc +327 -0
- data/lib/cli_helper.rb +131 -8
- data/lib/configure.rb +73 -0
- data/lib/smartdc.rb +16 -1
- data/lib/smartdc/api/analytics.rb +29 -7
- data/lib/smartdc/api/analytics/heatmap.rb +20 -0
- data/lib/smartdc/api/datacenters.rb +6 -7
- data/lib/smartdc/api/datasets.rb +6 -7
- data/lib/smartdc/api/keys.rb +10 -11
- data/lib/smartdc/api/machine/metadata.rb +9 -15
- data/lib/smartdc/api/machine/snapshots.rb +16 -16
- data/lib/smartdc/api/machine/tags.rb +11 -12
- data/lib/smartdc/api/machines.rb +23 -23
- data/lib/smartdc/api/packages.rb +7 -8
- data/lib/smartdc/client.rb +14 -18
- data/lib/smartdc/request.rb +41 -51
- data/lib/smartdc/response.rb +24 -0
- data/lib/smartdc/response/raise_error.rb +1 -1
- data/smartdc.gemspec +51 -90
- data/spec/fixtures/analytics.json +26 -0
- data/spec/fixtures/datacenter.json +4 -0
- data/spec/fixtures/datacenters.json +3 -0
- data/spec/fixtures/datasets.json +38 -0
- data/spec/fixtures/keys.json +14 -0
- data/spec/fixtures/machines.json +36 -0
- data/spec/fixtures/packages.json +18 -0
- data/spec/fixtures/snapshots.json +8 -0
- data/spec/fixtures/tag.json +3 -0
- data/spec/spec_helper.rb +3 -12
- data/spec/unit/smartdc/api/analytics_spec.rb +53 -0
- data/spec/unit/smartdc/api/datacenters_spec.rb +31 -0
- data/spec/unit/smartdc/api/datasets_spec.rb +31 -0
- data/spec/unit/smartdc/api/keys_spec.rb +53 -0
- data/spec/unit/smartdc/api/machine/metadata_spec.rb +42 -0
- data/spec/unit/smartdc/api/machine/snapshots_spec.rb +132 -0
- data/spec/unit/smartdc/api/machine/tags_spec.rb +53 -0
- data/spec/unit/smartdc/api/machines_spec.rb +53 -0
- data/spec/unit/smartdc/api/packages_spec.rb +31 -0
- data/spec/{smartdc → unit/smartdc}/client_spec.rb +0 -6
- data/spec/{smartdc_spec.rb → unit/smartdc_spec.rb} +1 -1
- metadata +72 -140
- data/LICENSE.md +0 -20
- data/bin/sdc-addmachinemetadata +0 -29
- data/bin/sdc-addmachinetag +0 -29
- data/bin/sdc-createinstrumentation +0 -27
- data/bin/sdc-createkey +0 -32
- data/bin/sdc-createmachine +0 -39
- data/bin/sdc-createmachinesnapshot +0 -27
- data/bin/sdc-deleteinstrumentation +0 -12
- data/bin/sdc-deletekey +0 -12
- data/bin/sdc-deletemachine +0 -12
- data/bin/sdc-deletemachinemetadata +0 -29
- data/bin/sdc-deletemachinesnapshot +0 -29
- data/bin/sdc-deletemachinetag +0 -29
- data/bin/sdc-describeanalytics +0 -10
- data/bin/sdc-getdatacenter +0 -10
- data/bin/sdc-getdataset +0 -10
- data/bin/sdc-getinstrumentation +0 -31
- data/bin/sdc-getkey +0 -10
- data/bin/sdc-getmachine +0 -12
- data/bin/sdc-getmachinemetadata +0 -12
- data/bin/sdc-getmachinesnapshot +0 -27
- data/bin/sdc-getmachinetag +0 -27
- data/bin/sdc-getpackage +0 -10
- data/bin/sdc-listdatacenters +0 -10
- data/bin/sdc-listdatasets +0 -10
- data/bin/sdc-listinstrumentations +0 -10
- data/bin/sdc-listkeys +0 -10
- data/bin/sdc-listmachines +0 -10
- data/bin/sdc-listmachinesnapshots +0 -10
- data/bin/sdc-listmachinetags +0 -10
- data/bin/sdc-listpackages +0 -10
- data/bin/sdc-rebootmachine +0 -12
- data/bin/sdc-resizemachine +0 -34
- data/bin/sdc-setup +0 -67
- data/bin/sdc-startmachine +0 -12
- data/bin/sdc-startmachinefromsnapshot +0 -29
- data/bin/sdc-stopmachine +0 -12
- data/config/fixtures/instrumentation.json +0 -4
- data/config/fixtures/key.json +0 -4
- data/config/fixtures/tag.json +0 -3
- data/lib/smartdc/api/analytics/instrumentations.rb +0 -44
- data/lib/smartdc/response/mashify.rb +0 -29
- data/lib/smartdc/response/parse_json.rb +0 -26
- data/spec/smartdc/api/analytics_spec.rb +0 -32
- data/spec/smartdc/api/datacenters_spec.rb +0 -16
- data/spec/smartdc/api/datasets_spec.rb +0 -16
- data/spec/smartdc/api/keys_spec.rb +0 -32
- data/spec/smartdc/api/machine/metadata_spec.rb +0 -59
- data/spec/smartdc/api/machine/snapshots_spec.rb +0 -70
- data/spec/smartdc/api/machine/tags_spec.rb +0 -65
- data/spec/smartdc/api/machines_spec.rb +0 -92
- data/spec/smartdc/api/packages_spec.rb +0 -16
- data/spec/smartdc/request_spec.rb +0 -12
@@ -1,34 +1,34 @@
|
|
1
1
|
module Smartdc::Api
|
2
2
|
module Machine
|
3
3
|
class Snapshots
|
4
|
-
attr_reader :request
|
4
|
+
attr_reader :request
|
5
5
|
|
6
|
-
def initialize(
|
7
|
-
@request = request
|
8
|
-
@id1 = id1
|
6
|
+
def initialize(id, options)
|
9
7
|
@id = id
|
8
|
+
@request = Smartdc::Request.new(options)
|
10
9
|
end
|
11
10
|
|
12
|
-
def create(
|
13
|
-
request.post('my/machines/' + @
|
11
|
+
def create(raw={})
|
12
|
+
request.post('my/machines/' + @id.to_s + '/snapshots/', raw)
|
14
13
|
end
|
15
|
-
|
16
|
-
def
|
14
|
+
|
15
|
+
def read(id)
|
17
16
|
raise ArgumentError unless id
|
18
|
-
request.
|
17
|
+
request.get('my/machines/' + @id.to_s + '/snapshots/' + id.to_s)
|
19
18
|
end
|
20
19
|
|
21
|
-
def
|
22
|
-
|
23
|
-
request.get('my/machines/' + @id1.to_s + '/snapshots/' + id.to_s)
|
20
|
+
def all(query={})
|
21
|
+
request.get('my/machines/' + @id.to_s + '/snapshots', query)
|
24
22
|
end
|
25
23
|
|
26
|
-
def
|
27
|
-
|
24
|
+
def destroy(id)
|
25
|
+
raise ArgumentError unless id
|
26
|
+
request.del('my/machines/' + @id.to_s + '/snapshots/' + id.to_s)
|
28
27
|
end
|
29
28
|
|
30
|
-
def
|
31
|
-
|
29
|
+
def start(id)
|
30
|
+
raise ArgumentError unless id
|
31
|
+
request.post('my/machines/' + @id.to_s + '/snapshots/' + id.to_s)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -1,29 +1,28 @@
|
|
1
1
|
module Smartdc::Api
|
2
2
|
module Machine
|
3
3
|
class Tags
|
4
|
-
attr_reader :request
|
4
|
+
attr_reader :request
|
5
5
|
|
6
|
-
def initialize(
|
7
|
-
@request = request
|
8
|
-
@id1 = id1
|
6
|
+
def initialize(id, options)
|
9
7
|
@id = id
|
8
|
+
@request = Smartdc::Request.new(options)
|
10
9
|
end
|
11
10
|
|
12
|
-
def create(
|
13
|
-
request.post('my/machines/' + @
|
11
|
+
def create(raw={})
|
12
|
+
request.post('my/machines/' + @id.to_s + '/tags/', raw)
|
14
13
|
end
|
15
14
|
|
16
|
-
def read
|
15
|
+
def read(id)
|
17
16
|
raise ArgumentError unless id
|
18
|
-
request.get('my/machines/' + @
|
17
|
+
request.get('my/machines/' + @id.to_s + '/tags/' + id.to_s)
|
19
18
|
end
|
20
19
|
|
21
|
-
def
|
22
|
-
request.get('my/machines/' + @
|
20
|
+
def all(query={})
|
21
|
+
request.get('my/machines/' + @id.to_s + '/tags', query)
|
23
22
|
end
|
24
23
|
|
25
|
-
def
|
26
|
-
request.
|
24
|
+
def destroy(id=nil)
|
25
|
+
request.del('my/machines/' + @id.to_s + '/tags/' + id.to_s)
|
27
26
|
end
|
28
27
|
end
|
29
28
|
end
|
data/lib/smartdc/api/machines.rb
CHANGED
@@ -5,65 +5,65 @@ require 'smartdc/api/machine/snapshots'
|
|
5
5
|
module Smartdc
|
6
6
|
module Api
|
7
7
|
class Machines
|
8
|
-
attr_reader :request
|
8
|
+
attr_reader :request
|
9
9
|
|
10
|
-
def initialize(
|
11
|
-
@
|
12
|
-
@
|
10
|
+
def initialize(options)
|
11
|
+
@options = options
|
12
|
+
@request = Smartdc::Request.new(options)
|
13
13
|
end
|
14
14
|
|
15
|
-
def create(
|
16
|
-
request.post('my/machines/',
|
15
|
+
def create(raw={})
|
16
|
+
request.post('my/machines/', raw)
|
17
17
|
end
|
18
18
|
|
19
|
-
def read
|
19
|
+
def read(id)
|
20
20
|
raise ArgumentError unless id
|
21
21
|
request.get('my/machines/' + id.to_s)
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
25
|
-
request.get('my/machines',
|
24
|
+
def all(query={})
|
25
|
+
request.get('my/machines', query)
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
28
|
+
def destroy(id)
|
29
29
|
raise ArgumentError unless id
|
30
|
-
request.
|
30
|
+
request.del('my/machines/' + id.to_s)
|
31
31
|
end
|
32
32
|
|
33
|
-
def stop
|
33
|
+
def stop(id)
|
34
34
|
raise ArgumentError unless id
|
35
35
|
request.post('my/machines/' + id.to_s, {'action'=>'stop'})
|
36
36
|
end
|
37
37
|
|
38
|
-
def start
|
38
|
+
def start(id)
|
39
39
|
raise ArgumentError unless id
|
40
40
|
request.post('my/machines/' + id.to_s, {'action'=>'start'})
|
41
41
|
end
|
42
42
|
|
43
|
-
def reboot
|
43
|
+
def reboot(id)
|
44
44
|
raise ArgumentError unless id
|
45
45
|
request.post('my/machines/' + id.to_s, {'action'=>'reboot'})
|
46
46
|
end
|
47
47
|
|
48
|
-
def resize(
|
48
|
+
def resize(id, query={})
|
49
49
|
raise ArgumentError unless id
|
50
|
-
|
51
|
-
request.post('my/machines/' + id.to_s,
|
50
|
+
query['action'] = 'resize'
|
51
|
+
request.post('my/machines/' + id.to_s, query)
|
52
52
|
end
|
53
53
|
|
54
|
-
def tags(
|
54
|
+
def tags(id)
|
55
55
|
raise ArgumentError unless id
|
56
|
-
Smartdc::Api::Machine::Tags.new(
|
56
|
+
Smartdc::Api::Machine::Tags.new(id, @options)
|
57
57
|
end
|
58
58
|
|
59
|
-
def metadata(
|
59
|
+
def metadata(id)
|
60
60
|
raise ArgumentError unless id
|
61
|
-
Smartdc::Api::Machine::Metadata.new(
|
61
|
+
Smartdc::Api::Machine::Metadata.new(id, @options)
|
62
62
|
end
|
63
63
|
|
64
|
-
def snapshots(
|
64
|
+
def snapshots(id)
|
65
65
|
raise ArgumentError unless id
|
66
|
-
Smartdc::Api::Machine::Snapshots.new(
|
66
|
+
Smartdc::Api::Machine::Snapshots.new(id, @options)
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
data/lib/smartdc/api/packages.rb
CHANGED
@@ -1,21 +1,20 @@
|
|
1
1
|
module Smartdc
|
2
2
|
module Api
|
3
3
|
class Packages
|
4
|
-
attr_reader :request
|
4
|
+
attr_reader :request
|
5
5
|
|
6
|
-
def initialize(
|
7
|
-
@request =
|
8
|
-
@id = id
|
6
|
+
def initialize(options)
|
7
|
+
@request = Smartdc::Request.new(options)
|
9
8
|
end
|
10
9
|
|
11
|
-
def read
|
10
|
+
def read(id)
|
12
11
|
raise ArgumentError unless id
|
13
12
|
request.get('my/packages/' + id.to_s)
|
14
13
|
end
|
15
14
|
|
16
|
-
def
|
17
|
-
request.get('my/packages',
|
15
|
+
def all(query={})
|
16
|
+
request.get('my/packages', query)
|
18
17
|
end
|
19
18
|
end
|
20
19
|
end
|
21
|
-
end
|
20
|
+
end
|
data/lib/smartdc/client.rb
CHANGED
@@ -7,38 +7,34 @@ require 'smartdc/api/analytics'
|
|
7
7
|
|
8
8
|
module Smartdc
|
9
9
|
class Client
|
10
|
-
attr_reader :
|
10
|
+
attr_reader :options
|
11
11
|
|
12
12
|
def initialize(options={})
|
13
|
-
@
|
13
|
+
@options ||= options
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
17
|
-
|
16
|
+
def keys()
|
17
|
+
Smartdc::Api::Keys.new(options)
|
18
18
|
end
|
19
19
|
|
20
|
-
def
|
21
|
-
Smartdc::Api::
|
20
|
+
def datacenters()
|
21
|
+
Smartdc::Api::Datacenters.new(options)
|
22
22
|
end
|
23
23
|
|
24
|
-
def
|
25
|
-
Smartdc::Api::
|
24
|
+
def datasets()
|
25
|
+
Smartdc::Api::Datasets.new(options)
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
Smartdc::Api::
|
28
|
+
def packages()
|
29
|
+
Smartdc::Api::Packages.new(options)
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
33
|
-
|
32
|
+
def machines()
|
33
|
+
Smartdc::Api::Machines.new(options)
|
34
34
|
end
|
35
35
|
|
36
|
-
def
|
37
|
-
|
38
|
-
end
|
39
|
-
|
40
|
-
def analytics(id=nil)
|
41
|
-
Smartdc::Api::Analytics.new(request, id)
|
36
|
+
def analytics()
|
37
|
+
Smartdc::Api::Analytics.new(options)
|
42
38
|
end
|
43
39
|
end
|
44
40
|
end
|
data/lib/smartdc/request.rb
CHANGED
@@ -1,88 +1,78 @@
|
|
1
|
-
require '
|
2
|
-
require 'multi_json'
|
1
|
+
require 'json'
|
3
2
|
require 'faraday'
|
4
|
-
require 'smartdc/response/mashify'
|
5
|
-
require 'smartdc/response/parse_json'
|
6
3
|
require 'smartdc/response/raise_error'
|
7
4
|
|
8
5
|
module Smartdc
|
9
6
|
class Request
|
10
|
-
attr_reader :url, :version, :username, :password
|
11
|
-
attr_accessor :format
|
12
|
-
|
13
7
|
def initialize(options)
|
14
|
-
@
|
15
|
-
@version = options['version']
|
16
|
-
@username = options['username']
|
17
|
-
@password = options['password']
|
18
|
-
@format = options['format']
|
8
|
+
@options = options
|
19
9
|
end
|
20
10
|
|
21
|
-
def get(path,
|
22
|
-
request(:get, path,
|
11
|
+
def get(path, query={})
|
12
|
+
request(:get, path, query, {})
|
23
13
|
end
|
24
14
|
|
25
|
-
def post(path,
|
26
|
-
request(:post, path,
|
15
|
+
def post(path, raw={})
|
16
|
+
request(:post, path, {}, raw)
|
27
17
|
end
|
28
18
|
|
29
|
-
def put(path,
|
30
|
-
request(:put, path,
|
19
|
+
def put(path, raw={})
|
20
|
+
request(:put, path, {}, raw)
|
31
21
|
end
|
32
22
|
|
33
|
-
def
|
34
|
-
request(:delete, path,
|
23
|
+
def del(path, query={})
|
24
|
+
request(:delete, path, query, {})
|
35
25
|
end
|
36
26
|
|
37
|
-
|
38
|
-
|
39
|
-
response = connection.send(method) do |request|
|
27
|
+
def request(method, path, query={}, raw={})
|
28
|
+
res = connection.send(method) do |req|
|
40
29
|
case method
|
41
30
|
when :get
|
42
|
-
|
31
|
+
req.url path, query
|
43
32
|
when :post, :put
|
44
|
-
|
45
|
-
|
33
|
+
req.path = path
|
34
|
+
req.body = raw.to_json unless raw.empty?
|
46
35
|
when :delete
|
47
|
-
|
48
|
-
|
36
|
+
req.url path
|
37
|
+
end
|
38
|
+
|
39
|
+
if @options[:debug]
|
40
|
+
print 'Request: '
|
41
|
+
puts "method: #{req.method.to_s}"
|
42
|
+
puts "path: #{req.path}"
|
43
|
+
puts "params: #{req.params}"
|
44
|
+
puts "headers: #{req.headers}"
|
45
|
+
puts "body: #{req.body}"
|
49
46
|
end
|
50
47
|
end
|
51
|
-
response.body
|
52
|
-
end
|
53
48
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
middleware = 2
|
60
|
-
when 'json'
|
61
|
-
middleware = 1
|
62
|
-
else
|
63
|
-
middleware = 0
|
49
|
+
if @options[:debug]
|
50
|
+
print 'Response: '
|
51
|
+
puts "status: #{res.status}"
|
52
|
+
puts "headers: #{res.headers}"
|
53
|
+
puts "body: #{res.body}"
|
64
54
|
end
|
65
55
|
|
56
|
+
Smartdc::Response.new(res)
|
57
|
+
end
|
58
|
+
|
59
|
+
private
|
60
|
+
|
61
|
+
def connection
|
66
62
|
options = {
|
67
|
-
:url =>
|
63
|
+
:url => 'https://' + @options[:hostname],
|
68
64
|
:ssl => {:verify => false},
|
69
65
|
:headers => {
|
70
|
-
'
|
71
|
-
'X-Api-Version' => version
|
66
|
+
'Content-Type'=>'application/json',
|
67
|
+
'X-Api-Version' => @options[:version]
|
72
68
|
}
|
73
69
|
}
|
74
70
|
|
75
71
|
Faraday.new(options) do |builder|
|
76
|
-
builder.
|
77
|
-
builder.use Smartdc::Response::
|
78
|
-
builder.use Smartdc::Response::ParseJson if middleware > 1
|
79
|
-
builder.use Smartdc::Response::RaiseError
|
72
|
+
builder.request :basic_auth, @options[:username], @options[:password]
|
73
|
+
# builder.use Smartdc::Response::RaiseError
|
80
74
|
builder.adapter Faraday.default_adapter
|
81
75
|
end
|
82
76
|
end
|
83
|
-
|
84
|
-
def basic_auth(username, password)
|
85
|
-
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
86
|
-
end
|
87
77
|
end
|
88
78
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Smartdc
|
2
|
+
class Response
|
3
|
+
attr_reader :status, :headers, :body
|
4
|
+
|
5
|
+
def initialize(response)
|
6
|
+
@status = response.status
|
7
|
+
@headers = response.headers
|
8
|
+
@body = response.body
|
9
|
+
end
|
10
|
+
|
11
|
+
def content
|
12
|
+
case @body
|
13
|
+
when nil, ''
|
14
|
+
nil
|
15
|
+
when 'true'
|
16
|
+
true
|
17
|
+
when 'false'
|
18
|
+
false
|
19
|
+
else
|
20
|
+
JSON.parse(@body)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/smartdc.gemspec
CHANGED
@@ -5,67 +5,30 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "smartdc"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "1.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["ogom"]
|
12
|
-
s.date = "2012-
|
13
|
-
s.description = "
|
12
|
+
s.date = "2012-12-16"
|
13
|
+
s.description = "SmartDataCenter client and SmartDataCenter Command Line Interface."
|
14
14
|
s.email = "ogom@hotmail.co.jp"
|
15
|
-
s.executables = ["sdc
|
15
|
+
s.executables = ["sdc"]
|
16
16
|
s.extra_rdoc_files = [
|
17
|
-
"LICENSE.md",
|
18
17
|
"README.md"
|
19
18
|
]
|
20
19
|
s.files = [
|
21
20
|
".document",
|
21
|
+
".travis.yml",
|
22
22
|
"Gemfile",
|
23
|
-
"LICENSE.md",
|
24
23
|
"README.md",
|
24
|
+
"Rakefile",
|
25
25
|
"VERSION",
|
26
|
-
"bin/sdc
|
27
|
-
"bin/sdc-addmachinetag",
|
28
|
-
"bin/sdc-createinstrumentation",
|
29
|
-
"bin/sdc-createkey",
|
30
|
-
"bin/sdc-createmachine",
|
31
|
-
"bin/sdc-createmachinesnapshot",
|
32
|
-
"bin/sdc-deleteinstrumentation",
|
33
|
-
"bin/sdc-deletekey",
|
34
|
-
"bin/sdc-deletemachine",
|
35
|
-
"bin/sdc-deletemachinemetadata",
|
36
|
-
"bin/sdc-deletemachinesnapshot",
|
37
|
-
"bin/sdc-deletemachinetag",
|
38
|
-
"bin/sdc-describeanalytics",
|
39
|
-
"bin/sdc-getdatacenter",
|
40
|
-
"bin/sdc-getdataset",
|
41
|
-
"bin/sdc-getinstrumentation",
|
42
|
-
"bin/sdc-getkey",
|
43
|
-
"bin/sdc-getmachine",
|
44
|
-
"bin/sdc-getmachinemetadata",
|
45
|
-
"bin/sdc-getmachinesnapshot",
|
46
|
-
"bin/sdc-getmachinetag",
|
47
|
-
"bin/sdc-getpackage",
|
48
|
-
"bin/sdc-listdatacenters",
|
49
|
-
"bin/sdc-listdatasets",
|
50
|
-
"bin/sdc-listinstrumentations",
|
51
|
-
"bin/sdc-listkeys",
|
52
|
-
"bin/sdc-listmachines",
|
53
|
-
"bin/sdc-listmachinesnapshots",
|
54
|
-
"bin/sdc-listmachinetags",
|
55
|
-
"bin/sdc-listpackages",
|
56
|
-
"bin/sdc-rebootmachine",
|
57
|
-
"bin/sdc-resizemachine",
|
58
|
-
"bin/sdc-setup",
|
59
|
-
"bin/sdc-startmachine",
|
60
|
-
"bin/sdc-startmachinefromsnapshot",
|
61
|
-
"bin/sdc-stopmachine",
|
62
|
-
"config/fixtures/instrumentation.json",
|
63
|
-
"config/fixtures/key.json",
|
64
|
-
"config/fixtures/tag.json",
|
26
|
+
"bin/sdc",
|
65
27
|
"lib/cli_helper.rb",
|
28
|
+
"lib/configure.rb",
|
66
29
|
"lib/smartdc.rb",
|
67
30
|
"lib/smartdc/api/analytics.rb",
|
68
|
-
"lib/smartdc/api/analytics/
|
31
|
+
"lib/smartdc/api/analytics/heatmap.rb",
|
69
32
|
"lib/smartdc/api/datacenters.rb",
|
70
33
|
"lib/smartdc/api/datasets.rb",
|
71
34
|
"lib/smartdc/api/keys.rb",
|
@@ -77,64 +40,62 @@ Gem::Specification.new do |s|
|
|
77
40
|
"lib/smartdc/client.rb",
|
78
41
|
"lib/smartdc/error.rb",
|
79
42
|
"lib/smartdc/request.rb",
|
80
|
-
"lib/smartdc/response
|
81
|
-
"lib/smartdc/response/parse_json.rb",
|
43
|
+
"lib/smartdc/response.rb",
|
82
44
|
"lib/smartdc/response/raise_error.rb",
|
83
45
|
"smartdc.gemspec",
|
84
|
-
"spec/
|
85
|
-
"spec/
|
86
|
-
"spec/
|
87
|
-
"spec/
|
88
|
-
"spec/
|
89
|
-
"spec/
|
90
|
-
"spec/
|
91
|
-
"spec/
|
92
|
-
"spec/
|
93
|
-
"spec/
|
94
|
-
"spec/smartdc/
|
95
|
-
"spec/
|
96
|
-
"spec/
|
46
|
+
"spec/fixtures/analytics.json",
|
47
|
+
"spec/fixtures/datacenter.json",
|
48
|
+
"spec/fixtures/datacenters.json",
|
49
|
+
"spec/fixtures/datasets.json",
|
50
|
+
"spec/fixtures/keys.json",
|
51
|
+
"spec/fixtures/machines.json",
|
52
|
+
"spec/fixtures/packages.json",
|
53
|
+
"spec/fixtures/snapshots.json",
|
54
|
+
"spec/fixtures/tag.json",
|
55
|
+
"spec/spec_helper.rb",
|
56
|
+
"spec/unit/smartdc/api/analytics_spec.rb",
|
57
|
+
"spec/unit/smartdc/api/datacenters_spec.rb",
|
58
|
+
"spec/unit/smartdc/api/datasets_spec.rb",
|
59
|
+
"spec/unit/smartdc/api/keys_spec.rb",
|
60
|
+
"spec/unit/smartdc/api/machine/metadata_spec.rb",
|
61
|
+
"spec/unit/smartdc/api/machine/snapshots_spec.rb",
|
62
|
+
"spec/unit/smartdc/api/machine/tags_spec.rb",
|
63
|
+
"spec/unit/smartdc/api/machines_spec.rb",
|
64
|
+
"spec/unit/smartdc/api/packages_spec.rb",
|
65
|
+
"spec/unit/smartdc/client_spec.rb",
|
66
|
+
"spec/unit/smartdc_spec.rb"
|
97
67
|
]
|
98
68
|
s.homepage = "http://github.com/ogom/ruby-smartdc"
|
99
69
|
s.licenses = ["MIT"]
|
100
70
|
s.require_paths = ["lib"]
|
101
|
-
s.rubygems_version = "1.8.
|
102
|
-
s.summary = "SmartDataCenter CloudApi client by ruby."
|
71
|
+
s.rubygems_version = "1.8.23"
|
72
|
+
s.summary = "Joyent SmartDataCenter CloudApi client by ruby."
|
103
73
|
|
104
74
|
if s.respond_to? :specification_version then
|
105
75
|
s.specification_version = 3
|
106
76
|
|
107
77
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
108
|
-
s.add_runtime_dependency(%q<faraday>, ["~> 0.
|
109
|
-
s.add_runtime_dependency(%q<
|
110
|
-
s.add_runtime_dependency(%q<
|
111
|
-
s.
|
112
|
-
s.add_development_dependency(%q<
|
113
|
-
s.add_development_dependency(%q<
|
114
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
|
115
|
-
s.add_development_dependency(%q<rcov>, ["~> 0.9.11"])
|
116
|
-
s.add_development_dependency(%q<uuid>, ["~> 2.3.4"])
|
78
|
+
s.add_runtime_dependency(%q<faraday>, ["~> 0.8"])
|
79
|
+
s.add_runtime_dependency(%q<thor>, ["~> 0.16"])
|
80
|
+
s.add_runtime_dependency(%q<terminal-table>, ["~> 1.4"])
|
81
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.1"])
|
82
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8"])
|
83
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.12"])
|
117
84
|
else
|
118
|
-
s.add_dependency(%q<faraday>, ["~> 0.
|
119
|
-
s.add_dependency(%q<
|
120
|
-
s.add_dependency(%q<
|
121
|
-
s.add_dependency(%q<
|
122
|
-
s.add_dependency(%q<
|
123
|
-
s.add_dependency(%q<
|
124
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
125
|
-
s.add_dependency(%q<rcov>, ["~> 0.9.11"])
|
126
|
-
s.add_dependency(%q<uuid>, ["~> 2.3.4"])
|
85
|
+
s.add_dependency(%q<faraday>, ["~> 0.8"])
|
86
|
+
s.add_dependency(%q<thor>, ["~> 0.16"])
|
87
|
+
s.add_dependency(%q<terminal-table>, ["~> 1.4"])
|
88
|
+
s.add_dependency(%q<bundler>, ["~> 1.1"])
|
89
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
90
|
+
s.add_dependency(%q<rspec>, ["~> 2.12"])
|
127
91
|
end
|
128
92
|
else
|
129
|
-
s.add_dependency(%q<faraday>, ["~> 0.
|
130
|
-
s.add_dependency(%q<
|
131
|
-
s.add_dependency(%q<
|
132
|
-
s.add_dependency(%q<
|
133
|
-
s.add_dependency(%q<
|
134
|
-
s.add_dependency(%q<
|
135
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
|
136
|
-
s.add_dependency(%q<rcov>, ["~> 0.9.11"])
|
137
|
-
s.add_dependency(%q<uuid>, ["~> 2.3.4"])
|
93
|
+
s.add_dependency(%q<faraday>, ["~> 0.8"])
|
94
|
+
s.add_dependency(%q<thor>, ["~> 0.16"])
|
95
|
+
s.add_dependency(%q<terminal-table>, ["~> 1.4"])
|
96
|
+
s.add_dependency(%q<bundler>, ["~> 1.1"])
|
97
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8"])
|
98
|
+
s.add_dependency(%q<rspec>, ["~> 2.12"])
|
138
99
|
end
|
139
100
|
end
|
140
101
|
|