gitlab_support_readiness 1.0.84 → 1.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/support_readiness/gitlab/repositories.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 146ab0bb3dac4408cf7461a215c958f105e6b1890aea1bcefc11a06c41d0f8a6
|
4
|
+
data.tar.gz: deda4a9b4213278616ad1ece4223a57ed2a992d91a087a47e332d2c89ab05a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a46f2475ceae05849e844ff06948704da36596a203a3285aab55c44146da494b3af1cef64ce51a78472029038cd23ae43a6822fbb3a93c760d08847f16ba6b5
|
7
|
+
data.tar.gz: d7478321e6c5acc6d6870a2897013aca98dde2e5551a4990a73dbb1eede8897d3a766c50b0575bfc3673f455305028dca1439a68fcb437778622fcd751002789
|
@@ -67,7 +67,7 @@ module Readiness
|
|
67
67
|
# pp file['size']
|
68
68
|
# # => 88
|
69
69
|
def self.file(client, project, path, ref)
|
70
|
-
response = client.connection.get "projects/#{project.id}/repository/files/#{
|
70
|
+
response = client.connection.get "projects/#{project.id}/repository/files/#{ERB::Util.url_encode(path)}?ref=#{ref}"
|
71
71
|
handle_request_error(0, 'GitLab', response.status) unless response.status == 200
|
72
72
|
Oj.load(response.body)
|
73
73
|
end
|
@@ -93,7 +93,7 @@ module Readiness
|
|
93
93
|
# pp file
|
94
94
|
# # => "Hello World!"
|
95
95
|
def self.raw_file(client, project, path, ref)
|
96
|
-
response = client.connection.get "projects/#{project.id}/repository/files/#{
|
96
|
+
response = client.connection.get "projects/#{project.id}/repository/files/#{ERB::Util.url_encode(path)}/raw?ref=#{ref}"
|
97
97
|
handle_request_error(0, 'GitLab', response.status) unless response.status == 200
|
98
98
|
response.body
|
99
99
|
end
|
@@ -126,7 +126,7 @@ module Readiness
|
|
126
126
|
# pp file['path']
|
127
127
|
# # => "spec/test.file"
|
128
128
|
def self.create_file!(client, project, path, params)
|
129
|
-
response = client.connection.post "projects/#{project.id}/repository/files/#{
|
129
|
+
response = client.connection.post "projects/#{project.id}/repository/files/#{ERB::Util.url_encode(path)}", params.to_json
|
130
130
|
handle_request_error(1, 'GitLab', response.status, { action: 'Create file in repo', id: "#{project.id}" }) unless response.status == 200
|
131
131
|
Oj.load(response.body)
|
132
132
|
end
|
@@ -159,7 +159,7 @@ module Readiness
|
|
159
159
|
# pp file['path']
|
160
160
|
# # => "spec/test.file"
|
161
161
|
def self.update_file!(client, project, path, params)
|
162
|
-
response = client.connection.put "projects/#{project.id}/repository/files/#{
|
162
|
+
response = client.connection.put "projects/#{project.id}/repository/files/#{ERB::Util.url_encode(path)}", params.to_json
|
163
163
|
handle_request_error(1, 'GitLab', response.status, { action: 'Update file in repo', id: "#{project.id}" }) unless response.status == 200
|
164
164
|
Oj.load(response.body)
|
165
165
|
end
|
@@ -190,7 +190,7 @@ module Readiness
|
|
190
190
|
# pp file
|
191
191
|
# # => true
|
192
192
|
def self.delete_file!(client, project, path, params)
|
193
|
-
response = client.connection.delete "projects/#{project.id}/repository/files/#{
|
193
|
+
response = client.connection.delete "projects/#{project.id}/repository/files/#{ERB::Util.url_encode(path)}", params
|
194
194
|
handle_request_error(1, 'GitLab', response.status, { action: 'Delete file in repo', id: "#{project.id}" }) unless response.status == 204
|
195
195
|
true
|
196
196
|
end
|
@@ -258,7 +258,7 @@ module Readiness
|
|
258
258
|
# pp update['parent_ids']
|
259
259
|
# # => ["ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba"]
|
260
260
|
def self.update_submodule!(client, project, path, params)
|
261
|
-
response = client.connection.put "projects/#{project.id}/repository/submodules/#{
|
261
|
+
response = client.connection.put "projects/#{project.id}/repository/submodules/#{ERB::Util.url_encode(path)}", params.to_json
|
262
262
|
handle_request_error(1, 'GitLab', response.status, { action: 'Update submodule in repo', id: "#{project.id}" }) unless response.status == 200
|
263
263
|
Oj.load(response.body)
|
264
264
|
end
|