semaphore_client 2.8.1 → 3.0.0

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: 60da0c7ccba919a12a7784026ef700ab2478aefa
4
- data.tar.gz: 4756b1e2caeeb572270d3f9d0b6b8ccc1a58552d
3
+ metadata.gz: 939bd6eae22cf45bbfda67acc6f97450d44fe53c
4
+ data.tar.gz: 335b0171a3bb19ed52a447eab89a3c0546845372
5
5
  SHA512:
6
- metadata.gz: 470205fb482399ea3cdae888e3f2b1d1b909932cd7e53c44aea5d933651d9ec6120ce9cb6a27adff74833e2784f9a469592d9aded7136949ee24908687380f24
7
- data.tar.gz: 71e701d89b24c57a02a5317ab69baa548d49d512e30c3100a722d3ea66f05841ae98ec857bc841f2e42408ffb34139c8a490d09c928bec1ae6d54dc886717913
6
+ metadata.gz: 63324bd9d4efa49e1d17550095716303dfba0b008ffebf369a3429baaace9d364ef9b92279331143ffc3b891de37040710c59bf09cd61026553ddeda96c4e92c
7
+ data.tar.gz: 65c9b158248c80402465319f2d9e205e56225920e48ae0f36583ddd841d7da9f9c6c51d0490bf6080aab61d59589a454ed27101d0f7df74440d06de69dd1a46b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- semaphore_client (2.8.1)
4
+ semaphore_client (3.0.0)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -45,26 +45,26 @@ class SemaphoreClient
45
45
 
46
46
 
47
47
 
48
- def list_for_shared_config(shared_config_id, params = nil, options = {})
49
- list_for_shared_config!(shared_config_id, params, options)
48
+ def list_for_secret(secret_id, params = nil, options = {})
49
+ list_for_secret!(secret_id, params, options)
50
50
  rescue SemaphoreClient::Exceptions::ResponseError
51
51
  end
52
52
 
53
- def list_for_shared_config!(shared_config_id, params = nil, options = {})
54
- path = "/shared_configs/#{shared_config_id}/config_files"
53
+ def list_for_secret!(secret_id, params = nil, options = {})
54
+ path = "/secrets/#{secret_id}/config_files"
55
55
 
56
56
  @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::ConfigFile.load(e) }
57
57
  end
58
58
 
59
59
 
60
60
 
61
- def create_for_shared_config(shared_config_id, params = nil, options = {})
62
- create_for_shared_config!(shared_config_id, params, options)
61
+ def create_for_secret(secret_id, params = nil, options = {})
62
+ create_for_secret!(secret_id, params, options)
63
63
  rescue SemaphoreClient::Exceptions::ResponseError
64
64
  end
65
65
 
66
- def create_for_shared_config!(shared_config_id, params = nil, options = {})
67
- path = "/shared_configs/#{shared_config_id}/config_files"
66
+ def create_for_secret!(secret_id, params = nil, options = {})
67
+ path = "/secrets/#{secret_id}/config_files"
68
68
  response = @http_client.post(path, params, options)
69
69
 
70
70
  SemaphoreClient::Model::ConfigFile.load(response.body)
@@ -45,26 +45,26 @@ class SemaphoreClient
45
45
 
46
46
 
47
47
 
48
- def list_for_shared_config(shared_config_id, params = nil, options = {})
49
- list_for_shared_config!(shared_config_id, params, options)
48
+ def list_for_secret(secret_id, params = nil, options = {})
49
+ list_for_secret!(secret_id, params, options)
50
50
  rescue SemaphoreClient::Exceptions::ResponseError
51
51
  end
52
52
 
53
- def list_for_shared_config!(shared_config_id, params = nil, options = {})
54
- path = "/shared_configs/#{shared_config_id}/env_vars"
53
+ def list_for_secret!(secret_id, params = nil, options = {})
54
+ path = "/secrets/#{secret_id}/env_vars"
55
55
 
56
56
  @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::EnvVar.load(e) }
57
57
  end
58
58
 
59
59
 
60
60
 
61
- def create_for_shared_config(shared_config_id, params = nil, options = {})
62
- create_for_shared_config!(shared_config_id, params, options)
61
+ def create_for_secret(secret_id, params = nil, options = {})
62
+ create_for_secret!(secret_id, params, options)
63
63
  rescue SemaphoreClient::Exceptions::ResponseError
64
64
  end
65
65
 
66
- def create_for_shared_config!(shared_config_id, params = nil, options = {})
67
- path = "/shared_configs/#{shared_config_id}/env_vars"
66
+ def create_for_secret!(secret_id, params = nil, options = {})
67
+ path = "/secrets/#{secret_id}/env_vars"
68
68
  response = @http_client.post(path, params, options)
69
69
 
70
70
  SemaphoreClient::Model::EnvVar.load(response.body)
@@ -72,13 +72,13 @@ class SemaphoreClient
72
72
 
73
73
 
74
74
 
75
- def list_for_shared_config(shared_config_id, params = nil, options = {})
76
- list_for_shared_config!(shared_config_id, params, options)
75
+ def list_for_secret(secret_id, params = nil, options = {})
76
+ list_for_secret!(secret_id, params, options)
77
77
  rescue SemaphoreClient::Exceptions::ResponseError
78
78
  end
79
79
 
80
- def list_for_shared_config!(shared_config_id, params = nil, options = {})
81
- path = "/shared_configs/#{shared_config_id}/projects"
80
+ def list_for_secret!(secret_id, params = nil, options = {})
81
+ path = "/secrets/#{secret_id}/projects"
82
82
 
83
83
  @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::Project.load(e) }
84
84
  end
@@ -1,6 +1,6 @@
1
1
  class SemaphoreClient
2
2
  module Api
3
- class SharedConfig
3
+ class Secret
4
4
  def initialize(http_client)
5
5
  @http_client = http_client
6
6
  end
@@ -12,9 +12,9 @@ class SemaphoreClient
12
12
  end
13
13
 
14
14
  def list_for_org!(org_id, params = nil, options = {})
15
- path = "/orgs/#{org_id}/shared_configs"
15
+ path = "/orgs/#{org_id}/secrets"
16
16
 
17
- @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::SharedConfig.load(e) }
17
+ @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::Secret.load(e) }
18
18
  end
19
19
 
20
20
 
@@ -25,10 +25,10 @@ class SemaphoreClient
25
25
  end
26
26
 
27
27
  def create_for_org!(org_id, params = nil, options = {})
28
- path = "/orgs/#{org_id}/shared_configs"
28
+ path = "/orgs/#{org_id}/secrets"
29
29
  response = @http_client.post(path, params, options)
30
30
 
31
- SemaphoreClient::Model::SharedConfig.load(response.body)
31
+ SemaphoreClient::Model::Secret.load(response.body)
32
32
  end
33
33
 
34
34
 
@@ -39,33 +39,33 @@ class SemaphoreClient
39
39
  end
40
40
 
41
41
  def list_for_team!(team_id, params = nil, options = {})
42
- path = "/teams/#{team_id}/shared_configs"
42
+ path = "/teams/#{team_id}/secrets"
43
43
 
44
- @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::SharedConfig.load(e) }
44
+ @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::Secret.load(e) }
45
45
  end
46
46
 
47
47
 
48
48
 
49
- def attach_to_team(shared_config_id, team_id, params = nil, options = {})
50
- attach_to_team!(shared_config_id, team_id, params, options)
49
+ def attach_to_team(secret_id, team_id, params = nil, options = {})
50
+ attach_to_team!(secret_id, team_id, params, options)
51
51
  rescue SemaphoreClient::Exceptions::ResponseError
52
52
  end
53
53
 
54
- def attach_to_team!(shared_config_id, team_id, params = nil, options = {})
55
- path = "/teams/#{team_id}/shared_configs/#{shared_config_id}"
54
+ def attach_to_team!(secret_id, team_id, params = nil, options = {})
55
+ path = "/teams/#{team_id}/secrets/#{secret_id}"
56
56
 
57
57
  @http_client.post(path, params, options)
58
58
  end
59
59
 
60
60
 
61
61
 
62
- def detach_from_team(shared_config_id, team_id, params = nil, options = {})
63
- detach_from_team!(shared_config_id, team_id, params, options)
62
+ def detach_from_team(secret_id, team_id, params = nil, options = {})
63
+ detach_from_team!(secret_id, team_id, params, options)
64
64
  rescue SemaphoreClient::Exceptions::ResponseError
65
65
  end
66
66
 
67
- def detach_from_team!(shared_config_id, team_id, params = nil, options = {})
68
- path = "/teams/#{team_id}/shared_configs/#{shared_config_id}"
67
+ def detach_from_team!(secret_id, team_id, params = nil, options = {})
68
+ path = "/teams/#{team_id}/secrets/#{secret_id}"
69
69
 
70
70
  @http_client.delete(path, params, options)
71
71
  end
@@ -78,33 +78,33 @@ class SemaphoreClient
78
78
  end
79
79
 
80
80
  def list_for_project!(project_id, params = nil, options = {})
81
- path = "/projects/#{project_id}/shared_configs"
81
+ path = "/projects/#{project_id}/secrets"
82
82
 
83
- @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::SharedConfig.load(e) }
83
+ @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::Secret.load(e) }
84
84
  end
85
85
 
86
86
 
87
87
 
88
- def attach_to_project(shared_config_id, project_id, params = nil, options = {})
89
- attach_to_project!(shared_config_id, project_id, params, options)
88
+ def attach_to_project(secret_id, project_id, params = nil, options = {})
89
+ attach_to_project!(secret_id, project_id, params, options)
90
90
  rescue SemaphoreClient::Exceptions::ResponseError
91
91
  end
92
92
 
93
- def attach_to_project!(shared_config_id, project_id, params = nil, options = {})
94
- path = "/projects/#{project_id}/shared_configs/#{shared_config_id}"
93
+ def attach_to_project!(secret_id, project_id, params = nil, options = {})
94
+ path = "/projects/#{project_id}/secrets/#{secret_id}"
95
95
 
96
96
  @http_client.post(path, params, options)
97
97
  end
98
98
 
99
99
 
100
100
 
101
- def detach_from_project(shared_config_id, project_id, params = nil, options = {})
102
- detach_from_project!(shared_config_id, project_id, params, options)
101
+ def detach_from_project(secret_id, project_id, params = nil, options = {})
102
+ detach_from_project!(secret_id, project_id, params, options)
103
103
  rescue SemaphoreClient::Exceptions::ResponseError
104
104
  end
105
105
 
106
- def detach_from_project!(shared_config_id, project_id, params = nil, options = {})
107
- path = "/projects/#{project_id}/shared_configs/#{shared_config_id}"
106
+ def detach_from_project!(secret_id, project_id, params = nil, options = {})
107
+ path = "/projects/#{project_id}/secrets/#{secret_id}"
108
108
 
109
109
  @http_client.delete(path, params, options)
110
110
  end
@@ -117,10 +117,10 @@ class SemaphoreClient
117
117
  end
118
118
 
119
119
  def get!(id, params = nil, options = {})
120
- path = "/shared_configs/#{id}"
120
+ path = "/secrets/#{id}"
121
121
  response = @http_client.get(path, params = {})
122
122
 
123
- SemaphoreClient::Model::SharedConfig.load(response.body)
123
+ SemaphoreClient::Model::Secret.load(response.body)
124
124
  end
125
125
 
126
126
 
@@ -131,7 +131,7 @@ class SemaphoreClient
131
131
  end
132
132
 
133
133
  def delete!(id, params = nil, options = {})
134
- path = "/shared_configs/#{id}"
134
+ path = "/secrets/#{id}"
135
135
 
136
136
  @http_client.delete(path, params)
137
137
  end
@@ -144,10 +144,10 @@ class SemaphoreClient
144
144
  end
145
145
 
146
146
  def update!(id, params = nil, options = {})
147
- path = "/shared_configs/#{id}"
147
+ path = "/secrets/#{id}"
148
148
  response = @http_client.patch(path, params)
149
149
 
150
- SemaphoreClient::Model::SharedConfig.load(response.body)
150
+ SemaphoreClient::Model::Secret.load(response.body)
151
151
  end
152
152
 
153
153
 
@@ -87,13 +87,13 @@ class SemaphoreClient
87
87
 
88
88
 
89
89
 
90
- def list_for_shared_config(shared_config_id, params = nil, options = {})
91
- list_for_shared_config!(shared_config_id, params, options)
90
+ def list_for_secret(secret_id, params = nil, options = {})
91
+ list_for_secret!(secret_id, params, options)
92
92
  rescue SemaphoreClient::Exceptions::ResponseError
93
93
  end
94
94
 
95
- def list_for_shared_config!(shared_config_id, params = nil, options = {})
96
- path = "/shared_configs/#{shared_config_id}/teams"
95
+ def list_for_secret!(secret_id, params = nil, options = {})
96
+ path = "/secrets/#{secret_id}/teams"
97
97
 
98
98
  @http_client.get(path, params, options = {}).body.map { |e| SemaphoreClient::Model::Team.load(e) }
99
99
  end
@@ -1,7 +1,7 @@
1
1
  class SemaphoreClient
2
2
  module Model
3
3
  class Org
4
- attr_reader :projects_url, :teams_url, :name, :username, :updated_at, :id, :url, :shared_configs_url, :users_url, :created_at
4
+ attr_reader :projects_url, :teams_url, :name, :secrets_url, :username, :updated_at, :id, :url, :users_url, :created_at
5
5
 
6
6
  def self.load(attributes)
7
7
  new.load(attributes)
@@ -17,11 +17,11 @@ class SemaphoreClient
17
17
  @projects_url = attributes[:projects_url] if attributes.key?(:projects_url)
18
18
  @teams_url = attributes[:teams_url] if attributes.key?(:teams_url)
19
19
  @name = attributes[:name] if attributes.key?(:name)
20
+ @secrets_url = attributes[:secrets_url] if attributes.key?(:secrets_url)
20
21
  @username = attributes[:username] if attributes.key?(:username)
21
22
  @updated_at = attributes[:updated_at] if attributes.key?(:updated_at)
22
23
  @id = attributes[:id] if attributes.key?(:id)
23
24
  @url = attributes[:url] if attributes.key?(:url)
24
- @shared_configs_url = attributes[:shared_configs_url] if attributes.key?(:shared_configs_url)
25
25
  @users_url = attributes[:users_url] if attributes.key?(:users_url)
26
26
  @created_at = attributes[:created_at] if attributes.key?(:created_at)
27
27
 
@@ -1,6 +1,6 @@
1
1
  class SemaphoreClient
2
2
  module Model
3
- class SharedConfig
3
+ class Secret
4
4
  attr_reader :projects_url, :teams_url, :config_files_url, :updated_at, :env_vars_url, :id, :url, :created_at
5
5
  attr_accessor :name, :description
6
6
 
@@ -1,3 +1,3 @@
1
1
  class SemaphoreClient
2
- VERSION = "2.8.1"
2
+ VERSION = "3.0.0"
3
3
  end
@@ -11,14 +11,14 @@ require "semaphore_client/model/user"
11
11
  require "semaphore_client/model/org"
12
12
  require "semaphore_client/model/team"
13
13
  require "semaphore_client/model/project"
14
- require "semaphore_client/model/shared_config"
14
+ require "semaphore_client/model/secret"
15
15
  require "semaphore_client/model/env_var"
16
16
  require "semaphore_client/model/config_file"
17
17
  require "semaphore_client/api/user"
18
18
  require "semaphore_client/api/org"
19
19
  require "semaphore_client/api/team"
20
20
  require "semaphore_client/api/project"
21
- require "semaphore_client/api/shared_config"
21
+ require "semaphore_client/api/secret"
22
22
  require "semaphore_client/api/env_var"
23
23
  require "semaphore_client/api/config_file"
24
24
 
@@ -51,8 +51,8 @@ class SemaphoreClient
51
51
  @project_api ||= SemaphoreClient::Api::Project.new(http_client)
52
52
  end
53
53
 
54
- def shared_configs
55
- @shared_config_api ||= SemaphoreClient::Api::SharedConfig.new(http_client)
54
+ def secrets
55
+ @secret_api ||= SemaphoreClient::Api::Secret.new(http_client)
56
56
  end
57
57
 
58
58
  def env_vars
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semaphore_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jovan Ivanović
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-10 00:00:00.000000000 Z
11
+ date: 2017-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -116,7 +116,7 @@ files:
116
116
  - lib/semaphore_client/api/env_var.rb
117
117
  - lib/semaphore_client/api/org.rb
118
118
  - lib/semaphore_client/api/project.rb
119
- - lib/semaphore_client/api/shared_config.rb
119
+ - lib/semaphore_client/api/secret.rb
120
120
  - lib/semaphore_client/api/team.rb
121
121
  - lib/semaphore_client/api/user.rb
122
122
  - lib/semaphore_client/exceptions.rb
@@ -125,7 +125,7 @@ files:
125
125
  - lib/semaphore_client/model/env_var.rb
126
126
  - lib/semaphore_client/model/org.rb
127
127
  - lib/semaphore_client/model/project.rb
128
- - lib/semaphore_client/model/shared_config.rb
128
+ - lib/semaphore_client/model/secret.rb
129
129
  - lib/semaphore_client/model/team.rb
130
130
  - lib/semaphore_client/model/user.rb
131
131
  - lib/semaphore_client/version.rb
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  version: '0'
152
152
  requirements: []
153
153
  rubyforge_project:
154
- rubygems_version: 2.6.13
154
+ rubygems_version: 2.6.14
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: Client for Semaphore's API.