public
Description: Player for the Ruby Sparring Battleship tournament
Homepage: http://iannopollo.com
Clone URL: git://github.com/siannopollo/joshua_son_of_nun.git
joshua_son_of_nun / Rakefile
100644 54 lines (47 sloc) 1.613 kb
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
require 'rake'
require 'rake/gempackagetask'
require 'spec/rake/spectask'
require 'battleship_tournament/submit'
 
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
  t.spec_files = FileList['spec/**/*.rb']
  t.spec_opts = ['--options', 'spec/spec.opts']
  t.rcov = false
end
task :default => :spec
 
PKG_NAME = "joshua_son_of_nun"
PKG_VERSION = "1.0"
 
spec = Gem::Specification.new do |s|
  s.name = PKG_NAME
  s.version = PKG_VERSION
  s.files = FileList['**/*'].to_a.reject!{ |f| f =~ /report/ }
  s.require_path = 'lib'
  s.test_files = Dir.glob('spec/*_spec.rb')
  s.bindir = 'bin'
  s.executables = []
  s.summary = "Battleship Player:joshua_son_of_nun"
  s.rubyforge_project = "sparring"
  s.homepage = "http://sparring.rubyforge.org/"
 
  ###########################################
  ##
  ## You are encouraged to modify the following
  ## spec attributes.
  ##
  ###########################################
  s.description = "(using scary WWF wrestler voice) Just like the walls of Jericho, the same will happen to all battleship opponents of Joshua, son of Nun!!"
  s.author = "Steve Iannopollo"
  s.email = "steve@iannopollo.com"
end
 
Rake::GemPackageTask.new(spec) do |pkg|
  pkg.need_zip = false
  pkg.need_tar = false
end
 
desc "Submit your player"
task :submit do
  submitter = BattleshipTournament::Submit.new(PKG_NAME)
  submitter.submit
end
 
desc 'Locally build the gem'
task :make_gem do
  `cd #{File.expand_path(File.dirname(__FILE__))} && rm -f pkg/joshua_son_of_nun-1.0.gem && rake gem && sudo gem uninstall joshua_son_of_nun && sudo gem install pkg/joshua_son_of_nun-1.0.gem`
end