gitlab_support_readiness 1.0.84 → 1.0.86
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 849c69934c1a08ad5f0aebf4c7d76603ffa71a15335485fa2a786e31e187ac4e
|
4
|
+
data.tar.gz: 6bece7519407c6e398fe2b5127ed2558f8ef0ab55690dcea1957f66b0ab67868
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f2bbab55afdec7bcfb39621747d96341feed2cd93650ea64af260d67c4182918a4467dbe6f0a649a96c2a8567d86db9fc545297f78a18d7fc6852533d1ca355
|
7
|
+
data.tar.gz: 7736d26f017d16a35771c9bdacd412765e8404471b081a4a0c0f2e9f7b9d1b13e1eeb4cf09016c6b25a3637eaae048733197c8e39d53f3f1d2cb2c23a2c4a367
|
@@ -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
|
@@ -25,7 +25,7 @@ module Readiness
|
|
25
25
|
]
|
26
26
|
ticket.requester = { name: customer_name, email: customer_email }
|
27
27
|
ticket.comment = { html_body: body }
|
28
|
-
ticket.subject =
|
28
|
+
ticket.subject = ticket_subject
|
29
29
|
ticket.tags = %w[support_gratis_request manual_support_upgrade]
|
30
30
|
ticket.priority = 'medium'
|
31
31
|
ticket.status = 'new'
|
@@ -101,6 +101,15 @@ module Readiness
|
|
101
101
|
@opportunity_link ||= ENV.fetch('GRATIS_OPPORTUNITY_LINK')
|
102
102
|
end
|
103
103
|
|
104
|
+
##
|
105
|
+
# Sets the global variable ticket_subject
|
106
|
+
#
|
107
|
+
# @author Jason Colyer
|
108
|
+
# @since 1.0.86
|
109
|
+
def self.ticket_subject
|
110
|
+
@ticket_subject ||= ENV.fetch('GRATIS_SUBJECT', 'Gratis Support Request')
|
111
|
+
end
|
112
|
+
|
104
113
|
##
|
105
114
|
# Sets the global variable context
|
106
115
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_support_readiness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.86
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Colyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|