stripe 1.30.1 → 1.30.2

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: a744255415d993917d419962d5f1420b8daed37d
4
- data.tar.gz: 1c9085d745949c729e3c9caa3e986d16c6373eda
3
+ metadata.gz: a832c74b94a7a2346a38e3053363aa80f31b04d5
4
+ data.tar.gz: 2b0d72e9641fdde9d3a4db16e39407ceb33ecd6b
5
5
  SHA512:
6
- metadata.gz: 02b09d3707b1861f069cbd46124fe5c03aa86a44f47973a01315156056765404ddc54423b6479141f56cb1cd9ef28679dcfed3147d98e65d11835eb5622a275f
7
- data.tar.gz: 1f7d8ccf6eac75aea02b7935587f8448d363601f92f1f5245ebb4639e6f9a6c9f71f0201c88a14d86a6e172dab79351088bd103ae47230718b18a47340dc9c17
6
+ metadata.gz: 019e999e649b2f9e39dd0a900aec1b0b44ff19a740ea37663f67ca77749fc93f540b7c4c588e47e30ba050be9ffaca7a8e7d43ccbd518c1781bcc92c077fa3e7
7
+ data.tar.gz: 692e479177426a0b3974ffa7ed6d5725e01b40ddd61afd0c42fe133b764a0f6b3201afb387f8f17efe7a7d66ed1e5e06e892f21c37a88fc172cdde4d4a3b3700
@@ -1,7 +1,11 @@
1
+ === 1.30.2 2015-10-12
2
+
3
+ * Fix bug where `opts` didn't properly propagate to descendant `StripeObjects`
4
+
1
5
  === 1.30.1 2015-10-10
2
6
 
3
7
  * Fix bug that prevent lists of hashes from being URI-encoded properly
4
- * Fix bug where filter conditions were not making it fast the first instantiated `ListObject`
8
+ * Fix bug where filter conditions were not making it past the first instantiated `ListObject`
5
9
 
6
10
  === 1.30.0 2015-10-09
7
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.30.1
1
+ 1.30.2
@@ -333,7 +333,7 @@ module Stripe
333
333
  @unsaved_values.delete(k)
334
334
  end
335
335
 
336
- update_attributes(values, :opts => opts)
336
+ update_attributes(values, opts)
337
337
  values.each do |k, _|
338
338
  @transient_values.delete(k)
339
339
  @unsaved_values.delete(k)
@@ -341,36 +341,5 @@ module Stripe
341
341
 
342
342
  self
343
343
  end
344
-
345
- # Mass assigns attributes on the model.
346
- #
347
- # This is a version of +update_attributes+ that takes some extra options
348
- # for internal use.
349
- #
350
- # ==== Options
351
- #
352
- # * +:opts:+ Options for StripeObject like an API key.
353
- # * +:raise_error:+ Set to false to suppress ArgumentErrors on keys that
354
- # don't exist.
355
- def update_attributes_with_options(values, options={})
356
- # `opts` are StripeObject options
357
- opts = options.fetch(:opts, {})
358
- raise_error = options.fetch(:raise_error, true)
359
-
360
- values.each do |k, v|
361
- if !@@permanent_attributes.include?(k) && !self.respond_to?(:"#{k}=")
362
- if raise_error
363
- raise ArgumentError,
364
- "#{k} is not an attribute that can be assigned on this object"
365
- else
366
- next
367
- end
368
- end
369
-
370
- @values[k] = Util.convert_to_stripe_object(v, opts)
371
- @unsaved_values.add(k)
372
- end
373
- self
374
- end
375
344
  end
376
345
  end
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '1.30.1'
2
+ VERSION = '1.30.2'
3
3
  end
@@ -84,5 +84,20 @@ module Stripe
84
84
  $stderr = old_stderr
85
85
  end
86
86
  end
87
+
88
+ should "pass opts down to children when initializing" do
89
+ opts = { :custom => "opts" }
90
+
91
+ # customer comes with a `sources` list that makes a convenient object to
92
+ # perform tests on
93
+ customer = Stripe::Customer.construct_from(make_customer, opts)
94
+
95
+ source = customer.sources.first
96
+ # Pulling `@opts` as an instance variable here is not ideal, but it's
97
+ # important enough argument that the test here is worth it. we should
98
+ # consider exposing it publicly on a future pull (and possibly renaming
99
+ # it to something more useful).
100
+ assert_equal opts, source.instance_variable_get(:@opts)
101
+ end
87
102
  end
88
103
  end
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: 1.30.1
4
+ version: 1.30.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Boucher
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-10 00:00:00.000000000 Z
12
+ date: 2015-10-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client