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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cbd37351a0c24f06f0cd06e4d677fe5b784a7b66f6e3263c64c8f204f0190c2
4
- data.tar.gz: 5432b48c5bc04cd551af88fe64f36b87b852cc8887d9404b3f67bad42a6b5f7f
3
+ metadata.gz: 146ab0bb3dac4408cf7461a215c958f105e6b1890aea1bcefc11a06c41d0f8a6
4
+ data.tar.gz: deda4a9b4213278616ad1ece4223a57ed2a992d91a087a47e332d2c89ab05a03
5
5
  SHA512:
6
- metadata.gz: 43b9ede1e457fcdf002411ce43949f9c150a42dedad327097766e88c93dc48c943cbcacd78a726b79ef523d7f873bd9d2feedd73155a886071fc7d810bc337b1
7
- data.tar.gz: 244f55ea305bf29a5f88e0f1dbe7cecdb7cac039ccff07f44ad084bbca776388a922f53728ce70d8056b8fa4f168270576410d2783c31d576849e4cec367e039
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/#{CGI.escape(path)}?ref=#{ref}"
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/#{CGI.escape(path)}/raw?ref=#{ref}"
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/#{CGI.escape(path)}", params.to_json
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/#{CGI.escape(path)}", params.to_json
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/#{CGI.escape(path)}", params
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/#{CGI.escape(path)}", params.to_json
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_support_readiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.84
4
+ version: 1.0.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer