-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
61 lines (52 loc) · 1.43 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
require 'rake'
require 'rake/gempackagetask'
require 'spec/rake/spectask'
require 'hangman_tournament/submit'
require 'metric_fu'
desc 'Run specs and stats; build and install gem; open app'
task :default => [:spec, :'metrics:all', :gem, :install, :run]
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_files = FileList['spec/**/*.rb']
t.rcov = false
end
PKG_NAME = "kerryb"
PKG_VERSION = "1.3"
spec = Gem::Specification.new do |s|
s.name = "hangman_#{PKG_NAME}"
s.version = PKG_VERSION
s.files = Dir.glob('**/*').reject{ |f| f =~ /pkg/ }
s.require_path = 'lib'
s.test_files = Dir.glob('spec/*_spec.rb')
s.bindir = 'bin'
s.executables = []
s.summary = "Hangman Player:kerryb"
s.rubyforge_project = "sparring"
s.homepage = "http://sparring.rubyforge.org/"
###########################################
##
## You are encouraged to modify the following
## spec attributes.
##
###########################################
s.description = "Kerry's hangbot"
s.author = "Kerry Buckley"
s.email = "kerryjbuckley@gmail.com"
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_zip = false
pkg.need_tar = false
end
desc 'Install gem'
task :install do
system "sudo gem install pkg/hangman_#{PKG_NAME}"
end
desc 'Run app'
task :run do
system 'open hangman.lll'
end
desc "Submit your player"
task :submit do
submitter = HangmanTournament::Submit.new("hangman_#{PKG_NAME}")
submitter.submit
end