-
Notifications
You must be signed in to change notification settings - Fork 10
/
stripe.rb
60 lines (55 loc) · 2.06 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.21.11"
depends_on :macos
on_macos do
if Hardware::CPU.arm?
url "https://github.com/stripe/stripe-cli/releases/download/v1.21.11/stripe_1.21.11_mac-os_arm64.tar.gz"
sha256 "5e51e83b8609ba38d14925b39ca711dc15e4e5841b01f0c4915d696f74e37287"
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.21.11/stripe_1.21.11_mac-os_x86_64.tar.gz"
sha256 "743b135152e1b11ca18b73b10e09879ebcfca4a18646e3b3ec10223d3c7097b8"
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