-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathstripe.rb
60 lines (55 loc) · 2.05 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
60
# 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.23.3"
depends_on :macos
on_macos do
if Hardware::CPU.arm?
url "https://github.com/stripe/stripe-cli/releases/download/v1.23.3/stripe_1.23.3_mac-os_arm64.tar.gz"
sha256 "bb19e9e8e73bb81c4df683edebadefaca8c8ba023fd2a75947c84fa9c1cc6de7"
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.intel?
url "https://github.com/stripe/stripe-cli/releases/download/v1.23.3/stripe_1.23.3_mac-os_x86_64.tar.gz"
sha256 "31b0ee23964b6b38d8a1e8efa3fde0202aa15c778f815f68da8d71d9c3c8a68c"
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
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