recurly 2.1.7 → 2.1.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of recurly might be problematic. Click here for more details.

@@ -1,3 +1,4 @@
1
+ require 'cgi'
1
2
  require 'net/https'
2
3
 
3
4
  module Recurly
@@ -37,7 +38,10 @@ module Recurly
37
38
  head.delete_if { |_, value| value.nil? }
38
39
  uri = base_uri + uri
39
40
  if options[:params] && !options[:params].empty?
40
- uri += "?#{options[:params].map { |k, v| "#{k}=#{v}" }.join '&' }"
41
+ pairs = options[:params].map { |key, value|
42
+ "#{CGI.escape key.to_s}=#{CGI.escape value.to_s}"
43
+ }
44
+ uri += "?#{pairs.join '&'}"
41
45
  end
42
46
  request = METHODS[method].new uri.request_uri, head
43
47
  request.basic_auth(*[Recurly.api_key, nil].flatten[0, 2])
@@ -115,7 +115,8 @@ module Recurly
115
115
  def paginate options = {}
116
116
  dup.instance_eval {
117
117
  @collection = @count = @etag = nil
118
- @options.update options and self
118
+ @options = @options.merge options
119
+ self
119
120
  }
120
121
  end
121
122
  alias scoped paginate
@@ -2,7 +2,7 @@ module Recurly
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- PATCH = 7
5
+ PATCH = 8
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recurly
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.7
4
+ version: 2.1.8
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: 2013-02-06 00:00:00.000000000 Z
12
+ date: 2013-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake