1
1
class SpotifyPlayer < Formula
2
2
desc "Command driven spotify player"
3
3
homepage "https://github.com/aome510/spotify-player"
4
- url "https://github.com/aome510/spotify-player/archive/refs/tags/v0.19.1 .tar.gz"
5
- sha256 "bd516ed91cee0a96444797c2b99f3775efea84c252f79f7bc7de4cdb33dbd52c "
4
+ url "https://github.com/aome510/spotify-player/archive/refs/tags/v0.20.0 .tar.gz"
5
+ sha256 "a0708da71e30c0d213bb9f840fad4e3667ce4348d4a9dcdd6370d00b9ac2bda3 "
6
6
license "MIT"
7
7
8
8
bottle do
9
- sha256 cellar : :any_skip_relocation , arm64_sequoia : "76115237a91befd9ae3363ea43a25f202c4933c768d7655ae4befbdccee11e03"
10
- sha256 cellar : :any_skip_relocation , arm64_sonoma : "3a7d1a7bc4ce2cff97a3b66e22f1ef665fed6e260e1b02478fa97844bcd0302b"
11
- sha256 cellar : :any_skip_relocation , arm64_ventura : "1724139b95eccd702f51ef8ce7b49e35e2da55beb86b829ca09a9f44c5c27c27"
12
- sha256 cellar : :any_skip_relocation , arm64_monterey : "cff4ec347ded1f6687d1c0d7e5fed3f3e7db077b76bc59989b5396579f3843d0"
13
- sha256 cellar : :any_skip_relocation , sonoma : "72c392c4cb1436f2cc09728ee40199122f0b63f2f3d8b584dbe81bc9b6fed584"
14
- sha256 cellar : :any_skip_relocation , ventura : "d1774e20c830c57076b588ae3a9512161186625537bc84d1ea18952ea5e62d26"
15
- sha256 cellar : :any_skip_relocation , monterey : "17f864490ae02502a76644d364699005e27bd6d377975216b5385207c99f9f06"
16
- sha256 cellar : :any_skip_relocation , x86_64_linux : "d7cf9752b98b9011e5e10b10c31da73899d184f908c104c4409ad585314e95d7"
9
+ sha256 cellar : :any_skip_relocation , arm64_sequoia : "3b2a250500afcb2b48272232ce33a78f2658b1bd40237637ed9cd80b05bbba16"
10
+ sha256 cellar : :any_skip_relocation , arm64_sonoma : "dae0d7841d13499426d9ad5983fd0a5fca450630b0e582db1162070254f155ce"
11
+ sha256 cellar : :any_skip_relocation , arm64_ventura : "e7171536db6580037b3806119cfe255303e4bcfe15c66d20e81db0db84d84e31"
12
+ sha256 cellar : :any_skip_relocation , sonoma : "ac086bc837a7fbf5ed6e523a3754ca4b2b30c75f7e977a79125d1a3876b90e19"
13
+ sha256 cellar : :any_skip_relocation , ventura : "ecc13bf53831bf708fc340c9dc4b8cd1646442d6f19898ea32e9492658961034"
14
+ sha256 cellar : :any_skip_relocation , x86_64_linux : "90e6caa7b76a29776f9696ffd0c6171fabf19ceb1f65991d55b7bce92e2fd4b0"
17
15
end
18
16
19
17
depends_on "rust" => :build
20
- uses_from_macos "expect" => :test
21
18
22
19
on_linux do
23
20
depends_on "pkg-config" => :build
@@ -36,25 +33,9 @@ def install
36
33
end
37
34
38
35
test do
39
- ( testpath /"command.exp" ) . write <<~EOS
40
- spawn #{ bin } /spotify_player -C #{ testpath } /cache -c #{ testpath } /config
41
- expect {
42
- "Username:" { send "username\n " }
43
- default { exit 1 }
44
- }
45
- expect {
46
- "Password for username:" { send "password\n " }
47
- default { exit 1 }
48
- }
49
- expect {
50
- "Failed to authenticate" { exit 0 }
51
- default { exit 1 }
52
- }
53
- exit 1
54
- EOS
55
-
56
- system "expect" , "-f" , "command.exp"
57
-
36
+ cmd = "#{ bin } /spotify_player -C #{ testpath } /cache -c #{ testpath } /config 2>&1"
37
+ _ , stdout , = Open3 . popen2 ( cmd )
38
+ assert_match "No cached credentials found" , stdout . gets ( "\n " )
58
39
assert_match version . to_s , shell_output ( "#{ bin } /spotify_player --version" )
59
40
end
60
41
end
0 commit comments