ci_toolkit 1.5.20 → 1.5.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +8 -10
- data/lib/ci_toolkit/build_status.rb +0 -2
- data/lib/ci_toolkit/seetest_client.rb +18 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 659ab6668b76e08f2df9bdad69f510b72af0a3c84c911a181accdc0cbfdedb18
|
4
|
+
data.tar.gz: 828fee99088355562ba0cd0607909759be93bb6ef834fcd8d0225391aa405509
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2e976214a79a78ada20daa29b1e76b5e755e7ed6e90ea47075e42a2b652f39e87f3e25cbd060f59afcbdb8d3bc528cdd393aeef066bd222aeda8730e5218c60
|
7
|
+
data.tar.gz: 691b4025c6d27609d284fef5e947b290a549db505484d26fa16c4966acaf5983695b376b2be178818b2f380a32eb7cae328aa2f9a4030562e95a846733b5a23f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ci_toolkit (1.5.
|
4
|
+
ci_toolkit (1.5.22)
|
5
5
|
faraday
|
6
6
|
faraday-multipart
|
7
7
|
faraday_middleware
|
@@ -43,18 +43,16 @@ GEM
|
|
43
43
|
faraday-rack (1.0.0)
|
44
44
|
faraday_middleware (1.2.0)
|
45
45
|
faraday (~> 1.0)
|
46
|
-
gitlab (4.
|
47
|
-
httparty (~> 0.
|
46
|
+
gitlab (4.19.0)
|
47
|
+
httparty (~> 0.20)
|
48
48
|
terminal-table (>= 1.5.1)
|
49
|
-
httparty (0.
|
50
|
-
|
49
|
+
httparty (0.21.0)
|
50
|
+
mini_mime (>= 1.0.0)
|
51
51
|
multi_xml (>= 0.5.2)
|
52
52
|
ipaddr (1.2.3)
|
53
53
|
json (2.5.1)
|
54
54
|
jwt (2.3.0)
|
55
|
-
|
56
|
-
mime-types-data (~> 3.2015)
|
57
|
-
mime-types-data (3.2022.0105)
|
55
|
+
mini_mime (1.1.2)
|
58
56
|
multi_xml (0.6.0)
|
59
57
|
multipart-post (2.1.1)
|
60
58
|
octokit (4.21.0)
|
@@ -116,7 +114,7 @@ GEM
|
|
116
114
|
unicode-display_width (>= 1.1.1, < 3)
|
117
115
|
time (0.2.0)
|
118
116
|
date
|
119
|
-
unicode-display_width (2.
|
117
|
+
unicode-display_width (2.4.2)
|
120
118
|
|
121
119
|
PLATFORMS
|
122
120
|
universal-darwin-20
|
@@ -134,4 +132,4 @@ DEPENDENCIES
|
|
134
132
|
simplecov-json
|
135
133
|
|
136
134
|
BUNDLED WITH
|
137
|
-
2.
|
135
|
+
2.4.12
|
@@ -45,10 +45,7 @@ module CiToolkit
|
|
45
45
|
)
|
46
46
|
# Application with unique name already exist. Replace it.
|
47
47
|
elsif response.status == ERROR && !response.data.nil? && !response.data.uniqueName.nil?
|
48
|
-
|
49
|
-
application_id = application_info_response[0].id
|
50
|
-
response = replace_existing_application(
|
51
|
-
application_id,
|
48
|
+
response = replace_existing_application_by_unique_name(
|
52
49
|
project_name,
|
53
50
|
unique_name,
|
54
51
|
full_path_to_file,
|
@@ -75,8 +72,23 @@ module CiToolkit
|
|
75
72
|
full_path_to_file,
|
76
73
|
content_type
|
77
74
|
)
|
78
|
-
faraday_delete_application(application_id)
|
79
|
-
|
75
|
+
response = faraday_delete_application(application_id)
|
76
|
+
|
77
|
+
if response.status == SUCCESS && response.code == OKAY
|
78
|
+
response = faraday_upload_file_with_error_handling(project_name, unique_name, full_path_to_file, content_type)
|
79
|
+
end
|
80
|
+
response
|
81
|
+
end
|
82
|
+
|
83
|
+
def replace_existing_application_by_unique_name(project_name, unique_name, full_path_to_file, content_type)
|
84
|
+
application_info_response = faraday_get_application_info(unique_name)
|
85
|
+
application_info_response.each do |app_response|
|
86
|
+
next unless app_response.uniqueName == unique_name
|
87
|
+
|
88
|
+
response = replace_existing_application(app_response.id, project_name, unique_name, full_path_to_file,
|
89
|
+
content_type)
|
90
|
+
return response if response.status == SUCCESS
|
91
|
+
end
|
80
92
|
end
|
81
93
|
|
82
94
|
def faraday_upload_file_with_error_handling(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci_toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gero Keller
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|