civo 1.5.15 → 1.5.17

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
  SHA256:
3
- metadata.gz: c78f7c9c250563da4ebaf3c3493568ce08da223d3a9b030c8de1e281ed2ef94e
4
- data.tar.gz: 2f0652e101a62f349a5ef70e9808d30d8767d1029eda51b3d693f7ce556d095f
3
+ metadata.gz: fb2a882e5dc253db31bb08188a7f87a32eb210ab007b4549061898b71f6fe9e3
4
+ data.tar.gz: 92b5060ccfef28b6792f8b85552fdf92c9cab1c22c389db467c9cdd3f8f643ac
5
5
  SHA512:
6
- metadata.gz: 2b52cb3879c74adb2e3704fa028b8ca2db50ffa85f9f85d91e4b9ae1260cc93285ffbf67e904557ff1b8ba77f9706197601fa6312a76ca2e6b805de022aa82ea
7
- data.tar.gz: 4eeadbeee265fda5662a41961be7be7110aec97cda10dd87d664cef2db408ddebee2cc2f8591c6f20ef4583d1651f33f2fbf68a724e2c3591d866286057347e9
6
+ metadata.gz: 1c297903d4edc0f6daea6078353331131bdfc9b53e6e6b707faeaaba84dd4a55fe04f6af71825a17d43392c011bc22c106f3f0f4979a5a45901a5b8b8b845992
7
+ data.tar.gz: 55e1287490515b892aaf5c4eb56452e7b7c5fa9c18c586602e4f1d36c2c462730701fbc9b3b16fd2239e0361746bc31d9c3320216e5381f73c2c6b166cd46c3f
@@ -1,11 +1,11 @@
1
1
  module Civo
2
2
  class Database < Base
3
- get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases", requires: [:region], fake: :databases
4
- post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases", requires: [:name, :size, :region, :software, :network_id], fake: :create_database
5
- get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", requires: [:region], fake: :get_database
6
- patch :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", requires: [:region], fake: :update_database
7
- delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", requires: [:id, :region], fake: :delete_database
8
- post :restore, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/restore", requires: [:region, :snapshot_id], fake: :restore_database
3
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases", fake: :databases
4
+ post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases", requires: [:name, :size, :software, :network_id], fake: :create_database
5
+ get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", requires: [:id], fake: :get_database
6
+ patch :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", fake: :update_database
7
+ delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", requires: [:id], fake: :delete_database
8
+ post :restore, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/restore", requires: [:snapshot_id], fake: :restore_database
9
9
 
10
10
  def to_partial_path
11
11
  "civo/database"
@@ -14,51 +14,73 @@ module Civo
14
14
  def databases
15
15
  [
16
16
  {
17
- "id": "5cc0696d-6663-48a9-8123-87adb997138c",
18
- "name": "Mysite-DB",
17
+ "id": "dd13bc84-1224-476e-8c0c-f15630ec9523",
18
+ "name": "dancing-in-the-moonlight-2",
19
+ "replicas": 1,
20
+ "size": "g3.db.xsmall",
21
+ "software": "MySQL",
22
+ "software_version": "8.0",
23
+ "public_ip": "",
24
+ "network_id": "b064d568-5869-427c-827a-77d48cde6a2e",
25
+ "firewall_id": "0c681c22-c449-43b4-a7dc-f3644a8d21f2",
26
+ "status": "Pending",
27
+ "snapshots": []
28
+ },
29
+ {
30
+ "id": "9c59d8dd-f514-4f6a-86bf-6bef835ac84f",
31
+ "name": "dancing-in-the-moonlight",
32
+ "replicas": 1,
33
+ "size": "g3.db.xsmall",
34
+ "software": "MySQL",
35
+ "software_version": "8.0",
36
+ "public_ip": "",
37
+ "network_id": "b064d568-5869-427c-827a-77d48cde6a2e",
38
+ "firewall_id": "0c681c22-c449-43b4-a7dc-f3644a8d21f2",
39
+ "status": "Pending",
40
+ "snapshots": []
41
+ },
42
+ {
43
+ "id": "1de75ca8-46d3-4196-b31f-58698c0c1708",
44
+ "name": "to-be-updated-new",
19
45
  "replicas": 2,
20
- "size": 10,
21
- "software": "PostgreSQL",
22
- "software_version": "10.1",
23
- "public_ip": "84.127.44.100",
24
- "network_id": "5be0646d-6e63-4aa9-8123-87adb447138c",
25
- "snapshots": [
26
- {
27
- "id": "5cc0696d-6663-48a9-8123-87adb997138c",
28
- "timestamp": "2021-12-04T10:00:28Z"
29
- }
30
- ]
46
+ "size": "g3.db.xsmall",
47
+ "software": "MySQL",
48
+ "software_version": "8.0",
49
+ "public_ip": "",
50
+ "network_id": "b064d568-5869-427c-827a-77d48cde6a2e",
51
+ "firewall_id": "dc468f86-c96d-4f04-ac42-508885b1115f",
52
+ "status": "Pending",
53
+ "snapshots": []
31
54
  }
32
55
  ].to_json
33
56
  end
34
57
 
35
58
  def get_database
36
59
  {
37
- "id": "5cc0696d-6663-48a9-8123-87adb997138c",
38
- "name": "Mysite-DB",
39
- "replicas": 2,
40
- "size": 10,
41
- "software": "PostgreSQL",
42
- "software_version": "10.1",
43
- "public_ip": "84.127.44.100",
44
- "network_id": "5be0646d-6e63-4aa9-8123-87adb447138c",
45
- "snapshots": [
46
- {
47
- "id": "5cc0696d-6663-48a9-8123-87adb997138c",
48
- "timestamp": "2021-12-04T10:00:28Z"
49
- }
50
- ]
60
+ "id": "0e07ce5f-179b-44e0-83cf-47ae9ca7b4ad",
61
+ "name": "my-user-friendly-database-name",
62
+ "replicas": 1,
63
+ "size": "g3.db.xsmall",
64
+ "software": "MySQL",
65
+ "software_version": "8.0",
66
+ "public_ip": "10.90.100.30",
67
+ "port": 3306,
68
+ "username": "root",
69
+ "password": "h03K5gID9S39nZZd",
70
+ "network_id": "b064d568-5869-427c-827a-77d48cde6a2e",
71
+ "firewall_id": "0c681c22-c449-43b4-a7dc-f3644a8d21f2",
72
+ "status": "Ready"
51
73
  }.to_json
52
74
  end
53
75
 
54
76
  def create_database
55
77
  {
56
- "id": "5cc0696d-6663-48a9-8123-87adb997138c",
78
+ "id": "0e07ce5f-179b-44e0-83cf-47ae9ca7b4ad",
57
79
  "name": "Mysite-DB",
58
80
  "replicas": 2,
59
- "size": 10,
60
- "software": "PostgreSQL",
61
- "software_version": "10.1",
81
+ "size": "g3.db.xsmall",
82
+ "software": "MySQL",
83
+ "software_version": "8.0",
62
84
  "public_ip": "84.127.44.100",
63
85
  "network_id": "5be0646d-6e63-4aa9-8123-87adb447138c",
64
86
  "snapshots": []
data/lib/civo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "1.5.15"
2
+ VERSION = "1.5.17"
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: 1.5.15
4
+ version: 1.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-13 00:00:00.000000000 Z
11
+ date: 2022-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flexirest