etna 0.1.48 → 0.1.49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/etna/client.rb +2 -2
- data/lib/etna/clients/metis/workflows/sync_metis_data_workflow.rb +1 -1
- data/lib/etna/formatting.rb +2 -0
- data/lib/etna/route.rb +8 -1
- 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: 4e6abb600dd6cd4dd0986021317933f8b782b94f03d30315383bc74b052613ab
|
4
|
+
data.tar.gz: 909e5c67319a91dd11db4d081ec721f9438b13b8fb15dbc9d19cef2e5a5197b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ef5fff5973c32b570306cab9292b7107e16c9f158dc6e3828fb19e6e4d8441f315e075091d39ce13641f81f3ecbdb428f3add61238d9c4043527e6139212702
|
7
|
+
data.tar.gz: 66d797cdfc76684f325aa37299e82de323b966f337d3b7e68b5ed8542cc1cb766d6b05c740256c2da63a586d240a8a2dbe9c8a1af9df3b9d0712b1a59f66ef0b
|
data/lib/etna/client.rb
CHANGED
@@ -293,9 +293,9 @@ module Etna
|
|
293
293
|
status_check!(response)
|
294
294
|
return response
|
295
295
|
end unless block_given?
|
296
|
+
else
|
297
|
+
raise ::Etna::Error, "Could not contact server, giving up"
|
296
298
|
end
|
297
|
-
|
298
|
-
raise ::Etna::Error, "Could not contact server, giving up" unless block_given?
|
299
299
|
end
|
300
300
|
|
301
301
|
private
|
data/lib/etna/formatting.rb
CHANGED
data/lib/etna/route.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'digest'
|
2
2
|
require 'date'
|
3
|
+
require 'net/http'
|
3
4
|
require "addressable/uri"
|
4
5
|
require_relative "./censor"
|
5
6
|
require_relative './instrumentation'
|
@@ -46,7 +47,7 @@ module Etna
|
|
46
47
|
if params
|
47
48
|
PARAM_TYPES.reduce(route) do |path,pat|
|
48
49
|
path.gsub(pat) do
|
49
|
-
params[$1.to_sym].split('/').map { |c| block_given? ? yield(c) :
|
50
|
+
params[$1.to_sym].split('/').map { |c| block_given? ? yield(c) : Etna::Route.encode_path_component(c) }.join('/')
|
50
51
|
end
|
51
52
|
end
|
52
53
|
else
|
@@ -54,6 +55,12 @@ module Etna
|
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
58
|
+
def self.encode_path_component(path_component)
|
59
|
+
form_encoded = URI.encode_www_form_component(path_component)
|
60
|
+
# Because of issues #1005, #1006, #1197
|
61
|
+
form_encoded.gsub('+', '%20')
|
62
|
+
end
|
63
|
+
|
57
64
|
def path(params=nil, &block)
|
58
65
|
self.class.path(@route, params, &block)
|
59
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etna
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.49
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saurabh Asthana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|