smartdc 0.4.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. data/.document +0 -1
  2. data/.travis.yml +5 -0
  3. data/Gemfile +7 -10
  4. data/README.md +42 -69
  5. data/Rakefile +47 -0
  6. data/VERSION +1 -1
  7. data/bin/sdc +327 -0
  8. data/lib/cli_helper.rb +131 -8
  9. data/lib/configure.rb +73 -0
  10. data/lib/smartdc.rb +16 -1
  11. data/lib/smartdc/api/analytics.rb +29 -7
  12. data/lib/smartdc/api/analytics/heatmap.rb +20 -0
  13. data/lib/smartdc/api/datacenters.rb +6 -7
  14. data/lib/smartdc/api/datasets.rb +6 -7
  15. data/lib/smartdc/api/keys.rb +10 -11
  16. data/lib/smartdc/api/machine/metadata.rb +9 -15
  17. data/lib/smartdc/api/machine/snapshots.rb +16 -16
  18. data/lib/smartdc/api/machine/tags.rb +11 -12
  19. data/lib/smartdc/api/machines.rb +23 -23
  20. data/lib/smartdc/api/packages.rb +7 -8
  21. data/lib/smartdc/client.rb +14 -18
  22. data/lib/smartdc/request.rb +41 -51
  23. data/lib/smartdc/response.rb +24 -0
  24. data/lib/smartdc/response/raise_error.rb +1 -1
  25. data/smartdc.gemspec +51 -90
  26. data/spec/fixtures/analytics.json +26 -0
  27. data/spec/fixtures/datacenter.json +4 -0
  28. data/spec/fixtures/datacenters.json +3 -0
  29. data/spec/fixtures/datasets.json +38 -0
  30. data/spec/fixtures/keys.json +14 -0
  31. data/spec/fixtures/machines.json +36 -0
  32. data/spec/fixtures/packages.json +18 -0
  33. data/spec/fixtures/snapshots.json +8 -0
  34. data/spec/fixtures/tag.json +3 -0
  35. data/spec/spec_helper.rb +3 -12
  36. data/spec/unit/smartdc/api/analytics_spec.rb +53 -0
  37. data/spec/unit/smartdc/api/datacenters_spec.rb +31 -0
  38. data/spec/unit/smartdc/api/datasets_spec.rb +31 -0
  39. data/spec/unit/smartdc/api/keys_spec.rb +53 -0
  40. data/spec/unit/smartdc/api/machine/metadata_spec.rb +42 -0
  41. data/spec/unit/smartdc/api/machine/snapshots_spec.rb +132 -0
  42. data/spec/unit/smartdc/api/machine/tags_spec.rb +53 -0
  43. data/spec/unit/smartdc/api/machines_spec.rb +53 -0
  44. data/spec/unit/smartdc/api/packages_spec.rb +31 -0
  45. data/spec/{smartdc → unit/smartdc}/client_spec.rb +0 -6
  46. data/spec/{smartdc_spec.rb → unit/smartdc_spec.rb} +1 -1
  47. metadata +72 -140
  48. data/LICENSE.md +0 -20
  49. data/bin/sdc-addmachinemetadata +0 -29
  50. data/bin/sdc-addmachinetag +0 -29
  51. data/bin/sdc-createinstrumentation +0 -27
  52. data/bin/sdc-createkey +0 -32
  53. data/bin/sdc-createmachine +0 -39
  54. data/bin/sdc-createmachinesnapshot +0 -27
  55. data/bin/sdc-deleteinstrumentation +0 -12
  56. data/bin/sdc-deletekey +0 -12
  57. data/bin/sdc-deletemachine +0 -12
  58. data/bin/sdc-deletemachinemetadata +0 -29
  59. data/bin/sdc-deletemachinesnapshot +0 -29
  60. data/bin/sdc-deletemachinetag +0 -29
  61. data/bin/sdc-describeanalytics +0 -10
  62. data/bin/sdc-getdatacenter +0 -10
  63. data/bin/sdc-getdataset +0 -10
  64. data/bin/sdc-getinstrumentation +0 -31
  65. data/bin/sdc-getkey +0 -10
  66. data/bin/sdc-getmachine +0 -12
  67. data/bin/sdc-getmachinemetadata +0 -12
  68. data/bin/sdc-getmachinesnapshot +0 -27
  69. data/bin/sdc-getmachinetag +0 -27
  70. data/bin/sdc-getpackage +0 -10
  71. data/bin/sdc-listdatacenters +0 -10
  72. data/bin/sdc-listdatasets +0 -10
  73. data/bin/sdc-listinstrumentations +0 -10
  74. data/bin/sdc-listkeys +0 -10
  75. data/bin/sdc-listmachines +0 -10
  76. data/bin/sdc-listmachinesnapshots +0 -10
  77. data/bin/sdc-listmachinetags +0 -10
  78. data/bin/sdc-listpackages +0 -10
  79. data/bin/sdc-rebootmachine +0 -12
  80. data/bin/sdc-resizemachine +0 -34
  81. data/bin/sdc-setup +0 -67
  82. data/bin/sdc-startmachine +0 -12
  83. data/bin/sdc-startmachinefromsnapshot +0 -29
  84. data/bin/sdc-stopmachine +0 -12
  85. data/config/fixtures/instrumentation.json +0 -4
  86. data/config/fixtures/key.json +0 -4
  87. data/config/fixtures/tag.json +0 -3
  88. data/lib/smartdc/api/analytics/instrumentations.rb +0 -44
  89. data/lib/smartdc/response/mashify.rb +0 -29
  90. data/lib/smartdc/response/parse_json.rb +0 -26
  91. data/spec/smartdc/api/analytics_spec.rb +0 -32
  92. data/spec/smartdc/api/datacenters_spec.rb +0 -16
  93. data/spec/smartdc/api/datasets_spec.rb +0 -16
  94. data/spec/smartdc/api/keys_spec.rb +0 -32
  95. data/spec/smartdc/api/machine/metadata_spec.rb +0 -59
  96. data/spec/smartdc/api/machine/snapshots_spec.rb +0 -70
  97. data/spec/smartdc/api/machine/tags_spec.rb +0 -65
  98. data/spec/smartdc/api/machines_spec.rb +0 -92
  99. data/spec/smartdc/api/packages_spec.rb +0 -16
  100. 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, :id
4
+ attr_reader :request
5
5
 
6
- def initialize(request, id1, id)
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(params={})
13
- request.post('my/machines/' + @id1.to_s + '/snapshots/', params)
11
+ def create(raw={})
12
+ request.post('my/machines/' + @id.to_s + '/snapshots/', raw)
14
13
  end
15
-
16
- def start
14
+
15
+ def read(id)
17
16
  raise ArgumentError unless id
18
- request.post('my/machines/' + @id1.to_s + '/snapshots/' + id.to_s)
17
+ request.get('my/machines/' + @id.to_s + '/snapshots/' + id.to_s)
19
18
  end
20
19
 
21
- def read
22
- raise ArgumentError unless id
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 find(params={})
27
- request.get('my/machines/' + @id1.to_s + '/snapshots', params)
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 delete
31
- request.delete('my/machines/' + @id1.to_s + '/snapshots/' + id.to_s)
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, :id
4
+ attr_reader :request
5
5
 
6
- def initialize(request, id1, id)
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(params={})
13
- request.post('my/machines/' + @id1.to_s + '/tags/', params)
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/' + @id1.to_s + '/tags/' + id.to_s)
17
+ request.get('my/machines/' + @id.to_s + '/tags/' + id.to_s)
19
18
  end
20
19
 
21
- def find(params={})
22
- request.get('my/machines/' + @id1.to_s + '/tags', params)
20
+ def all(query={})
21
+ request.get('my/machines/' + @id.to_s + '/tags', query)
23
22
  end
24
23
 
25
- def delete
26
- request.delete('my/machines/' + @id1.to_s + '/tags/' + id.to_s)
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
@@ -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, :id
8
+ attr_reader :request
9
9
 
10
- def initialize(request, id=nil)
11
- @request = request
12
- @id = id
10
+ def initialize(options)
11
+ @options = options
12
+ @request = Smartdc::Request.new(options)
13
13
  end
14
14
 
15
- def create(params={})
16
- request.post('my/machines/', params)
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 find(params={})
25
- request.get('my/machines', params)
24
+ def all(query={})
25
+ request.get('my/machines', query)
26
26
  end
27
27
 
28
- def delete
28
+ def destroy(id)
29
29
  raise ArgumentError unless id
30
- request.delete('my/machines/' + id.to_s)
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(params={})
48
+ def resize(id, query={})
49
49
  raise ArgumentError unless id
50
- params[:action] = 'resize'
51
- request.post('my/machines/' + id.to_s, params)
50
+ query['action'] = 'resize'
51
+ request.post('my/machines/' + id.to_s, query)
52
52
  end
53
53
 
54
- def tags(_id=nil)
54
+ def tags(id)
55
55
  raise ArgumentError unless id
56
- Smartdc::Api::Machine::Tags.new(request, id, _id)
56
+ Smartdc::Api::Machine::Tags.new(id, @options)
57
57
  end
58
58
 
59
- def metadata(_id=nil)
59
+ def metadata(id)
60
60
  raise ArgumentError unless id
61
- Smartdc::Api::Machine::Metadata.new(request, id, _id)
61
+ Smartdc::Api::Machine::Metadata.new(id, @options)
62
62
  end
63
63
 
64
- def snapshots(_id=nil)
64
+ def snapshots(id)
65
65
  raise ArgumentError unless id
66
- Smartdc::Api::Machine::Snapshots.new(request, id, _id)
66
+ Smartdc::Api::Machine::Snapshots.new(id, @options)
67
67
  end
68
68
  end
69
69
  end
@@ -1,21 +1,20 @@
1
1
  module Smartdc
2
2
  module Api
3
3
  class Packages
4
- attr_reader :request, :id
4
+ attr_reader :request
5
5
 
6
- def initialize(request, id=nil)
7
- @request = 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 find(params={})
17
- request.get('my/packages', params)
15
+ def all(query={})
16
+ request.get('my/packages', query)
18
17
  end
19
18
  end
20
19
  end
21
- end
20
+ end
@@ -7,38 +7,34 @@ require 'smartdc/api/analytics'
7
7
 
8
8
  module Smartdc
9
9
  class Client
10
- attr_reader :request
10
+ attr_reader :options
11
11
 
12
12
  def initialize(options={})
13
- @request ||= Smartdc::Request.new(options)
13
+ @options ||= options
14
14
  end
15
15
 
16
- def format=(format)
17
- @request.format = format
16
+ def keys()
17
+ Smartdc::Api::Keys.new(options)
18
18
  end
19
19
 
20
- def keys(id=nil)
21
- Smartdc::Api::Keys.new(request, id)
20
+ def datacenters()
21
+ Smartdc::Api::Datacenters.new(options)
22
22
  end
23
23
 
24
- def datacenters(id=nil)
25
- Smartdc::Api::Datacenters.new(request, id)
24
+ def datasets()
25
+ Smartdc::Api::Datasets.new(options)
26
26
  end
27
27
 
28
- def datasets(id=nil)
29
- Smartdc::Api::Datasets.new(request, id)
28
+ def packages()
29
+ Smartdc::Api::Packages.new(options)
30
30
  end
31
31
 
32
- def packages(id=nil)
33
- Smartdc::Api::Packages.new(request, id)
32
+ def machines()
33
+ Smartdc::Api::Machines.new(options)
34
34
  end
35
35
 
36
- def machines(id=nil)
37
- Smartdc::Api::Machines.new(request, id)
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
@@ -1,88 +1,78 @@
1
- require 'hashie/mash'
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
- @url = options['url']
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, params={})
22
- request(:get, path, params)
11
+ def get(path, query={})
12
+ request(:get, path, query, {})
23
13
  end
24
14
 
25
- def post(path, params={})
26
- request(:post, path, params)
15
+ def post(path, raw={})
16
+ request(:post, path, {}, raw)
27
17
  end
28
18
 
29
- def put(path, params={})
30
- request(:put, path, params)
19
+ def put(path, raw={})
20
+ request(:put, path, {}, raw)
31
21
  end
32
22
 
33
- def delete(path, params={})
34
- request(:delete, path, params)
23
+ def del(path, query={})
24
+ request(:delete, path, query, {})
35
25
  end
36
26
 
37
- private
38
- def request(method, path, params={})
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
- request.url path, params
31
+ req.url path, query
43
32
  when :post, :put
44
- request.path = path
45
- request.body = MultiJson.encode(params) unless params.empty?
33
+ req.path = path
34
+ req.body = raw.to_json unless raw.empty?
46
35
  when :delete
47
- request.url path
48
- request.headers = {'content-length'=>'0'}
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
- def connection
55
- case format
56
- when 'mash', nil
57
- middleware = 3
58
- when 'hash'
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 => url,
63
+ :url => 'https://' + @options[:hostname],
68
64
  :ssl => {:verify => false},
69
65
  :headers => {
70
- 'authorization' => basic_auth(username, password),
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.use Faraday::Request::JSON
77
- builder.use Smartdc::Response::Mashify if middleware > 2
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
@@ -1,7 +1,7 @@
1
1
  require 'faraday'
2
2
 
3
3
  module Smartdc
4
- module Response
4
+ class Response
5
5
  class RaiseError < Faraday::Response::Middleware
6
6
  def on_complete(env)
7
7
  case env[:status]
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.4.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-03-08"
13
- s.description = "smartdc is SmartDataCenter Public API."
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-addmachinemetadata", "sdc-addmachinetag", "sdc-createinstrumentation", "sdc-createkey", "sdc-createmachine", "sdc-createmachinesnapshot", "sdc-deleteinstrumentation", "sdc-deletekey", "sdc-deletemachine", "sdc-deletemachinemetadata", "sdc-deletemachinesnapshot", "sdc-deletemachinetag", "sdc-describeanalytics", "sdc-getdatacenter", "sdc-getdataset", "sdc-getinstrumentation", "sdc-getkey", "sdc-getmachine", "sdc-getmachinemetadata", "sdc-getmachinesnapshot", "sdc-getmachinetag", "sdc-getpackage", "sdc-listdatacenters", "sdc-listdatasets", "sdc-listinstrumentations", "sdc-listkeys", "sdc-listmachines", "sdc-listmachinesnapshots", "sdc-listmachinetags", "sdc-listpackages", "sdc-rebootmachine", "sdc-resizemachine", "sdc-setup", "sdc-startmachine", "sdc-startmachinefromsnapshot", "sdc-stopmachine"]
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-addmachinemetadata",
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/instrumentations.rb",
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/mashify.rb",
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/smartdc/api/analytics_spec.rb",
85
- "spec/smartdc/api/datacenters_spec.rb",
86
- "spec/smartdc/api/datasets_spec.rb",
87
- "spec/smartdc/api/keys_spec.rb",
88
- "spec/smartdc/api/machine/metadata_spec.rb",
89
- "spec/smartdc/api/machine/snapshots_spec.rb",
90
- "spec/smartdc/api/machine/tags_spec.rb",
91
- "spec/smartdc/api/machines_spec.rb",
92
- "spec/smartdc/api/packages_spec.rb",
93
- "spec/smartdc/client_spec.rb",
94
- "spec/smartdc/request_spec.rb",
95
- "spec/smartdc_spec.rb",
96
- "spec/spec_helper.rb"
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.15"
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.7.6"])
109
- s.add_runtime_dependency(%q<hashie>, ["~> 1.2.0"])
110
- s.add_runtime_dependency(%q<multi_json>, ["~> 1.1.0"])
111
- s.add_runtime_dependency(%q<multipart-post>, ["~> 1.1.4"])
112
- s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
113
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
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.7.6"])
119
- s.add_dependency(%q<hashie>, ["~> 1.2.0"])
120
- s.add_dependency(%q<multi_json>, ["~> 1.1.0"])
121
- s.add_dependency(%q<multipart-post>, ["~> 1.1.4"])
122
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
123
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
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.7.6"])
130
- s.add_dependency(%q<hashie>, ["~> 1.2.0"])
131
- s.add_dependency(%q<multi_json>, ["~> 1.1.0"])
132
- s.add_dependency(%q<multipart-post>, ["~> 1.1.4"])
133
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
134
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
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