civo 1.4.0 → 1.4.4

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: c47eeadbf3d7774db11c620312cc0dceec2e5184d3047f02620d3619d38d1506
4
- data.tar.gz: d2ec61e1caaff025801a1a2f9b46110ea32b6f8f73b08c27b5b073db231c310b
3
+ metadata.gz: 6adb91cf79b368d111f7eb49ddce70a5edc0ed1ca200e846081712bb8f9408a1
4
+ data.tar.gz: df6f6ce2bca1bf8df04c7e1fdc88caf152f830312d7aa53b77bea1db68f01af1
5
5
  SHA512:
6
- metadata.gz: e61c994121f1ddd70c15897a1a24bf4e13aae9b8990dc7c41a7fabeebfce911c543444464a9fe685694e2f51dcaaadcf28791776fdfd1f64c082e69737ac1d38
7
- data.tar.gz: 13b77f7315acd318324829eed1982af492ff44ca67068c32ef88e1fe4fd926e8fec5ec4988b8f97c511f7990002a95310abc90c59e899304cd5118ca69516a6d
6
+ metadata.gz: f775f4c8efea23ccbb97ffb195b3533845d2a3f792fa8e9e7d8bcd92f53f2a77e4c5694747132ceec1669a60f51ea09872d343be2cc0ffa3587b65560553a9da
7
+ data.tar.gz: 0f594bd863728a84b3bdbfc91214b2fc7fc667d7d7bb947921e7510e593172b30ebf80147ce55642203d4d76bfbcf85730c37d1f0c7972c81b636d679dfb5d64
@@ -0,0 +1,17 @@
1
+ module Civo
2
+ class Database < Base
3
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases"
4
+ post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases", requires: [:name, :size, :region]
5
+ get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id"
6
+ put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id"
7
+ delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id", requires: [:id], send_delete_body: true
8
+ put :upgrade, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/resize", requires: [:size, :id]
9
+ put :restore, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/restore", requires: [:snapshot_id]
10
+ get :snapshots, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/snapshots"
11
+ put :tags, "/v#{ENV["CIVO_API_VERSION"] || "2"}/databases/:id/tags"
12
+
13
+ def to_partial_path
14
+ "civo/database"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,10 @@
1
+ module Civo
2
+ class DiskImage < Base
3
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/disk_images"
4
+ get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/disk_images/:id"
5
+
6
+ def to_partial_path
7
+ "civo/disk_image"
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,12 @@
1
+ # WARNING!
2
+ # This module is for an in-development feature of Civo and isn't intended to
3
+ # be used by the general public yet. Public accounts won't even have the
4
+ # feature flag enabled. Do not bother trying to use this class.
5
+ module Civo
6
+ class Organisation < Base
7
+ get :current, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation"
8
+ post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation", requires: [:name]
9
+ get :accounts, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation/accounts"
10
+ post :add_account, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation/accounts", requires: [:account_id]
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ # WARNING!
2
+ # This module is for an in-development feature of Civo and isn't intended to
3
+ # be used by the general public yet. Public accounts won't even have the
4
+ # feature flag enabled. Do not bother trying to use this class.
5
+ module Civo
6
+ class Permission < Base
7
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/permissions"
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # WARNING!
2
+ # This module is for an in-development feature of Civo and isn't intended to
3
+ # be used by the general public yet. Public accounts won't even have the
4
+ # feature flag enabled. Do not bother trying to use this class.
5
+ module Civo
6
+ class Role < Base
7
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/roles"
8
+ post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/roles", requires: [:name, :permissions]
9
+ delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/organisation/roles/:id"
10
+ end
11
+ end
@@ -1,3 +1,7 @@
1
+ # WARNING!
2
+ # This module is for an in-development feature of Civo and isn't intended to
3
+ # be used by the general public yet. Public accounts won't even have the
4
+ # feature flag enabled. Do not bother trying to use this class.
1
5
  module Civo
2
6
  class Team < Base
3
7
  get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams"
@@ -5,15 +9,9 @@ module Civo
5
9
  put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}
6
10
  delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}, send_delete_body: true
7
11
 
8
- get :my_memberships, "/v#{ENV["CIVO_API_VERSION"] || "2"}/team_memberships"
9
- post :member_invite, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/memberships/:user_id", requires: %i{id user_id email_address}
10
- put :member_status, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/memberships/:user_id", requires: %i{id user_id status}
11
- get :members, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/memberships", requires: %i{id}
12
- post :permissions, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/memberships", requires: %i{email_address permissions}
13
- delete :member_remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/memberships/:user_id", requires: %i{id user_id}, send_delete_body: true
14
-
15
- def to_partial_path
16
- "civo/team"
17
- end
12
+ get :members "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members"
13
+ post :add_member "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members", requires: [:user_id]
14
+ post :update_member "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members/:member_id"
15
+ delete :remove_member "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members/:member_id"
18
16
  end
19
17
  end
data/lib/civo.rb CHANGED
@@ -14,6 +14,8 @@ require_relative "../app/models/civo/action"
14
14
  require_relative "../app/models/civo/audit_log"
15
15
  require_relative "../app/models/civo/blueprint"
16
16
  require_relative "../app/models/civo/charge"
17
+ require_relative "../app/models/civo/database"
18
+ require_relative "../app/models/civo/disk_image"
17
19
  require_relative "../app/models/civo/dns_domain"
18
20
  require_relative "../app/models/civo/dns_record"
19
21
  require_relative "../app/models/civo/firewall"
data/lib/civo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.4"
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.4.0
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Jeffries
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-17 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flexirest
@@ -81,6 +81,8 @@ files:
81
81
  - app/models/civo/base.rb
82
82
  - app/models/civo/blueprint.rb
83
83
  - app/models/civo/charge.rb
84
+ - app/models/civo/database.rb
85
+ - app/models/civo/disk_image.rb
84
86
  - app/models/civo/dns_domain.rb
85
87
  - app/models/civo/dns_record.rb
86
88
  - app/models/civo/firewall.rb
@@ -90,10 +92,12 @@ files:
90
92
  - app/models/civo/kpi.rb
91
93
  - app/models/civo/kubernetes.rb
92
94
  - app/models/civo/load_balancer.rb
93
- - app/models/civo/namespace.rb
94
95
  - app/models/civo/network.rb
96
+ - app/models/civo/organisation.rb
97
+ - app/models/civo/permission.rb
95
98
  - app/models/civo/quota.rb
96
99
  - app/models/civo/region.rb
100
+ - app/models/civo/role.rb
97
101
  - app/models/civo/size.rb
98
102
  - app/models/civo/snapshot.rb
99
103
  - app/models/civo/ssh_key.rb
@@ -1,20 +0,0 @@
1
- module Civo
2
- class Namespace < Base
3
- if ENV["CIVO_API_VERSION"] == "2"
4
- get :all, "/v2/namespaces"
5
- post :create, "/v2/namespaces", required: [:label]
6
- put :update, "/v2/namespaces/:id"
7
- delete :remove, "/v2/namespaces/:id", required: [:id], send_delete_body: true
8
- put :pseudo_migrate, "/v2/namespace-pseudo-migrate"
9
- else
10
- get :all, "/v1/namespaces"
11
- post :create, "/v1/namespaces", required: [:name]
12
- put :update, "/v1/namespaces/:name", required: [:name]
13
- delete :remove, "/v1/namespaces/:name", required: [:name], send_delete_body: true
14
- end
15
-
16
- def to_partial_path
17
- "civo/namespace"
18
- end
19
- end
20
- end