excon-addressable 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/excon/addressable/version.rb +1 -1
- data/lib/excon/addressable.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f783d23a751f2dc5ac034dfd44b9a844d6d2b7e
|
4
|
+
data.tar.gz: 72b98745c8e1d4187d3028f15fc95a11d15b0912
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcee4d5a86b61d289ae9af021a5a7b980edfad4443e22dbe13c8f16f55adb3a218539590ffd34e605d62860f0ac7fab75a82172d908a79d52025b4988ef2be7e
|
7
|
+
data.tar.gz: 6b348aefebe8e64622ae9ac04d2d6fb8d45e73257be29fb183132fd1bab7d2e1aa6bbcd933b9d4bb9c0c25efd5cb9d6dfe8814edae2378510dd6aa5e47d83860
|
data/lib/excon/addressable.rb
CHANGED
@@ -5,6 +5,8 @@ require 'excon'
|
|
5
5
|
require 'excon/addressable/parser'
|
6
6
|
require 'excon/addressable/version'
|
7
7
|
|
8
|
+
Excon.defaults[:uri_parser] = Excon::Addressable::Parser
|
9
|
+
|
8
10
|
module Excon
|
9
11
|
module Addressable
|
10
12
|
# Middleware
|
@@ -13,9 +15,8 @@ module Excon
|
|
13
15
|
#
|
14
16
|
class Middleware < Excon::Middleware::Base
|
15
17
|
def request_call(datum)
|
16
|
-
datum[:uri_parser] = Parser
|
17
|
-
|
18
18
|
url = ::Addressable::URI.new(datum)
|
19
|
+
|
19
20
|
if (template = ::Addressable::Template.new(url)) && template.variables.any?
|
20
21
|
uri = template.expand(datum[:expand].to_h)
|
21
22
|
datum.merge!(uri.to_hash)
|