-
Notifications
You must be signed in to change notification settings - Fork 10
/
stripe.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.22.0"
depends_on :macos
on_macos do
if Hardware::CPU.arm?
url "https://github.com/stripe/stripe-cli/releases/download/v1.22.0/stripe_1.22.0_mac-os_arm64.tar.gz"
sha256 "0a7d946f9aa1fca67f9a879df08c3711bf555168633c2ac0641737616e1addf8"
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.22.0/stripe_1.22.0_mac-os_x86_64.tar.gz"
sha256 "e709901befcb3d2ff9593f4dc5ef09d08f2c8ca4d30dd05614d634c44d53ad1e"
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