civo 1.1.17 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/civo/account.rb +9 -9
- data/app/models/civo/action.rb +2 -2
- data/app/models/civo/audit_log.rb +2 -2
- data/app/models/civo/blueprint.rb +1 -3
- data/app/models/civo/charge.rb +1 -1
- data/app/models/civo/firewall.rb +4 -4
- data/app/models/civo/firewall_rule.rb +3 -3
- data/app/models/civo/instance.rb +19 -19
- data/app/models/civo/ip.rb +3 -3
- data/app/models/civo/kpi.rb +1 -1
- data/app/models/civo/kubernetes.rb +13 -0
- data/app/models/civo/quota.rb +4 -4
- data/app/models/civo/region.rb +1 -1
- data/app/models/civo/size.rb +2 -2
- data/app/models/civo/snapshot.rb +5 -5
- data/app/models/civo/ssh_key.rb +4 -4
- data/app/models/civo/team.rb +10 -10
- data/app/models/civo/template.rb +5 -5
- data/app/models/civo/user.rb +9 -9
- data/app/models/civo/webhook.rb +6 -6
- data/lib/civo/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz: '
|
3
|
+
metadata.gz: bef8ec9d213ec48db5dccb9946b1da65efb64546d92e902e8bceafb32b6eed33
|
4
|
+
data.tar.gz: '08182835442143372944481999a436af00c56b782444c57688d3a04ebbeee290'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e65463ea2da65035ce2c1399e7aae5cd3d4f7f16bc01f4b1866ff2426e0211ce61137005127cb8e1d645f44056fbfd07ad13a6389ecd9aa14bc753cdec487b9
|
7
|
+
data.tar.gz: db2f3feed22d8e21170dbf20fd3798f906f6cf7677d1603da14e3af9fe7d953da93ca229de1847f8471958b8539a92b65131de1c992430f70185e1a0dbe8d3fc
|
data/app/models/civo/account.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
module Civo
|
2
2
|
class Account < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
get :find, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
get :stats, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
7
|
-
put :confirm, "/v#{ENV["CIVO_API_VERSION"] || "
|
8
|
-
put :reset, "/v#{ENV["CIVO_API_VERSION"] || "
|
9
|
-
put :save, "/v#{ENV["CIVO_API_VERSION"] || "
|
10
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
11
|
-
get :active_paid_services, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts"
|
4
|
+
get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts/:id"
|
5
|
+
get :stats, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts/stats", requires: [:account_id]
|
6
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts", requires: [:name]
|
7
|
+
put :confirm, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts/confirm/:token"
|
8
|
+
put :reset, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts/:id", requires: [:id]
|
9
|
+
put :save, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts/:id"
|
10
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts/:id", requires: [:id], send_delete_body: true
|
11
|
+
get :active_paid_services, "/v#{ENV["CIVO_API_VERSION"] || "2"}/accounts/:id/active_paid_services", requires: [:id]
|
12
12
|
|
13
13
|
def to_partial_path
|
14
14
|
"civo/account"
|
data/app/models/civo/action.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Civo
|
2
2
|
class Action < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/actions"
|
4
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/actions"
|
5
5
|
|
6
6
|
def to_partial_path
|
7
7
|
"civo/action"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Civo
|
2
2
|
class AuditLog < Base
|
3
|
-
get :global, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
get :instance, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :global, "/v#{ENV["CIVO_API_VERSION"] || "2"}/auditlogs"
|
4
|
+
get :instance, "/v#{ENV["CIVO_API_VERSION"] || "2"}/auditlogs/:id"
|
5
5
|
|
6
6
|
def to_partial_path
|
7
7
|
"civo/audit_log"
|
@@ -6,9 +6,7 @@ module Civo
|
|
6
6
|
put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/blueprints/:id", requires: [:id]
|
7
7
|
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/blueprints/:id", requires: [:id], send_delete_body: true
|
8
8
|
put :start, "/v#{ENV["CIVO_API_VERSION"] || "2"}/blueprints/:id/start", requires: [:id]
|
9
|
-
put :
|
10
|
-
put :complete, "/v#{ENV["CIVO_API_VERSION"] || "2"}/blueprints/:id/complete", requires: [:id, :openstack_volume_id]
|
11
|
-
put :fail, "/v#{ENV["CIVO_API_VERSION"] || "2"}/blueprints/:id/fail", requires: [:id, :openstack_volume_id]
|
9
|
+
put :stop, "/v#{ENV["CIVO_API_VERSION"] || "2"}/blueprints/:id/stop", requires: [:id]
|
12
10
|
|
13
11
|
def to_partial_path
|
14
12
|
"civo/blueprint"
|
data/app/models/civo/charge.rb
CHANGED
data/app/models/civo/firewall.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module Civo
|
2
2
|
class Firewall < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/firewalls"
|
4
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/firewalls", required: [:name]
|
5
5
|
if ENV["CIVO_API_VERSION"] == "2"
|
6
6
|
put :update, "/v2/firewalls/:id"
|
7
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
7
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/firewalls/:id", required: [:id], send_delete_body: true
|
8
8
|
else
|
9
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
9
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/firewalls/:name", required: [:name], send_delete_body: true
|
10
10
|
end
|
11
11
|
|
12
12
|
def to_partial_path
|
@@ -6,10 +6,10 @@ module Civo
|
|
6
6
|
:cidr, :direction]
|
7
7
|
delete :remove, "/v2/firewalls/:firewall_id/rules/:id", required: [:firewall_id, :id], send_delete_body: true
|
8
8
|
else
|
9
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
10
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
9
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/firewalls/:name/rules", required: [:name]
|
10
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/firewalls/:name/rules", required: [:name, :protocol, :start_port,
|
11
11
|
:cidr, :direction]
|
12
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
12
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/firewalls/:name/rules/:id", required: [:name, :id], send_delete_body: true
|
13
13
|
end
|
14
14
|
|
15
15
|
def to_partial_path
|
data/app/models/civo/instance.rb
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
module Civo
|
2
2
|
class Instance < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
get :high_cpu, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
get :find, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances"
|
4
|
+
get :high_cpu, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/high_cpu"
|
5
|
+
get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id", requires: [:id]
|
6
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances", requires: [:hostname, :size, :region],
|
7
7
|
defaults: {public_ip: true, initial_user: "civo"}
|
8
8
|
put :tags, "/v2/instances/:id/tags"
|
9
9
|
put :update, "/v2/instances/:id"
|
10
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
11
|
-
post :reboot, "/v#{ENV["CIVO_API_VERSION"] || "
|
12
|
-
post :hard_reboot, "/v#{ENV["CIVO_API_VERSION"] || "
|
13
|
-
post :soft_reboot, "/v#{ENV["CIVO_API_VERSION"] || "
|
14
|
-
get :console, "/v#{ENV["CIVO_API_VERSION"] || "
|
15
|
-
put :rebuild, "/v#{ENV["CIVO_API_VERSION"] || "
|
16
|
-
put :stop, "/v#{ENV["CIVO_API_VERSION"] || "
|
17
|
-
put :start, "/v#{ENV["CIVO_API_VERSION"] || "
|
18
|
-
put :upgrade, "/v#{ENV["CIVO_API_VERSION"] || "
|
19
|
-
put :restore, "/v#{ENV["CIVO_API_VERSION"] || "
|
20
|
-
put :move_ip, "/v#{ENV["CIVO_API_VERSION"] || "
|
21
|
-
put :rescue, "/v#{ENV["CIVO_API_VERSION"] || "
|
22
|
-
put :unrescue, "/v#{ENV["CIVO_API_VERSION"] || "
|
10
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id", requires: [:id], send_delete_body: true
|
11
|
+
post :reboot, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/reboots", requires: [:id]
|
12
|
+
post :hard_reboot, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/hard_reboots", requires: [:id]
|
13
|
+
post :soft_reboot, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/soft_reboots", requires: [:id]
|
14
|
+
get :console, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/console", requires: [:id]
|
15
|
+
put :rebuild, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/rebuild", requires: [:id]
|
16
|
+
put :stop, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/stop", requires: [:id]
|
17
|
+
put :start, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/start", requires: [:id]
|
18
|
+
put :upgrade, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/resize", requires: [:size, :id]
|
19
|
+
put :restore, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/restore", requires: [:snapshot, :id]
|
20
|
+
put :move_ip, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/ip/:ip", requires: [:ip, :id]
|
21
|
+
put :rescue, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/rescue", requires: [:id]
|
22
|
+
put :unrescue, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/unrescue", requires: [:id]
|
23
23
|
if ENV["CIVO_API_VERSION"] == "2"
|
24
|
-
put :firewall, "/v#{ENV["CIVO_API_VERSION"] || "
|
24
|
+
put :firewall, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/firewall", requires: [:firewall_id, :id]
|
25
25
|
else
|
26
|
-
put :firewall, "/v#{ENV["CIVO_API_VERSION"] || "
|
26
|
+
put :firewall, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/firewall", requires: [:name, :id]
|
27
27
|
end
|
28
28
|
|
29
29
|
def nice_ip_addresses
|
data/app/models/civo/ip.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Civo
|
2
2
|
class Ip < Base
|
3
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
put :connect, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/ip", requires: [:id], defaults: {public: true}
|
4
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/ip/:ip_address", requires: [:id, :ip_address], send_delete_body: true
|
5
|
+
put :connect, "/v#{ENV["CIVO_API_VERSION"] || "2"}/instances/:id/ip/:ip_address", requires: [:id, :ip_address, :private_ip]
|
6
6
|
|
7
7
|
def to_partial_path
|
8
8
|
"civo/ip"
|
data/app/models/civo/kpi.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
module Civo
|
2
|
+
class Kubernetes < Base
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/k8sclusters"
|
4
|
+
get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/k8sclusters/:id", requires: [:id]
|
5
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/k8sclusters", requires: [:name]
|
6
|
+
put :update, "/v2/k8sclusters/:id"
|
7
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/k8sclusters/:id", requires: [:id], send_delete_body: true
|
8
|
+
|
9
|
+
def to_partial_path
|
10
|
+
"civo/kubernetes"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/app/models/civo/quota.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Civo
|
2
2
|
class Quota < Base
|
3
|
-
get :current, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
put :update, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :current, "/v#{ENV["CIVO_API_VERSION"] || "2"}/quota"
|
4
|
+
put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/quota/:name", requires: [:name]
|
5
5
|
if ENV["CIVO_API_VERSION"] == "2"
|
6
6
|
get :all, "/v2/quotas"
|
7
|
-
get :find, "/v#{ENV["CIVO_API_VERSION"] || "
|
8
|
-
put :save, "/v#{ENV["CIVO_API_VERSION"] || "
|
7
|
+
get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/quota/:id", requires: [:id]
|
8
|
+
put :save, "/v#{ENV["CIVO_API_VERSION"] || "2"}/quota/:id", requires: [:id]
|
9
9
|
end
|
10
10
|
|
11
11
|
def to_partial_path
|
data/app/models/civo/region.rb
CHANGED
data/app/models/civo/size.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Civo
|
2
2
|
class Size < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
put :reset, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/sizes"
|
4
|
+
put :reset, "/v#{ENV["CIVO_API_VERSION"] || "2"}/sizes"
|
5
5
|
|
6
6
|
def to_partial_path
|
7
7
|
"civo/size"
|
data/app/models/civo/snapshot.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
module Civo
|
2
2
|
class Snapshot < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
get :find, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
put :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
delete :remove_old, "/v#{ENV["CIVO_API_VERSION"] || "
|
7
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/snapshots"
|
4
|
+
get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/snapshots/:name", required: [:name]
|
5
|
+
put :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/snapshots/:name", required: [:name, :instance_id]
|
6
|
+
delete :remove_old, "/v#{ENV["CIVO_API_VERSION"] || "2"}/snapshots/:name", required: [:name], send_delete_body: true
|
7
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/snapshots/:id", required: [:id], send_delete_body: true
|
8
8
|
|
9
9
|
def to_partial_path
|
10
10
|
"civo/snapshot"
|
data/app/models/civo/ssh_key.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Civo
|
2
2
|
class SshKey < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
put :update, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/sshkeys"
|
4
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/sshkeys", requires: [:name, :public_key]
|
5
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/sshkeys/:id", requires: [:id], send_delete_body: true
|
6
|
+
put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/sshkeys/:id", requires: [:id, :name]
|
7
7
|
|
8
8
|
def to_partial_path
|
9
9
|
"civo/ssh_key"
|
data/app/models/civo/team.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
module Civo
|
2
2
|
class Team < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
put :update, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams"
|
4
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams"
|
5
|
+
put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}
|
6
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}, send_delete_body: true
|
7
7
|
|
8
|
-
get :my_memberships, "/v#{ENV["CIVO_API_VERSION"] || "
|
9
|
-
post :member_invite, "/v#{ENV["CIVO_API_VERSION"] || "
|
10
|
-
put :member_status, "/v#{ENV["CIVO_API_VERSION"] || "
|
11
|
-
get :members, "/v#{ENV["CIVO_API_VERSION"] || "
|
12
|
-
post :permissions, "/v#{ENV["CIVO_API_VERSION"] || "
|
13
|
-
delete :member_remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
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
14
|
|
15
15
|
def to_partial_path
|
16
16
|
"civo/team"
|
data/app/models/civo/template.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
module Civo
|
2
2
|
class Template < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
get :details, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
put :save, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
7
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/templates"
|
4
|
+
get :details, "/v#{ENV["CIVO_API_VERSION"] || "2"}/templates/:id"
|
5
|
+
put :save, "/v#{ENV["CIVO_API_VERSION"] || "2"}/templates/:id"
|
6
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/templates", required: [:name, :image_id]
|
7
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/templates/:id", send_delete_body: true
|
8
8
|
end
|
9
9
|
|
10
10
|
def to_partial_path
|
data/app/models/civo/user.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
module Civo
|
2
2
|
class User < Base
|
3
|
-
get :ping, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
put :confirm, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
put :password, "/v#{ENV["CIVO_API_VERSION"] || "
|
7
|
-
post :token, "/v#{ENV["CIVO_API_VERSION"] || "
|
8
|
-
post :login, "/v#{ENV["CIVO_API_VERSION"] || "
|
9
|
-
put :flags, "/v#{ENV["CIVO_API_VERSION"] || "
|
10
|
-
put :save, "/v#{ENV["CIVO_API_VERSION"] || "
|
11
|
-
get :find, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :ping, "/v#{ENV["CIVO_API_VERSION"] || "2"}/ping"
|
4
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users", required: %i{first_name last_name email_address}
|
5
|
+
put :confirm, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/confirm/:token"
|
6
|
+
put :password, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/password/:token"
|
7
|
+
post :token, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/token"
|
8
|
+
post :login, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/login"
|
9
|
+
put :flags, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/:id/flags"
|
10
|
+
put :save, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/:id"
|
11
|
+
get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/:id"
|
12
12
|
if ENV["CIVO_API_VERSION"] == "2"
|
13
13
|
get :all, "/v2/users"
|
14
14
|
get :find_by_token, "/v2/users/token/:token"
|
data/app/models/civo/webhook.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Civo
|
2
2
|
class Webhook < Base
|
3
|
-
get :all, "/v#{ENV["CIVO_API_VERSION"] || "
|
4
|
-
get :events, "/v#{ENV["CIVO_API_VERSION"] || "
|
5
|
-
put :save, "/v#{ENV["CIVO_API_VERSION"] || "
|
6
|
-
post :test, "/v#{ENV["CIVO_API_VERSION"] || "
|
7
|
-
post :create, "/v#{ENV["CIVO_API_VERSION"] || "
|
8
|
-
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "
|
3
|
+
get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/webhooks"
|
4
|
+
get :events, "/v#{ENV["CIVO_API_VERSION"] || "2"}/webhooks/events"
|
5
|
+
put :save, "/v#{ENV["CIVO_API_VERSION"] || "2"}/webhooks/:id"
|
6
|
+
post :test, "/v#{ENV["CIVO_API_VERSION"] || "2"}/webhooks/:id/test"
|
7
|
+
post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/webhooks", required: [:name, :url]
|
8
|
+
delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/webhooks/:id", send_delete_body: true
|
9
9
|
end
|
10
10
|
|
11
11
|
def to_partial_path
|
data/lib/civo/version.rb
CHANGED
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
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Jeffries
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flexirest
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- app/models/civo/instance.rb
|
89
89
|
- app/models/civo/ip.rb
|
90
90
|
- app/models/civo/kpi.rb
|
91
|
+
- app/models/civo/kubernetes.rb
|
91
92
|
- app/models/civo/load_balancer.rb
|
92
93
|
- app/models/civo/network.rb
|
93
94
|
- app/models/civo/quota.rb
|
@@ -128,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
129
|
- !ruby/object:Gem::Version
|
129
130
|
version: '0'
|
130
131
|
requirements: []
|
131
|
-
|
132
|
-
rubygems_version: 2.7.6
|
132
|
+
rubygems_version: 3.0.1
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Civo CLI AND API
|