stripe 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/VERSION +1 -1
- data/lib/stripe/stripe_object.rb +6 -1
- data/lib/stripe/version.rb +1 -1
- data/test/stripe/stripe_object_test.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b491a85852c3b17ea12c480ae456f163e0862d9
|
4
|
+
data.tar.gz: d1c4cefdc8963ebf96bf7e68c2319e55d95c04a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d38841dad3272ef61d8658def6fbaf5b153c011a832f3e5a13c076bfd740a363e86980fb7cee7d89c693fd4c33a6f82e256a9d6fdd263ea53d03ef830aeebeb
|
7
|
+
data.tar.gz: 8384f1ab4c1416cea101e424c431707ab10a703d986418c6aa77aa323feed629005532a8634ad6bb099195564a9727f7288693c1cb79d8bf02fe883507e103fd
|
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
data/lib/stripe/stripe_object.rb
CHANGED
@@ -263,8 +263,13 @@ module Stripe
|
|
263
263
|
if name.to_s.end_with?('=')
|
264
264
|
attr = name.to_s[0...-1].to_sym
|
265
265
|
|
266
|
+
# Pull out the assigned value. This is only used in the case of a
|
267
|
+
# boolean value to add a question mark accessor (i.e. `foo?`) for
|
268
|
+
# convenience.
|
269
|
+
val = args.first
|
270
|
+
|
266
271
|
# the second argument is only required when adding boolean accessors
|
267
|
-
add_accessors([attr], {})
|
272
|
+
add_accessors([attr], { attr => val })
|
268
273
|
|
269
274
|
begin
|
270
275
|
mth = method(name)
|
data/lib/stripe/version.rb
CHANGED
@@ -80,6 +80,13 @@ module Stripe
|
|
80
80
|
refute obj.respond_to?(:not_bool?)
|
81
81
|
end
|
82
82
|
|
83
|
+
should "assign question mark accessors for booleans added after initialization" do
|
84
|
+
obj = Stripe::StripeObject.new
|
85
|
+
obj.bool = true
|
86
|
+
assert obj.respond_to?(:bool?)
|
87
|
+
assert obj.bool?
|
88
|
+
end
|
89
|
+
|
83
90
|
should "mass assign values with #update_attributes" do
|
84
91
|
obj = Stripe::StripeObject.construct_from({ :id => 1, :name => 'Stripe' })
|
85
92
|
obj.update_attributes(:name => 'STRIPE')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|