stripe-cli 1.4.1 → 1.4.3

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: 6caf751acf51346f9ff98bffde8d51d5f01e2baa
4
- data.tar.gz: b7b9f7308e562dfa839e010367f32b5f5722775c
3
+ metadata.gz: 1e80f1d57ef4dc58a1861afffe89fb67925e9e18
4
+ data.tar.gz: e9c1bc3994f909447a2887e06f6bf31975d6bc7f
5
5
  SHA512:
6
- metadata.gz: b2c8aea05bd46d0705492a0dcaa4564814d3a1b2317af2bd07f325899051bd0b5a9d9134425c02f00edda5990df35bfe6d4e05e01f277c21a3d14a5015ae3ebc
7
- data.tar.gz: e21efa419026ea0712e58169df89c92dfefd0a75740a8720a20bd0a2d92dd7a0e32d786e2850aea911e76106e1c143341305c0cc4068ea07c3c6880591f9880f
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:
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Stripe
2
2
  module CLI
3
- VERSION = "1.4.1"
3
+ VERSION = "1.4.3"
4
4
  end
5
5
  end
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.1
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-10 00:00:00.000000000 Z
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