-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Rakefile
51 lines (38 loc) · 1.03 KB
/
Rakefile
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
# -*- ruby -*-
require 'rubygems'
require 'hoe'
Hoe.plugin :seattlerb
Hoe.plugin :isolate
Hoe.spec "omnifocus" do
developer "Ryan Davis", "[email protected]"
license "MIT"
dependency "rb-scpt", "~> 1.0"
dependency "octokit", "~> 4.14", :development if ENV["TEST"] || ENV["USER"] == "ryan"
self.isolate_multiruby = true
pluggable!
end
def omnifocus cmd, options = nil
inc = "-Ilib:../../omnifocus-github/dev/lib"
ruby "#{inc} -rpry-byebug bin/of #{cmd} #{options}"
end
desc "Run fix and reschedule tasks"
t = task "of:fix" => :isolate do
omnifocus "fix"
omnifocus "resch"
end
t.plugin = "omnifocus"
desc "Run any command (via $CMD) with -d if $D"
t = task "of:debug" => :isolate do
cmd = ENV["CMD"] || "sync github"
d = ENV["D"] ? "-d" : nil
omnifocus cmd, d
end
t.plugin = "omnifocus"
Dir["lib/omnifocus/*.rb"]
.map { |f| File.basename f, ".rb" }
.each do |cmd|
desc "Run the #{cmd} command"
task("of:#{cmd}" => :isolate) { omnifocus cmd }
.plugin = "omnifocus"
end
# vim: syntax=ruby