stripe-cli 1.4.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -0
- data/lib/stripe/cli/commands.rb +1 -0
- data/lib/stripe/cli/commands/gem_version.rb +15 -0
- data/lib/stripe/cli/runner.rb +3 -0
- data/lib/stripe/cli/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e80f1d57ef4dc58a1861afffe89fb67925e9e18
|
4
|
+
data.tar.gz: e9c1bc3994f909447a2887e06f6bf31975d6bc7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9ff0cccaaa562da79132577e2d308cea0de6ecd4d7bc6b1f84d1596a3f1653762496f04fca386c651297af0509d810f26ebfa16dbcc67ee259a42aa70113338
|
7
|
+
data.tar.gz: 9e007189817353f4ca84fee815ede932311b87f5ae6fd6bf0c7c27f6b0b624549afd00355a3a376ccd51f2ff937fb09381b9a71ea0d2c1ffd97dc5513574bc45
|
data/README.md
CHANGED
@@ -45,10 +45,31 @@ You may also store default configurations in a `~/.stripecli` file that conforms
|
|
45
45
|
|
46
46
|
![example config file](./example.png)
|
47
47
|
|
48
|
+
If this file exists, the specified default key is picked up and used automatically.
|
49
|
+
|
50
|
+
The current directory is now also checked for the existance of a `.stripecli` file. In which case, that file is used instead.
|
51
|
+
|
48
52
|
You may also overide the default environment setting in your config file by passing in the `-e` or `--env` option
|
49
53
|
|
50
54
|
$ stripe customers find cust_123 --env=live
|
51
55
|
|
56
|
+
If you manage separate Stripe accounts for several projects, I suggest creating a simple `.stripecli` file
|
57
|
+
at the root of each project declaring the test api key for the appropriate Stripe account.
|
58
|
+
|
59
|
+
For example `./.stripecli`:
|
60
|
+
|
61
|
+
key = sk_test_abcdef123456
|
62
|
+
|
63
|
+
or, if you'd rather:
|
64
|
+
|
65
|
+
default = test
|
66
|
+
[test]
|
67
|
+
key = sk_test_abcdef123456
|
68
|
+
[live]
|
69
|
+
key = sk_live_ghijkl789101
|
70
|
+
|
71
|
+
If you choose to go this route, make sure to add `.stripecli` to your `.gitignore` files.
|
72
|
+
|
52
73
|
## Usage
|
53
74
|
|
54
75
|
Commands:
|
data/lib/stripe/cli/commands.rb
CHANGED
@@ -14,6 +14,7 @@ module Stripe
|
|
14
14
|
autoload :Recipients, 'stripe/cli/commands/recipients'
|
15
15
|
autoload :Subscriptions, 'stripe/cli/commands/subscriptions'
|
16
16
|
autoload :Transfers, 'stripe/cli/commands/transfers'
|
17
|
+
autoload :Version, 'stripe/cli/commands/gem_version'
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Stripe
|
2
|
+
module CLI
|
3
|
+
module Commands
|
4
|
+
class Version < Command
|
5
|
+
desc "version", "display the current gem version number"
|
6
|
+
option :hide
|
7
|
+
def version
|
8
|
+
puts "stripe-cli v#{Stripe::CLI::VERSION}"
|
9
|
+
end
|
10
|
+
|
11
|
+
default_command :version
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/stripe/cli/runner.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
module Stripe
|
2
2
|
module CLI
|
3
3
|
class Runner < Thor
|
4
|
+
map "-v" => :version
|
5
|
+
map "--version" => :version
|
4
6
|
register Commands::Cards, 'cards', 'cards', 'find, list, create, & delete cards for both customers & recipients'
|
5
7
|
register Commands::Charges, 'charges', 'charges', 'find, list, create, capture, & refund charges'
|
6
8
|
register Commands::Customers, 'customers', 'customers', 'find, list, create, & delete customers'
|
@@ -14,6 +16,7 @@ module Stripe
|
|
14
16
|
register Commands::Recipients, 'recipients', 'recipients', 'find, list, create & delete recipients'
|
15
17
|
register Commands::Subscriptions, 'subscriptions', 'subscriptions', 'find, list, create & cancel multiple subscriptions per customer'
|
16
18
|
register Commands::Transfers, 'transfers', 'transfers', 'find, list, & create transfers'
|
19
|
+
register Commands::Version, 'version', 'version', 'display current gem version', hide: true
|
17
20
|
end
|
18
21
|
end
|
19
22
|
end
|
data/lib/stripe/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex MacCaw
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/stripe/cli/commands/coupons.rb
|
173
173
|
- lib/stripe/cli/commands/customers.rb
|
174
174
|
- lib/stripe/cli/commands/events.rb
|
175
|
+
- lib/stripe/cli/commands/gem_version.rb
|
175
176
|
- lib/stripe/cli/commands/invoices.rb
|
176
177
|
- lib/stripe/cli/commands/plans.rb
|
177
178
|
- lib/stripe/cli/commands/recipients.rb
|