bypass 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 241540206797fc2ee8bb927912833a4ee8146acc
4
- data.tar.gz: 3d107907b49d2a7ff4bfc1852212fef76f05dbbe
3
+ metadata.gz: 714bf5827bed4b9dc48e2e8b02331d3ea037dbcb
4
+ data.tar.gz: 8308c92ac4c09c9f43ec0829014b372b45912f22
5
5
  SHA512:
6
- metadata.gz: c34514af9628da625ad96c9d20b070fa890b0bdf252105f1b2c62c88ee7ddc81c79b1abfe0ea26c6e2277dc89ffbafad984dec87368f4166eb2aa1528da59797
7
- data.tar.gz: 30a6d0eab06f840b8308c32b28c823a61ff8025acf273c51c4483f21770796dd3c33e50f8d4b7a051b6daff35978d17137f56d8dc3f7e0c57fe198f5df11f44b
6
+ metadata.gz: 961a97ba6833870c7dbee87389ec2b98795b402baa2c879726f8c0b5d26e585a1234252fb8b6b6cd3da4142cd5e5c494685cb28579ca948f2594d8fc08595532
7
+ data.tar.gz: 9a915ca624bb6bb3913834f322d3ba2985eff78a74abaa92f70f622d155afed1ac804e30e06bdd842268640143efc01b99a62b7b282e50762fd339b216aef099
data/lib/bypass/uri.rb CHANGED
@@ -4,8 +4,8 @@ module Bypass
4
4
  class URI < Addressable::URI
5
5
  def append_to_query_values(params = {})
6
6
  pairs = params.keys.map do |raw_key|
7
- key = self.class.encode(raw_key.to_s)
8
- val = self.class.encode(params[raw_key])
7
+ key = CGI.escape(raw_key.to_s)
8
+ val = CGI.escape(params[raw_key])
9
9
  [key, val].join("=")
10
10
  end
11
11
 
@@ -1,3 +1,3 @@
1
1
  module Bypass
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -35,13 +35,13 @@ class Bypass::URITest < MiniTest::Test
35
35
  should "encode keys" do
36
36
  uri = Bypass::URI.parse("http://www.getdrip.com")
37
37
  uri.append_to_query_values("first name" => "Ian")
38
- assert_equal "http://www.getdrip.com?first%20name=Ian", uri.to_s
38
+ assert_equal "http://www.getdrip.com?first+name=Ian", uri.to_s
39
39
  end
40
40
 
41
41
  should "encode values" do
42
42
  uri = Bypass::URI.parse("http://www.getdrip.com")
43
43
  uri.append_to_query_values(:name => "Ian Nance")
44
- assert_equal "http://www.getdrip.com?name=Ian%20Nance", uri.to_s
44
+ assert_equal "http://www.getdrip.com?name=Ian+Nance", uri.to_s
45
45
  end
46
46
  end
47
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bypass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derrick Reimer