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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e558d3d5cb419bdcdeda967aae9565a3ab0d123e
4
- data.tar.gz: 4735bf832f00703cf2819de2799ab81f8e4d7abc
3
+ metadata.gz: 5f783d23a751f2dc5ac034dfd44b9a844d6d2b7e
4
+ data.tar.gz: 72b98745c8e1d4187d3028f15fc95a11d15b0912
5
5
  SHA512:
6
- metadata.gz: ac154d346b4ae2c7e7e765fe66d02ce322776549184dd31256b9b7c80fe4e03223a43eaf3d23968a48ad0945e285e297f8c34335cef75dd0306127d803001747
7
- data.tar.gz: 056fb5a70162aa72c6e758ed3df9e4559d2da8a7ae8c46b26a6752545cfc76759c611a677268c62531950d9a253769609e5ac25e956ac2b61377b1658cbd7c4a
6
+ metadata.gz: fcee4d5a86b61d289ae9af021a5a7b980edfad4443e22dbe13c8f16f55adb3a218539590ffd34e605d62860f0ac7fab75a82172d908a79d52025b4988ef2be7e
7
+ data.tar.gz: 6b348aefebe8e64622ae9ac04d2d6fb8d45e73257be29fb183132fd1bab7d2e1aa6bbcd933b9d4bb9c0c25efd5cb9d6dfe8814edae2378510dd6aa5e47d83860
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Excon
3
3
  module Addressable
4
- VERSION = '0.3.0'
4
+ VERSION = '0.3.1'
5
5
  end
6
6
  end
@@ -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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon-addressable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean