civo 1.5.0 → 1.5.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: 5e048371f68c4f9bded9d9cd72881f7e490e66e12703ab1a9ad582c0725bf318
4
- data.tar.gz: 7cef0b8f141894eb2cff77c5834829ca928367461e3cf78f014fc1b56ed3ff59
3
+ metadata.gz: 66ade81f651621df55e94e267d6b53056dda03d007a58f32ee3b70febf474989
4
+ data.tar.gz: '085c5c51b3a7e2a70b69cfdf28e86e85a72ce402bcc5e80a39ce892453fdeb9b'
5
5
  SHA512:
6
- metadata.gz: 71e30e3a6ede3798d9658d1769b996d69548c3cde0684cc743494b4d09561d25236143369496fd9deb188f8aa6ad6f7a5ef13d25a43083bacd9dfdd84039d3ed
7
- data.tar.gz: cf3a7c011c319480206b1fd5cdb8635ca92d658ab1eb9f2533f9df1e6498a840452e413510b73aa96cfddfd4c80090842119f79c8a00a5780a6fe5a4045d44d0
6
+ metadata.gz: 5617f6759823718d30b29bf0d0aed6b307edf0269d284b78b2585fa136d5a6d223ae95e7c39f7e665d45e9bbd8121dee38e5469107653a176c2803fda0a96741
7
+ data.tar.gz: 2a23679344be30a3314a0ac008baa023926143ce4f035098473e658551a8dca3980bed65bd5f0409d0d5583e469921a2979a9d262c240f1486b536a7d9fd4030
@@ -6,6 +6,7 @@ module Civo
6
6
  class Role < Base
7
7
  get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/roles"
8
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"
9
+ put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/roles/:id", requires: %i{id}
10
+ delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/roles/:id"
10
11
  end
11
12
  end
@@ -8,10 +8,5 @@ module Civo
8
8
  post :create, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams"
9
9
  put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}
10
10
  delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id", requires: %i{id}
11
-
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
- put :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"
16
11
  end
17
12
  end
@@ -0,0 +1,17 @@
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 TeamMember < Base
7
+ get :all, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members"
8
+ post :add, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members", requires: [:user_id]
9
+ put :update, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members/:member_id"
10
+ delete :remove, "/v#{ENV["CIVO_API_VERSION"] || "2"}/teams/:id/members/:member_id"
11
+ end
12
+ end
13
+
14
+
15
+
16
+
17
+
@@ -9,6 +9,7 @@ module Civo
9
9
  put :flags, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/:id/flags"
10
10
  put :save, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/:id"
11
11
  get :find, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/:id"
12
+ get :everything, "/v#{ENV["CIVO_API_VERSION"] || "2"}/users/:id/everything", has_many: {accounts: Civo::Account, teams: Civo::Team, organisations: Civo::Organisation, roles: Civo::Role, team_members: Civo::TeamMember}
12
13
  if ENV["CIVO_API_VERSION"] == "2"
13
14
  get :all, "/v2/users"
14
15
  get :find_by_token, "/v2/users/token/:token"
data/lib/civo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Civo
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.4"
3
3
  end
data/lib/civo.rb CHANGED
@@ -26,13 +26,16 @@ require_relative "../app/models/civo/ip"
26
26
  require_relative "../app/models/civo/kpi"
27
27
  require_relative "../app/models/civo/load_balancer"
28
28
  require_relative "../app/models/civo/network"
29
+ require_relative "../app/models/civo/organisation"
29
30
  require_relative "../app/models/civo/quota"
30
31
  require_relative "../app/models/civo/region"
32
+ require_relative "../app/models/civo/role"
31
33
  require_relative "../app/models/civo/size"
32
34
  require_relative "../app/models/civo/snapshot"
33
35
  require_relative "../app/models/civo/ssh_key"
34
36
  require_relative "../app/models/civo/system"
35
37
  require_relative "../app/models/civo/team"
38
+ require_relative "../app/models/civo/team_member"
36
39
  require_relative "../app/models/civo/template"
37
40
  require_relative "../app/models/civo/user"
38
41
  require_relative "../app/models/civo/volume"
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.0
4
+ version: 1.5.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: 2021-10-06 00:00:00.000000000 Z
11
+ date: 2021-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: flexirest
@@ -103,6 +103,7 @@ files:
103
103
  - app/models/civo/ssh_key.rb
104
104
  - app/models/civo/system.rb
105
105
  - app/models/civo/team.rb
106
+ - app/models/civo/team_member.rb
106
107
  - app/models/civo/template.rb
107
108
  - app/models/civo/user.rb
108
109
  - app/models/civo/volume.rb