aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/todo-txt.rb21
1 files changed, 13 insertions, 8 deletions
diff --git a/Library/Formula/todo-txt.rb b/Library/Formula/todo-txt.rb
index 3acd8e762..60b251eec 100644
--- a/Library/Formula/todo-txt.rb
+++ b/Library/Formula/todo-txt.rb
@@ -1,16 +1,14 @@
-require 'formula'
-
class TodoTxt < Formula
- homepage 'http://todotxt.com/'
+ homepage "http://todotxt.com/"
url "https://github.com/ginatrapani/todo.txt-cli/releases/download/v2.10/todo.txt_cli-2.10.tar.gz"
- sha1 "3967bc42ca23cc984e94939b783cf118fe86b1b0"
+ sha256 "b59417a26feeafd811e0f1ff17e85e69ac5bcb1a0544b736f539ffb8fe27f6a9"
- head 'https://github.com/ginatrapani/todo.txt-cli.git'
+ head "https://github.com/ginatrapani/todo.txt-cli.git"
def install
- bin.install 'todo.sh'
- prefix.install 'todo.cfg' # Default config file
- bash_completion.install 'todo_completion'
+ bin.install "todo.sh"
+ prefix.install "todo.cfg" # Default config file
+ bash_completion.install "todo_completion"
end
def caveats; <<-EOS.undent
@@ -18,4 +16,11 @@ class TodoTxt < Formula
cp #{prefix}/todo.cfg ~/.todo.cfg
EOS
end
+
+ test do
+ cp prefix/"todo.cfg", testpath/".todo.cfg"
+ inreplace testpath/".todo.cfg", "export TODO_DIR=$(dirname \"$0\")", "export TODO_DIR=#{testpath}"
+ system bin/"todo.sh", "add", "Hello World!"
+ system bin/"todo.sh", "list"
+ end
end