-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathstripe.rb
59 lines (54 loc) · 1.96 KB
/
stripe.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Stripe < Formula
desc "Stripe CLI utility"
homepage "https://stripe.com"
version "1.24.0"
depends_on :macos
if Hardware::CPU.intel?
url "https://github.com/stripe/stripe-cli/releases/download/v1.24.0/stripe_1.24.0_mac-os_x86_64.tar.gz"
sha256 "2fcb21494b28ad01e2bf8613457b3b80c13786ec5f0308fc8294549dda8702dd"
def install
bin.install "stripe"
rm Dir["#{bin}/{stripe-completion.bash,stripe-completion.zsh}"]
system bin/"stripe", "completion", "--shell", "bash"
system bin/"stripe", "completion", "--shell", "zsh"
bash_completion.install "stripe-completion.bash"
zsh_completion.install "stripe-completion.zsh"
(zsh_completion/"_stripe").write <<~EOS
#compdef stripe
_stripe () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/stripe-completion.zsh
if [[ -f $e ]]; then source $e; fi
}
EOS
end
end
if Hardware::CPU.arm?
url "https://github.com/stripe/stripe-cli/releases/download/v1.24.0/stripe_1.24.0_mac-os_arm64.tar.gz"
sha256 "f07743f411845162992830d2af7c786a06995f09cb3f090213b84d36020e57af"
def install
bin.install "stripe"
rm Dir["#{bin}/{stripe-completion.bash,stripe-completion.zsh}"]
system bin/"stripe", "completion", "--shell", "bash"
system bin/"stripe", "completion", "--shell", "zsh"
bash_completion.install "stripe-completion.bash"
zsh_completion.install "stripe-completion.zsh"
(zsh_completion/"_stripe").write <<~EOS
#compdef stripe
_stripe () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/stripe-completion.zsh
if [[ -f $e ]]; then source $e; fi
}
EOS
end
end
def caveats
<<~EOS
❤ Thanks for installing the Stripe CLI! If this is your first time using the CLI, be sure to run `stripe login` first.
EOS
end
end