3scale_toolbox 1.0.0 → 1.0.1

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: 769b120ad3d44861ec006d879fc2783201c8129b590ff4e54ca27d40725e30b7
4
- data.tar.gz: 9097aeab4eb07152aeb47d997648c1c7dd1b49265cd233a8c36757cd2beb82c7
3
+ metadata.gz: dbb039faa8c8a95cf43c7c891898b1f3d19a4d20f5c78f250936dccfa5d1cda5
4
+ data.tar.gz: 9885341a7f7be084163119751c5d86d57491100a05c3481d37487f0943f0bc1d
5
5
  SHA512:
6
- metadata.gz: 62c74ff4d3bd4a76884fa5b907d3b36c22dccb3a938f200a2c90b7a209b06cd4cd10b7f11799aeef98b9f43fafb8c5e5e25d744a4fdb3f97408cde6be8f4df02
7
- data.tar.gz: 5467a90b3ee4326b44f7b3acbd6baebc7ad50df2f279d7f824195910873e4bc906d230555536cea5eb5299e483f18613f248d27208e49ecad7795b7cbb115641
6
+ metadata.gz: 3b25fed39897049778bcb9b23f3429f9e0b2e08bd216b5d30f5b5de1b85e444ee762868bcaf0df69415adb244080a9f9e6db31920c9c0b1bf43911b6815c295c
7
+ data.tar.gz: 318b614245d3339d996335a6fd13cbb0b1c656e83731e897273a31b14947991c499c878676cd94050b178e1eaa4d35753e25e11e73a9ecd41106a506047b1da0
@@ -28,9 +28,9 @@ module ThreeScaleToolbox
28
28
  end
29
29
 
30
30
  def validate_remote(remote_url_str)
31
- # parsing url before trying to create client
32
- # raises Invalid URL when syntax is incorrect
33
- ThreeScaleToolbox::Helper.parse_uri(remote_url_str)
31
+ uri_obj = ThreeScaleToolbox::Helper.parse_uri(remote_url_str)
32
+ raise ThreeScaleToolbox::InvalidUrlError, "invalid url: #{remote_url_str}" unless uri_obj.kind_of?(URI::HTTP)
33
+
34
34
  threescale_client(remote_url_str).list_accounts
35
35
  rescue ThreeScale::API::HttpClient::ForbiddenError
36
36
  raise ThreeScaleToolbox::Error, 'remote not valid'
@@ -25,12 +25,7 @@ module ThreeScaleToolbox
25
25
 
26
26
  def parse_uri(uri)
27
27
  # raises error when remote_str is not string, but object or something else.
28
- uri_obj = URI(uri)
29
- # URI::HTTP is parent of URI::HTTPS
30
- # with single check both types are checked
31
- raise ThreeScaleToolbox::InvalidUrlError, "invalid url: #{uri}" unless uri_obj.kind_of?(URI::HTTP)
32
-
33
- uri_obj
28
+ URI(uri)
34
29
  end
35
30
 
36
31
  def hash_deep_dup(hash)
@@ -68,7 +68,10 @@ module ThreeScaleToolbox
68
68
 
69
69
  def host
70
70
  # If there are many? take first
71
- server_objects { |url| "#{url.host}:#{url.port}" }.first
71
+ server_objects do |url|
72
+ # URI::HTTP is parent of URI::HTTPS, so both covered
73
+ "#{url.host}:#{url.port}" if url.kind_of?(URI::HTTP)
74
+ end.first
72
75
  end
73
76
 
74
77
  def scheme
@@ -4,6 +4,8 @@ module ThreeScaleToolbox
4
4
  def from_uri(uri_str)
5
5
  uri = Helper.parse_uri(uri_str)
6
6
 
7
+ raise ThreeScaleToolbox::InvalidUrlError, "invalid url: #{uri_str}" unless uri.kind_of?(URI::HTTP)
8
+
7
9
  authentication = uri.user
8
10
  uri.user = ''
9
11
  { authentication: authentication, endpoint: uri.to_s }
@@ -1,3 +1,3 @@
1
1
  module ThreeScaleToolbox
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
data/licenses.xml CHANGED
@@ -13,7 +13,7 @@
13
13
  </dependency>
14
14
  <dependency>
15
15
  <packageName>3scale_toolbox</packageName>
16
- <version>1.0.0</version>
16
+ <version>1.0.1</version>
17
17
  <licenses>
18
18
  <license>
19
19
  <name>MIT</name>
@@ -23,7 +23,7 @@
23
23
  </dependency>
24
24
  <dependency>
25
25
  <packageName>activesupport</packageName>
26
- <version>7.0.6</version>
26
+ <version>7.1.4</version>
27
27
  <licenses>
28
28
  <license>
29
29
  <name>MIT</name>
@@ -40,6 +40,34 @@
40
40
  <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
41
41
  </license>
42
42
  </licenses>
43
+ </dependency>
44
+ <dependency>
45
+ <packageName>base64</packageName>
46
+ <version>0.2.0</version>
47
+ <licenses>
48
+ <license>
49
+ <name>Simplified BSD</name>
50
+ <url>http://opensource.org/licenses/bsd-license</url>
51
+ </license>
52
+ <license>
53
+ <name>ruby</name>
54
+ <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
55
+ </license>
56
+ </licenses>
57
+ </dependency>
58
+ <dependency>
59
+ <packageName>bigdecimal</packageName>
60
+ <version>3.1.8</version>
61
+ <licenses>
62
+ <license>
63
+ <name>Simplified BSD</name>
64
+ <url>http://opensource.org/licenses/bsd-license</url>
65
+ </license>
66
+ <license>
67
+ <name>ruby</name>
68
+ <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
69
+ </license>
70
+ </licenses>
43
71
  </dependency>
44
72
  <dependency>
45
73
  <packageName>builder</packageName>
@@ -83,7 +111,17 @@
83
111
  </dependency>
84
112
  <dependency>
85
113
  <packageName>concurrent-ruby</packageName>
86
- <version>1.2.2</version>
114
+ <version>1.3.4</version>
115
+ <licenses>
116
+ <license>
117
+ <name>MIT</name>
118
+ <url>http://opensource.org/licenses/mit-license</url>
119
+ </license>
120
+ </licenses>
121
+ </dependency>
122
+ <dependency>
123
+ <packageName>connection_pool</packageName>
124
+ <version>2.4.1</version>
87
125
  <licenses>
88
126
  <license>
89
127
  <name>MIT</name>
@@ -103,13 +141,27 @@
103
141
  </dependency>
104
142
  <dependency>
105
143
  <packageName>cri</packageName>
106
- <version>2.15.11</version>
144
+ <version>2.15.12</version>
107
145
  <licenses>
108
146
  <license>
109
147
  <name>MIT</name>
110
148
  <url>http://opensource.org/licenses/mit-license</url>
111
149
  </license>
112
150
  </licenses>
151
+ </dependency>
152
+ <dependency>
153
+ <packageName>csv</packageName>
154
+ <version>3.3.0</version>
155
+ <licenses>
156
+ <license>
157
+ <name>Simplified BSD</name>
158
+ <url>http://opensource.org/licenses/bsd-license</url>
159
+ </license>
160
+ <license>
161
+ <name>ruby</name>
162
+ <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
163
+ </license>
164
+ </licenses>
113
165
  </dependency>
114
166
  <dependency>
115
167
  <packageName>deep_merge</packageName>
@@ -158,6 +210,20 @@
158
210
  <url>http://opensource.org/licenses/mit-license</url>
159
211
  </license>
160
212
  </licenses>
213
+ </dependency>
214
+ <dependency>
215
+ <packageName>drb</packageName>
216
+ <version>2.2.1</version>
217
+ <licenses>
218
+ <license>
219
+ <name>Simplified BSD</name>
220
+ <url>http://opensource.org/licenses/bsd-license</url>
221
+ </license>
222
+ <license>
223
+ <name>ruby</name>
224
+ <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
225
+ </license>
226
+ </licenses>
161
227
  </dependency>
162
228
  <dependency>
163
229
  <packageName>hansi</packageName>
@@ -191,7 +257,7 @@
191
257
  </dependency>
192
258
  <dependency>
193
259
  <packageName>i18n</packageName>
194
- <version>1.14.1</version>
260
+ <version>1.14.5</version>
195
261
  <licenses>
196
262
  <license>
197
263
  <name>MIT</name>
@@ -211,7 +277,7 @@
211
277
  </dependency>
212
278
  <dependency>
213
279
  <packageName>license_finder</packageName>
214
- <version>7.1.0</version>
280
+ <version>7.2.1</version>
215
281
  <licenses>
216
282
  <license>
217
283
  <name>MIT</name>
@@ -231,7 +297,7 @@
231
297
  </dependency>
232
298
  <dependency>
233
299
  <packageName>mini_portile2</packageName>
234
- <version>2.8.4</version>
300
+ <version>2.8.7</version>
235
301
  <licenses>
236
302
  <license>
237
303
  <name>MIT</name>
@@ -241,7 +307,7 @@
241
307
  </dependency>
242
308
  <dependency>
243
309
  <packageName>minitest</packageName>
244
- <version>5.18.1</version>
310
+ <version>5.25.1</version>
245
311
  <licenses>
246
312
  <license>
247
313
  <name>MIT</name>
@@ -268,10 +334,24 @@
268
334
  <url>http://opensource.org/licenses/mit-license</url>
269
335
  </license>
270
336
  </licenses>
337
+ </dependency>
338
+ <dependency>
339
+ <packageName>mutex_m</packageName>
340
+ <version>0.2.0</version>
341
+ <licenses>
342
+ <license>
343
+ <name>Simplified BSD</name>
344
+ <url>http://opensource.org/licenses/bsd-license</url>
345
+ </license>
346
+ <license>
347
+ <name>ruby</name>
348
+ <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
349
+ </license>
350
+ </licenses>
271
351
  </dependency>
272
352
  <dependency>
273
353
  <packageName>nokogiri</packageName>
274
- <version>1.15.3</version>
354
+ <version>1.16.7</version>
275
355
  <licenses>
276
356
  <license>
277
357
  <name>MIT</name>
@@ -311,7 +391,7 @@
311
391
  </dependency>
312
392
  <dependency>
313
393
  <packageName>racc</packageName>
314
- <version>1.7.1</version>
394
+ <version>1.8.1</version>
315
395
  <licenses>
316
396
  <license>
317
397
  <name>Simplified BSD</name>
@@ -335,7 +415,7 @@
335
415
  </dependency>
336
416
  <dependency>
337
417
  <packageName>rexml</packageName>
338
- <version>3.2.5</version>
418
+ <version>3.3.6</version>
339
419
  <licenses>
340
420
  <license>
341
421
  <name>Simplified BSD</name>
@@ -446,10 +526,24 @@
446
526
  <url>http://opensource.org/licenses/mit-license</url>
447
527
  </license>
448
528
  </licenses>
529
+ </dependency>
530
+ <dependency>
531
+ <packageName>strscan</packageName>
532
+ <version>3.1.0</version>
533
+ <licenses>
534
+ <license>
535
+ <name>Simplified BSD</name>
536
+ <url>http://opensource.org/licenses/bsd-license</url>
537
+ </license>
538
+ <license>
539
+ <name>ruby</name>
540
+ <url>http://www.ruby-lang.org/en/LICENSE.txt</url>
541
+ </license>
542
+ </licenses>
449
543
  </dependency>
450
544
  <dependency>
451
545
  <packageName>thor</packageName>
452
- <version>1.2.1</version>
546
+ <version>1.3.1</version>
453
547
  <licenses>
454
548
  <license>
455
549
  <name>MIT</name>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: 3scale_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Soriano
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-07-24 00:00:00.000000000 Z
12
+ date: 2024-08-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -371,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
371
  - !ruby/object:Gem::Version
372
372
  version: '0'
373
373
  requirements: []
374
- rubygems_version: 3.4.10
374
+ rubygems_version: 3.5.9
375
375
  signing_key:
376
376
  specification_version: 4
377
377
  summary: 3scale Toolbox.