22 Commits

Author SHA1 Message Date
Olivier Bellone
56430ad405
Add support for coveralls.io 2017-12-08 17:48:40 -08:00
Olivier Bellone
e02ff7f849
Start using RuboCop for linting 2017-09-27 21:28:25 +02:00
Brandur
1ca67cb954 Correct behavior for error logging
A few changes:

* Add a new `Util.log_error` method which will forward to the equivalent
  of `#error` on a logger.
* Move errors produced by `StripeClient` to use `Util.log_error`.
* Change standard stdout logging behavior to log to stderr in the case
  of `Util.log_error.
* Change `Stripe.log_level` values to be an enum in a similar fashion as
  the standard library's built in `Logger`.
2017-08-11 11:45:43 -07:00
Brandur
ce69d749e1 Implement STRIPE_LOG for stripe-ruby
Adds logging support for stripe-ruby in a similar way that we did it for
stripe-python [1], with the idea that users you can optionally get some
additional low-cost-to-configure logging for operational visibility or
debugging.

I made a few tweaks from the Python implementation (which I'll try to
contribute back to there):

* Added an elapsed parameter to responses so you can tell how long they
  lasted.
* Mixed in idempotency_key to all lines that users have a way to
  aggregate logs related to a request from start to finish.
* Standardized naming between different log lines as much as possible.
* Detect a TTY and produce output that's colorized and formatted.

[1] https://github.com/stripe/stripe-python/pull/269
2017-08-03 13:39:15 -07:00
Brandur
00180c5f35 Power test suite with stripe-mock
Moves away from Committee and towards stripe-mock, an external
self-contained executable API stub server based on OpenAPI [1]. The
motivation here is that instead of making stripe-ruby a special
snowflake, we can use a single well-tested and feature-rich mock
implementation to drive every API's test suite.

[1] https://github.com/stripe/stripe-mock
2017-07-31 13:25:48 -07:00
Robin Brandt
d08ec9895d Fix documentation for getting a request id
The last response is returned as a second return value of
Stripe::StripeClient#request.
2017-06-12 15:51:08 -04:00
Brandur
b44744db39 Add section for configuring timeouts to README
Timeouts are about to come to stripe-java [1], so for consistency we
mirror the README section that we're going to be adding over there.

[1] https://github.com/stripe/stripe-java/pull/369
2017-04-27 14:03:27 -07:00
Brandur
6acd21ac48 Support "app info" for plugins in Ruby
Adds support for "app info" (a mechanism that allows a plugin's author
to identify that plugin) in Ruby. This is already supported in PHP and
we're adding it elsewhere.
2017-04-14 14:37:01 -07:00
Brandur
f9fda0ed4c Small update for wording consistency and Vim hint 2017-03-28 12:16:45 -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
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
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
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
Wojciech Wnętrzak
bb6838b5a9
Fixed description about DELETE request retries
[ci skip]
2016-10-03 14:18:47 +02:00
Brandur
0ef5c629f9 Add stripe_account in here as well 2016-08-17 13:56:50 -07:00
Brandur
b2d0490a86 Add usage information for using an API key with a list operation 2016-08-10 11:28:52 -07:00
Brandur
af68678895 Add usage section to README
Add a section that contains basic usage information to the README.
2016-08-10 11:00:41 -07:00
Romain Huet
2026c06242 Update the Travis CI badge 2016-07-12 18:55:38 -07:00
Brandur
f7717208ae Change README to Markdown
This is kind of a bike shed, but at this point it's a little more clear
that Markdown has won the format wars and that people are a little more
used to seeing/editing it.

This moves the `README` to Markdown and also includes some minor
cleanup:

* Fixes a broken reference link (`curl`).
* Normalizes lines to 80 characters.
* Normalizes code snippets to be prefixed by four spaces.
* Normalizes sentence to be separately by only a single space.
2016-02-22 16:07:07 -08:00