stripe 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56289c98f08528b168c3dc085adb3995860ba592
4
- data.tar.gz: a81ca76c80f068d42b50e7d36e7c0cca806c2307
3
+ metadata.gz: 2b491a85852c3b17ea12c480ae456f163e0862d9
4
+ data.tar.gz: d1c4cefdc8963ebf96bf7e68c2319e55d95c04a1
5
5
  SHA512:
6
- metadata.gz: 7ad0a86236a89c17c1c685c846a0d904eb96b6ff8d1da908b3962b5b9e8af9d51ce61c7629fbbeccc6f823233defdf1ad7666272bbe7e4617efe9af582242c5f
7
- data.tar.gz: 85c428fe3b079cb2d65211e3b0391037a859d80e136031c726ffbebfc0780faa64a2ba3d415219ca520521086e45e8af434469cbe1da3b1f72de514d500acbce
6
+ metadata.gz: 2d38841dad3272ef61d8658def6fbaf5b153c011a832f3e5a13c076bfd740a363e86980fb7cee7d89c693fd4c33a6f82e256a9d6fdd263ea53d03ef830aeebeb
7
+ data.tar.gz: 8384f1ab4c1416cea101e424c431707ab10a703d986418c6aa77aa323feed629005532a8634ad6bb099195564a9727f7288693c1cb79d8bf02fe883507e103fd
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 2.3.0 2017-04-14
2
+
3
+ * Add question mark accessor when assigning boolean value to undefined field
4
+
1
5
  === 2.2.1 2017-04-07
2
6
 
3
7
  * Declare minimum required Faraday as 0.9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.1
1
+ 2.3.0
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '2.2.1'
2
+ VERSION = '2.3.0'
3
3
  end
@@ -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.2.1
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-07 00:00:00.000000000 Z
11
+ date: 2017-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday