civo 0.3.9 → 0.3.10

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: f7959d538d6c620203b5d24ca04e9626934f05f7
4
- data.tar.gz: bc0589d253a03b3e609410b62146a82305e3e787
3
+ metadata.gz: 19ced1bccbd835ca854ee20d14a94b568bed1c8f
4
+ data.tar.gz: e1c7660dd09fe8ef1cc8e9e55eacbf2c5cf75fba
5
5
  SHA512:
6
- metadata.gz: d0055328d8331f5e425ce561375e04972aa2b5c6c8bd445cb6165ba91709768ecdd907199f7f869799e70ea52af6b5b830036674d4d4c47f585bc6e6c88bd432
7
- data.tar.gz: 8e46a9fdc839118c388492f756bbd04a3da3ce34d39dd0e102cfae515074f16234497b824dbbebe85ee49afddef218c2be295796d216b8b3eeefd94788c5471e
6
+ metadata.gz: 05911c35a133742b2bec60596d33be2e79f15a927f5a9a399ba25dee505b35dc4b29e6b58158b9d560610d92e8ee291a515d32c51ee83d14f9d11f595ca56e2d
7
+ data.tar.gz: f063722bbc6b59859adf7418ff66b95f75d44486bba87e3beafbd2359aaa616af8d0ca246aa6831bea38658539f7b1744a2557a60a875e10c71994b215a8f05d
data/Rakefile CHANGED
@@ -17,6 +17,8 @@ end
17
17
  Bundler::GemHelper.install_tasks
18
18
 
19
19
  task :console do
20
+ ENV["CIVO_URL"] ||= "https://api.civo.com"
21
+
20
22
  require 'irb'
21
23
  require 'irb/completion'
22
24
  ENGINE_ROOT = File.expand_path('..', __FILE__)
@@ -29,6 +31,7 @@ task :console do
29
31
  require 'toml'
30
32
  require 'flexirest'
31
33
  require_relative "#{ENGINE_ROOT}/lib/civo.rb"
34
+
32
35
  ARGV.clear
33
36
  IRB.start
34
37
  end
@@ -10,7 +10,6 @@ module Civo
10
10
  post :soft_reboot, "/v1/instances/:id/soft_reboots", requires: [:id]
11
11
  put :stop, "/v1/instances/:id/stop", requires: [:id]
12
12
  put :start, "/v1/instances/:id/start", requires: [:id]
13
- post :reboot, "/v1/instances/:id/reboots", requires: [:id]
14
13
  put :upgrade, "/v1/instances/:id", requires: [:size, :id]
15
14
 
16
15
  def nice_ip_addresses
@@ -0,0 +1,32 @@
1
+ module Civo
2
+ class Snapshot < Base
3
+ get :all, "/v1/snapshots", fake: [{
4
+ "name": "my-instance-snapshot",
5
+ "instance_id": "44aab548-61ca-11e5-860e-5cf9389be614",
6
+ "safe": true,
7
+ "requested_at": "2015-09-20T19:31:36+00:00",
8
+ "completed_at": nil,
9
+ "status": "new"
10
+ }]
11
+ get :find, "/v1/snapshots/:name", fake: {
12
+ "name": "my-instance-snapshot",
13
+ "instance_id": "44aab548-61ca-11e5-860e-5cf9389be614",
14
+ "safe": true,
15
+ "requested_at": "2015-09-20T19:31:36+00:00",
16
+ "completed_at": nil,
17
+ "status": "new"
18
+ }
19
+ put :create, "/v1/snapshots/:name", required: [:instance_id], fake: {
20
+ "name": "my-instance-snapshot",
21
+ "instance_id": "44aab548-61ca-11e5-860e-5cf9389be614",
22
+ "safe": true,
23
+ "requested_at": "2015-09-20T19:31:36+00:00",
24
+ "completed_at": nil,
25
+ "status": "new"
26
+ }
27
+ delete :remove, "/v1/templates/:name", fake: {
28
+ "name": "my-instance-snapshot",
29
+ "result": "ok"
30
+ }
31
+ end
32
+ end
@@ -14,6 +14,7 @@ module Civo
14
14
  autoload :Size, "#{ENGINE_ROOT}/app/models/civo/size.rb"
15
15
  autoload :Region, "#{ENGINE_ROOT}/app/models/civo/region"
16
16
  autoload :Template, "#{ENGINE_ROOT}/app/models/civo/template"
17
+ autoload :Snapshot, "#{ENGINE_ROOT}/app/models/civo/snapshot"
17
18
  autoload :Instance, "#{ENGINE_ROOT}/app/models/civo/instance"
18
19
  autoload :Ip, "#{ENGINE_ROOT}/app/models/civo/ip"
19
20
  end
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "0.3.9"
2
+ VERSION = "0.3.10"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: civo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-27 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flexirest
@@ -68,6 +68,7 @@ files:
68
68
  - app/models/civo/quota.rb
69
69
  - app/models/civo/region.rb
70
70
  - app/models/civo/size.rb
71
+ - app/models/civo/snapshot.rb
71
72
  - app/models/civo/ssh_key.rb
72
73
  - app/models/civo/template.rb
73
74
  - config/routes.rb