stripe 1.5.15 → 1.5.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stripe.rb +11 -2
- data/lib/stripe/version.rb +1 -1
- metadata +4 -4
data/lib/stripe.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# Stripe Ruby bindings
|
2
2
|
# API spec at http://stripe.com/api/spec
|
3
|
-
# Authors: Ross Boucher <boucher@stripe.com> and Greg Brockman <gdb@stripe.com>
|
4
3
|
require 'cgi'
|
5
4
|
require 'set'
|
6
5
|
|
@@ -482,8 +481,18 @@ module Stripe
|
|
482
481
|
payload = params
|
483
482
|
end
|
484
483
|
|
484
|
+
# There's a bug in some version of activesupport where JSON.dump
|
485
|
+
# stops working
|
486
|
+
begin
|
487
|
+
headers = { :x_stripe_client_user_agent => JSON.dump(ua) }.merge(headers)
|
488
|
+
rescue => e
|
489
|
+
headers = {
|
490
|
+
:x_stripe_client_raw_user_agent => ua.inspect,
|
491
|
+
:error => "#{e} (#{e.class})"
|
492
|
+
}.merge(headers)
|
493
|
+
end
|
494
|
+
|
485
495
|
headers = {
|
486
|
-
:x_stripe_client_user_agent => JSON.dump(ua),
|
487
496
|
:user_agent => "Stripe/v1 RubyBindings/#{Stripe::VERSION}"
|
488
497
|
}.merge(headers)
|
489
498
|
opts = {
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 35
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 16
|
10
|
+
version: 1.5.16
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ross Boucher
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-09-
|
19
|
+
date: 2011-09-08 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rest-client
|