1027 Commits

Author SHA1 Message Date
Brandur
96e03a8443 Update some OpenAPI repository conventions
See [1] for details, but a few conventions changed around the structure
of the OpenAPI repository and the data within the fixtures file. Here we
put in some minor changes to compensate for them.

[1] https://github.com/stripe/openapi/pull/3
2017-03-23 16:28:36 -07:00
Brandur
0727e11a5b Bump version to 2.1.0 v2.1.0 2017-03-17 12:17:00 -07:00
Brandur
53f97b5000 Merge pull request #515 from stripe/ob-delete-sources
Adds support for detaching sources from customers
2017-03-17 12:15:56 -07:00
Olivier Bellone
433c660cfe Fix sources 2017-03-17 16:11:05 +01:00
Olivier Bellone
58a965523a Fix cards 2017-03-17 16:11:05 +01:00
Olivier Bellone
89f207f993 Update fixtures files 2017-03-17 16:11:05 +01:00
Olivier Bellone
b8e6a385cf Adds support for detaching sources from customers 2017-03-17 16:11:05 +01:00
Brandur
c9a3c7933b Bump version to 2.0.3 v2.0.3 2017-03-16 13:03:27 -07:00
Brandur
bb53b3e63f Merge pull request #516 from stripe/ob-fix-512
Exclude client when dumping objects
2017-03-16 13:02:34 -07:00
Olivier Bellone
d3e40bb1de Exclude client when dumping objects 2017-03-16 20:54:13 +01:00
Brandur
66d8ecd0d0 Bump version to 2.0.2 v2.0.2 2017-03-16 09:06:27 -07:00
Brandur
da9d8f7353 Merge pull request #517 from iamvery/fix-typo-in-json-error-handling
Replace invalid message Faraday::Response#code with valid #status
2017-03-16 09:02:10 -07:00
Jay Hayes
20553e7422 Replace invalid message Faraday::Response#code with valid #status
The Faraday::Response object does not respond to #code. The correct
message is #status. It seems this case was previously unhandled by the
test suite as there was no case for the server responding "success" with
an invalid JSON body.
2017-03-16 06:24:45 -05:00
Brandur
ae5bf8d460 Merge pull request #514 from stripe/brandur-update-certs-url
Point certificate bundle URL directly at cURL
2017-03-15 13:20:08 -07:00
Brandur
f4e0de5974 Also update our certificate bundle for good measure 2017-03-15 10:46:35 -07:00
Brandur
90344eeaa0 Point certificate bundle URL directly at cURL
We were using this GitHub link instead because the cURL site didn't
support HTTPS for the longest time. They do now, so repoint this URL.
2017-03-15 10:44:59 -07:00
Brandur
eb0883ee75 Merge pull request #513 from stripe/brandur-update-spec
Add Rake task to update OpenAPI specification
2017-03-14 23:52:10 -07:00
Brandur
effce7f181 Rename schema_data to spec_data for consistency 2017-03-14 17:07:50 -07:00
Brandur
4d7019bee6 Move OpenAPI spec from spec/ to openapi/
Naming a directory `spec` in a Ruby project is terribly ambiguous. This
clarifies the purpose of this directory and makes it easier to find if
you know that you're looking for OpenAPI.
2017-03-14 17:07:50 -07:00
Brandur
3b193db847 Add script to update the OpenAPI specification
Also fixes the task to retrieve a CA bundle which broke on the upgrade
from rest-client to Faraday.
2017-03-14 17:07:49 -07:00
Brandur
8564d3b629 Update bundle OpenAPI specification 2017-03-14 16:50:50 -07:00
Brandur
edac0b2c51 Merge pull request #511 from stripe/brandur-readme-update
Prefer use of the word "library" over "bindings"
2017-03-14 10:43:07 -07:00
Brandur
677454efe8 Link directly to API keys 2017-03-14 10:41:33 -07:00
Brandur
a84d8e7691 s/SDK/library/ 2017-03-14 10:38:54 -07:00
Brandur
500ace9f7b Prefer use of the word "SDK" over "bindings"
Minor difference in vernacular, but as noted in stripe/stripe-node#312,
the usage of the word "bindings" is unusual outside of Stripe.
2017-03-13 16:09:52 -07:00
Brandur
8f817b8365 Merge pull request #509 from stripe/brandur-bump-api-spec
Bump OpenAPI spec to latest
2017-02-24 10:19:12 -08:00
Brandur
6393ea6416 Expect cards instead of tokens 2017-02-23 18:12:51 -08:00
Brandur
3a0417c648 Add latest API spec and fixtures 2017-02-23 18:12:43 -08:00
Brandur
1bb9ac48b9 Bump version to 2.0.1 v2.0.1 2017-02-22 08:11:30 -08:00
Brandur
083038e7c0 Merge pull request #508 from stripe/brandur-fix-file-uploads
Properly encode file uploads
2017-02-22 08:07:53 -08:00
Brandur
77c8535fa3 Properly encode file uploads
As described in #506, file uploads were broken on the way over to
Faraday and unfortunately I didn't catch it because the file upload
creation test wasn't using a matcher that was strict enough to really
catch anything.

Here we add the multipart middleware to our Faraday connection, add a
compatibility layer to `FileUpload` so that we can support `File` like
the rest-client based version always did (Faraday generally expects an
`UploadIO` object), and then tighten up our tests so that we'd be able
to catch future regressions.

Fixes #506.
2017-02-21 17:35:21 -08:00
Brandur
ea90ddb6d3 Bump version to 2.0.0 v2.0.0 2017-02-14 14:24:40 -08:00
Brandur
150432183a Merge pull request #505 from stripe/brandur-update-readme
Update README
2017-02-14 14:14:19 -08:00
Brandur
5dd5d2b608 Merge pull request #499 from stripe/brandur-openapi-test-suite
100% OpenAPI-powered test suite
2017-02-14 12:48:33 -08:00
Brandur
7d186618fc Update README
Adds a section on configuring a custom client, makes certain sections
more terse, and rewrites the "configuration section" to be more
consistent and prominent.
2017-02-14 12:48:07 -08:00
Brandur
d8f3609f25 Don't shadow outer variable 2017-02-14 12:19:16 -08:00
Brandur
9bf2f67f0c Remove some internal/deprecated API methods 2017-02-14 12:17:37 -08:00
Brandur
d917480324 Add descriptions for has_more 2017-02-14 12:17:37 -08:00
Brandur
9f150d8b05 New version of specs, now with list annotations 2017-02-14 12:17:37 -08:00
Brandur
6eae453735 Commit various spec improvements 2017-02-14 12:17:37 -08:00
Brandur
6b2e3c1eb5 Update create params for methods that were previously too forgiving 2017-02-14 12:17:37 -08:00
Brandur
b1adb9a1e9 Update OpenAPI spec 2017-02-14 12:17:37 -08:00
Brandur
d101b3a7a1 Remove OverrideSinatra and its features because they're unused
I'd originally added this class for the first stub pass that used
OpenAPI because I thought we'd need the ability to finetune some of our
stubbed responses. It turns out that we've been able to get away without
it so far so I'm removing it for now. This commit can be reverted if it
turns out that we need it back later.
2017-02-14 12:17:37 -08:00
Brandur
b0b219844c Fix wording: hyper-schema is now OpenAPI spec 2017-02-14 12:17:37 -08:00
Brandur
03af6d0ac8 Add .gitattributes to suppress spec changes in diffs 2017-02-14 12:17:37 -08:00
Brandur
02ea970f67 Remove all resource-related test data
Now that we're powering all test suites with the fixture data that's
generated along with the OpenAPI spec, we don't need this secondary
sample data anymore. Remove all of it except for helpers to simulate
different types of error responses.
2017-02-14 12:17:37 -08:00
Brandur
3f549fb5ad Port all tests over to OpenAPI
Follows the path established in 2d75c8f by porting the rest of
stripe-ruby's tests over to OpenAPI. There are a few other changes here
where I've removed some tests that are duplicated or don't make much
sense, or reorganized how we test certain things, but this commit is
largely the same migration operation applied in bulk a few dozen test
suites.
2017-02-14 12:17:37 -08:00
Brandur
5f4eff7e35 Port charge test suite to use OpenAPI spec
Ports the charge test suite over to use the stub server which is powered
by the OpenAPI spec and its fixtures.

We also introduce a number of conventions here especially around test
case naming and assertions that we'll diffuse to all other test suites
as we port them over. The entire set of tests is internally inconsistent
because of how each new module and resource was added incrementally over
time and while no strong conventions existed.
2017-02-14 12:17:37 -08:00
Brandur
f0579950a7 Add testing infrastructure to use spec and fixtures
Adds some testing infrastructure that reads in the OpenAPI spec and its
fixtures. These changes will allow us to starting porting over each of
stripe-ruby's test suites.
2017-02-14 12:17:37 -08:00
Brandur
e9d4e27a4b Add OpenAPI spec + fixture data
This adds an OpenAPI spec for the Stripe API and sample responses for
all top-level resources. We will use the spec and the samples to power
the stripe-ruby test suite.
2017-02-14 12:17:37 -08:00