stripe 2.0.2 → 2.0.3

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: 203a5b9ecbdff5241e80f207970a695d0483f17b
4
- data.tar.gz: 8cd5ebeda987e07ce0bb38069e713052a70c4308
3
+ metadata.gz: 08477fe3a7d16944c6bb51978cfb8490fa353951
4
+ data.tar.gz: 8ded44a9360759b46bbe1624284e48c238795cb0
5
5
  SHA512:
6
- metadata.gz: 52cf35440d3ac310370f75deabb442e27293db303a2de5d0facadc6ec1f1f7a58143e5fc4a04ea46b4ad1f9dbc4357a6f6ef5ecc6778d191c32346fabb44073c
7
- data.tar.gz: 3a2c080ceab489e83ce9ce2b1bfdf8cfe5adfef8141c24aab535c44fdc21c256a5e592c724b12f509a902d42066379d1e8ba7e416117d06c313b0d2012c85bfd
6
+ metadata.gz: 5485338b4e399f6fd47f77e73995764d73fbfe75cbec8e67bb3650650972104a6b86d12b9ab3bcd32826574e211078bf9f12106eae0f156cccd8f383c08af37e
7
+ data.tar.gz: f4f25a6d1ccae7103d8c3ff3f2289dbb127f7246895fffa9d80d02da3c32a629f41894e5541f19dcc0f1c515f5912048d6ef970b2a7026427bc8d9dc2bbfc5cd
@@ -1,3 +1,7 @@
1
+ === 2.0.3 2017-03-16
2
+
3
+ * Fix marshalling of `StripeObjects` that have an embedded client
4
+
1
5
  === 2.0.2 2017-03-16
2
6
 
3
7
  * Fix bad field reference when recovering from a JSON parsing problem
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.2
1
+ 2.0.3
@@ -137,7 +137,12 @@ module Stripe
137
137
  end
138
138
 
139
139
  def _dump(level)
140
- Marshal.dump([@values, @opts])
140
+ # The StripeClient instance in @opts is not serializable and is not
141
+ # really a property of the StripeObject, so we exclude it when
142
+ # dumping
143
+ opts = @opts.clone
144
+ opts.delete(:client)
145
+ Marshal.dump([@values, opts])
141
146
  end
142
147
 
143
148
  def self._load(args)
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '2.0.2'
2
+ VERSION = '2.0.3'
3
3
  end
@@ -36,7 +36,15 @@ module Stripe
36
36
  end
37
37
 
38
38
  should "marshal a stripe object correctly" do
39
- obj = Stripe::StripeObject.construct_from({ :id => 1, :name => 'Stripe' }, {:api_key => 'apikey'})
39
+ obj = Stripe::StripeObject.construct_from(
40
+ { :id => 1, :name => 'Stripe' },
41
+ {
42
+ :api_key => 'apikey',
43
+ # StripeClient is not serializable and is expected to be removed
44
+ # when marshalling StripeObjects
45
+ :client => StripeClient.active_client,
46
+ }
47
+ )
40
48
  m = Marshal.load(Marshal.dump(obj))
41
49
  assert_equal 1, m.id
42
50
  assert_equal 'Stripe', m.name
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe