1027 Commits

Author SHA1 Message Date
Brandur
357a99236a Add Committee/Sinatra + add Rack hack
We want to support older versions of Ruby so introduce a Rack hack to
get an older version of it that can run against them.
2017-02-14 12:17:37 -08:00
Brandur
4debb6ba5d Use one default connect per thread 2017-02-14 12:17:37 -08:00
Brandur
db72af0fdc Push Pry into MRI
The JRuby build seems to be having trouble.
2017-02-14 12:17:37 -08:00
Brandur
d4bcfd9f78 Refactor errors interfaces 2017-02-14 12:17:37 -08:00
Brandur
6dfea0d623 A few extra header tests 2017-02-14 12:17:37 -08:00
Brandur
2ade248e32 All tests working! 2017-02-14 12:17:37 -08:00
Brandur
31020c4596 Move profiling information to SystemProfiler + merge tests 2017-02-14 12:17:37 -08:00
Brandur
de08a9b986 Lots of broken tests, but working implementation! 2017-02-14 12:17:37 -08:00
Brandur
41f58e3cde Functional and tested StripeClient 2017-02-14 12:17:37 -08:00
Brandur
1c780e2b3f Working test suite! 2017-02-14 12:17:37 -08:00
Brandur
1886d9a625 Move to an alternative system based on StripeClient 2017-02-14 12:17:37 -08:00
Brandur
593bbab53f Use unambiguous wording "StripeResponse object" instead of "structure" 2017-02-14 12:17:37 -08:00
Brandur
b5ad0e30d7 Change to hash parameter for now for 1.9 support 2017-02-14 12:17:37 -08:00
Brandur
1412479bf6 Check that responses are set on API resources 2017-02-14 12:17:37 -08:00
Brandur
b365189ae9 Add tests for new .convert_to_stripe_object argument 2017-02-14 12:17:37 -08:00
Brandur
44fbe04bb7 Add test suite for StripeResponse 2017-02-14 12:17:37 -08:00
Brandur
843ea88219 Add a StripeResponse to objects created by API calls 2017-02-14 12:17:37 -08:00
Brandur
15f77a6e47 Merge pull request #496 from stripe/brandur-webmock
Use Webmock instead of Mocha for HTTP stubbing
2017-02-14 12:16:32 -08:00
Brandur
31b0ccfb33 Merge pull request #495 from stripe/brandur-kill-19
Remove support for Ruby 1.9
2017-02-14 12:12:03 -08:00
Brandur
3cf2ba3527 Use basic JSON.generate instead of make_response abstraction 2017-02-14 12:07:18 -08:00
Brandur
360d4e97ba Fix problems introduced by rebase + make consistent 2017-02-14 12:07:18 -08:00
Brandur
de700d3cc8 Convert the last set of tests 2017-02-14 12:07:18 -08:00
Brandur
d1d5b9d39d More tests converted 2017-02-14 12:07:18 -08:00
Brandur
0019cfdc7e More updated tests 2017-02-14 12:07:18 -08:00
Brandur
1ef1f79a16 Lots of fixed tests 2017-02-14 12:07:18 -08:00
Brandur
7ed2abffdd Remove support for Ruby 1.9
This has been discussed, but we'll finally be doing it for the next
major version so that we can introduce a few features that depend on
gems that don't support 1.9.
2017-02-14 12:07:18 -08:00
Brandur
ddaf36e00c Remove support for Ruby 1.9
This has been discussed, but we'll finally be doing it for the next
major version so that we can introduce a few features that depend on
gems that don't support 1.9.
2017-02-14 12:06:10 -08:00
Brandur
32530b1ad6 Merge pull request #500 from stripe/brandur-ruby-24
Add Ruby 2.4 to the build list
2017-02-02 10:27:06 -08:00
Brandur
622ea63281 Add Ruby 2.4 to the build list 2017-02-02 10:16:52 -08:00
Brandur
98c42e0b69 Bump version to 1.58.0 v1.58.0 2017-01-19 14:11:17 -08:00
Brandur
c46ec2b355 Merge pull request #494 from stripe/ob-sources-tests
Better tests for sources
2017-01-19 14:10:25 -08:00
Olivier Bellone
9735255318 Better tests for sources 2017-01-19 18:32:58 +01:00
Brandur
b291bce240 Alphabetize class name list 2017-01-13 12:41:35 -08:00
Brandur
6b697ae23a Merge pull request #491 from stripe/brandur-uname
Colocate uname helpers + tests
2017-01-13 11:46:11 -08:00
Brandur
4da4bd3ff3 Colocate uname helpers + tests
Colocates the helper methods for looking up a uname by renaming them to
have the same prefix as the base method (i.e. `get_uname`).

Also adds an additional rescue in case we try to run an executable on a
system but it wasn't founded (this should never happen).

Also adds some tests to make sure that each method gets at least a very
basic amount of exercise in the test suite.
2017-01-13 10:59:08 -08:00
Brandur
1b15101d8d Merge pull request #490 from stripe/brandur-errors-test
Add basic test for errors
2017-01-13 10:50:50 -08:00
Brandur
50a023a33b Add basic test for errors
Just adds a super simplistic test for the errors module. The win here is
to (hopefully) lower the friction a little bit the next time a feature
is introduced into errors because there's now suite where a new test can
be written.
2017-01-13 10:38:20 -08:00
Brandur
c3e1e82d9b Merge pull request #489 from stripe/brandur-consolidate-and-document-errors
Consolidate errors to one file + document them
2017-01-13 10:38:02 -08:00
Brandur
09c4885d31 Consolidate errors to one file + document them
Right now we have every error class in a separate file which doesn't do
anyone a lot of good, especially given that most of them are just stubs
that derive directly from `StripeError`.

This patch pulls them all into one file and gives them some
documentation. It follows #487 and #488 as minor refactoring work.
2017-01-13 10:28:10 -08:00
Brandur
aab50511a1 Merge pull request #488 from stripe/brandur-alphabetize-require-list
Alphabetize stripe.rb require list
2017-01-13 10:27:55 -08:00
Brandur
da1b87f1c6 Alphabetize stripe.rb require list
Alphabetizes the list of named model requires in stripe.rb. This makes
it a little easier to spot things, and makes the correct spot to insert
a new model fully deterministic.

This continues along the path of #487 in introducing minor cleanups.
2017-01-13 10:06:32 -08:00
Brandur
f957cfc088 Merge pull request #487 from stripe/brandur-alphabetize-stripe-rb
Alphabetize methods in lib/stripe.rb
2017-01-13 10:05:56 -08:00
Brandur
83201e1a48 Alphabetize methods in lib/stripe.rb
This one is unfortunately a lot of churn, but it's incredibly
frustrating how difficult it is to find methods in this file.

Here we alphabetize the methods, but do nothing else. Alphabetization
only occurs within visibility blocks, so visibility is not affected at
all.
2017-01-13 09:58:29 -08:00
Brandur
fb555a764e Bump version to 1.57.1 v1.57.1 2016-11-28 17:52:27 -08:00
Brandur
d9d28fef21 Merge pull request #483 from stripe/brandur-disallow-protected-field-set
Don't allow protected fields in `Save.update` API operation
2016-11-28 17:51:25 -08:00
Brandur
11a6eec5f5 Don't allow protected fields in Save.update API operation
As described in #481, adding a protected field like `legal_entity` as
part of an update API operation can cause some issues like a custom
encoding scheme not being considered and special handling around empty
values being ignored.

As a an easy fix for this, let's disallow access to protected fields in
the same way that we disallow them from being set directly on an
instance of a given model.

Helps address (but is not a complete fix for) #481.
2016-11-28 11:42:57 -08:00
Brandur
58184c2039 Bump version to 1.57.0 v1.57.0 2016-11-21 18:03:06 -08:00
Brandur
ae3e6db268 Merge pull request #480 from stripe/ob-3ds-retrieve
Adds 3DS retrieve endpoint
2016-11-21 18:02:20 -08:00
Olivier Bellone
4122f9bbb3 Adds 3DS retrieve endpoint 2016-11-21 19:36:58 +01:00
Brandur
b3828b6736 Bump version to 1.56.2 v1.56.2 2016-11-17 11:54:35 -08:00