hmac-uri 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/hmac/uri.rb +3 -2
  2. metadata +3 -3
@@ -1,3 +1,4 @@
1
+ require 'cgi'
1
2
  require 'openssl'
2
3
  require 'addressable/uri'
3
4
 
@@ -8,13 +9,13 @@ module HMAC
8
9
  module QSParser
9
10
  def query_values
10
11
  query.to_s.split(/&/).each_with_object({}) do |pair, hash|
11
- key, value = pair.split(/=/, 2).map {|s| Addressable::URI.unescape(s)}
12
+ key, value = pair.split(/=/, 2).map {|s| CGI.unescape(s)}
12
13
  hash[key] = hash.key?(key) ? [hash[key], value].flatten : value
13
14
  end
14
15
  end
15
16
 
16
17
  def query_values= hash
17
- self.query = flatten_query_values(hash).map {|pair| pair.map {|s| Addressable::URI.escape(s.to_s)}.join('=')}.join('&')
18
+ self.query = flatten_query_values(hash).map {|pair| pair.map {|s| CGI.escape(s.to_s)}.join('=')}.join('&')
18
19
  end
19
20
 
20
21
  def flatten_query_values hash
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hmac-uri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-11 00:00:00.000000000 Z
12
+ date: 2012-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  segments:
72
72
  - 0
73
- hash: -980915294190373519
73
+ hash: 3090478760520236257
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements: