-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathstripe-mock.rb
61 lines (53 loc) · 1.88 KB
/
stripe-mock.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
61
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class StripeMock < Formula
desc "stripe-mock is a mock HTTP server that responds like the real Stripe API. It can be used instead of Stripe's testmode to make test suites integrating with Stripe faster and less brittle."
homepage "https://github.com/stripe/stripe-mock"
version "0.193.0"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/stripe/stripe-mock/releases/download/v0.193.0/stripe-mock_0.193.0_darwin_arm64.tar.gz"
sha256 "b897d71ce7c1f85f49592961270549e524cbee524a69431b876d7d954d00fcac"
def install
bin.install "stripe-mock"
end
end
if Hardware::CPU.intel?
url "https://github.com/stripe/stripe-mock/releases/download/v0.193.0/stripe-mock_0.193.0_darwin_amd64.tar.gz"
sha256 "283b1b1e42054df974373904d4ed6ea137eea9106b365e380c49ed31af9b7f65"
def install
bin.install "stripe-mock"
end
end
end
on_linux do
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/stripe/stripe-mock/releases/download/v0.193.0/stripe-mock_0.193.0_linux_arm64.tar.gz"
sha256 "33003ee96f98c9046eb3d88b8e35d7ba660af5c48bc64157519f6cf65f49bcc4"
def install
bin.install "stripe-mock"
end
end
if Hardware::CPU.intel?
url "https://github.com/stripe/stripe-mock/releases/download/v0.193.0/stripe-mock_0.193.0_linux_amd64.tar.gz"
sha256 "3fd2b5121a7c27e5b0728100a066fda2e6cb8fdeb09ff55548c08de08dc59ef3"
def install
bin.install "stripe-mock"
end
end
end
service do
keep_alive successful_exit: false
run [
opt_bin/"stripe-mock",
"-http-port",
"12111",
"-https-port",
"12112"
]
working_dir var
log_path var/"log/stripe-mock.log"
error_log_path var/"log/stripe-mock.log"
end
end