pincers 0.7.1 → 0.7.2

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: 687162c2ca445449ffdacc2890cd9e94182317da
4
- data.tar.gz: bf7434146ce2516a3d5b5cae8ac9f9cebd03a4ae
3
+ metadata.gz: d5aaa42341e45a15e71098302b79cf2ebc4527f4
4
+ data.tar.gz: f2f0ea340f2dfa35028634b95f79e880e74b7941
5
5
  SHA512:
6
- metadata.gz: c8d1a5595a9b19c1ed239ed081e101e4df882522752d79c096802978d04fb5b6395ef63d628078d8ef81828f9216e794ba338ae3a73716da21987ba174b561a3
7
- data.tar.gz: 2fa86573efa8cb6ccb0e1d26eb2c4e892d3a8e6fae2009a70f3308ec3d3decc29a5c081312067d542de22ca2898f33cbbb6e527c048088f90bca1771a8762e0b
6
+ metadata.gz: ad04a3a48bd9694b635a50e565396d92539b15750e160c3897d3b12f89a5378b193be903dffcc777c7c891dbfc7a2ca9b24cbcf7fa63dd59fcfb450556e96a40
7
+ data.tar.gz: f98a91908ee6bf5a5811746bfb22c9f94ba2c8896ff822beef8ec9444280200af989d107b6005d0fa39f6ac04f4fedb5102b6935f0a72166ae94d625800c8eed
@@ -1,5 +1,6 @@
1
1
  require 'pincers/core/cookies'
2
2
  require 'pincers/core/search_context'
3
+ require 'pincers/http/utils'
3
4
 
4
5
  module Pincers::Core
5
6
  class RootContext < SearchContext
@@ -41,7 +42,7 @@ module Pincers::Core
41
42
  end
42
43
 
43
44
  def uri
44
- URI.parse url
45
+ Pincers::Http::Utils.parse_uri url
45
46
  end
46
47
 
47
48
  def title
@@ -1,9 +1,12 @@
1
+ require 'uri'
2
+
1
3
  module Pincers::Http
2
4
  module Utils
3
5
  extend self
4
6
 
5
7
  FORM_URLENCODED = 'application/x-www-form-urlencoded'
6
8
  FORM_MULTIPART = 'multipart/form-data'
9
+ URI_PARSER = URI::Parser.new(:UNRESERVED => URI::REGEXP::PATTERN::UNRESERVED + '|')
7
10
 
8
11
  def encode_urlencoded(_pairs)
9
12
  _pairs = hash_to_pairs _pairs if _pairs.is_a? Hash
@@ -19,7 +22,7 @@ module Pincers::Http
19
22
  end
20
23
 
21
24
  def parse_uri(_url)
22
- URI.parse _url
25
+ URI_PARSER.parse _url
23
26
  end
24
27
 
25
28
  private
@@ -1,3 +1,3 @@
1
1
  module Pincers
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pincers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ignacio Baixas