-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
129 lines (121 loc) · 3.21 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
$:.unshift File.dirname(__FILE__)
require 'rake/clean'
require 'bundler/version'
require 'lib/lyracyst/version'
desc 'Run Spinach'
task :spinach do
system 'spinach --reporter progress'
end
desc 'Build gemspec'
task :build do
`gem build lyracyst.gemspec`
if $?.exitstatus == 0
puts "Built lyracyst-#{Lyracyst::VERSION}.gem."
else
puts 'Failed to build gemspec.'
end
end
desc 'Install gem'
task :install do
`gem install lyracyst-#{Lyracyst::VERSION}.gem`
if $?.exitstatus == 0
puts "Installed lyracyst-#{Lyracyst::VERSION}.gem."
else
puts 'Failed to install gem file.'
end
end
desc 'Create executable in /bin'
task :bin do
`cp ./lib/lyracyst.rb ./bin/lyracyst`
puts 'Built binstub.'
end
desc 'Connect to IRC'
task :irc do
puts 'Connecting to IRC'
require 'lib/lyracyst/irc/bot'
end
namespace :lyracyst do
desc 'comb[searchword]'
task :comb, :search do |t, args|
search = args.search
system "lyracyst rb comb #{search}"
end
desc 'def[searchword]'
task :def, :search do |t, args|
search = args.search
system "lyracyst wn def #{search}"
end
desc 'ex[searchword]'
task :ex, :search do |t, args|
search = args.search
system "lyracyst wn ex #{search}"
end
desc 'hyph[searchword]'
task :hyph, :search do |t, args|
search = args.search
system "lyracyst wn hyp #{search}"
end