Skip to content

Commit

Permalink
Audit npshell formula
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed Oct 29, 2017
1 parent 125e839 commit 90631bd
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions npshell.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
class Npshell < Formula
desc "Command-line music queue manager"
homepage "https://github.com/joelpurra/npshell"
head "https://github.com/joelpurra/npshell.git"
url "https://github.com/joelpurra/npshell.git", :tag => "v1.4.0"
head "https://github.com/joelpurra/npshell.git"

option "without-terminal-notifier", "Disables OS X notification dependencies."

depends_on "bash"
depends_on "coreutils"
depends_on "fswatch"
option "without-terminal-notifier", "Disables OS X notification dependencies."
depends_on "terminal-notifier" => :recommended

if build.with? "terminal-notifier"
Expand Down Expand Up @@ -36,14 +38,7 @@ def install
bin.install_symlink prefix/"src/np"
end

test do
system "#{bin}/np", "index"
assert (testpath/".np.cache~").exist?,
"npshell index file not created."
end

plist_options :startup => false, :manual => "np daemon"

def plist; <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-/Apple/DTD PLIST 1.0/EN" "http:/www.apple.com/DTDs/PropertyList-1.0.dtd">
Expand All @@ -68,4 +63,10 @@ def plist; <<-EOS.undent
</plist>
EOS
end

test do
system "#{bin}/np", "index"
assert_predicate (testpath/".np.cache~"), :exist?,
"npshell index file not created."
end
end

0 comments on commit 90631bd

Please sign in to comment.