public
Description: High-level game framework, built on Rubygame & OpenGL. (On hold)
Homepage: http://blog.rubygame.org/rebirth
Clone URL: git://github.com/jacius/rebirth.git
jacius (author)
Wed Feb 25 22:56:58 -0800 2009
commit  5aaeedc86182aecbff26ed71178805826127bd08
tree    8c79ccecc4ecf93d65e5af486064880b084de9a8
parent  ef6da6925979b82eaf4cd3f7095ec16f5ec7b20a
rebirth / Rakefile
100644 73 lines (48 sloc) 1.214 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# The version number for Rebirth.
REBIRTH_VERSION = [0,6]
 
require 'rake'
 
task :version do
  puts "Rebirth v#{REBIRTH_VERSION.join(".")}"
end
 
 
 
#########
# SPECS #
#########
 
begin
  require 'spec/rake/spectask'
 
 
  desc "Run all specs"
  Spec::Rake::SpecTask.new do |t|
    t.spec_files = FileList['spec/*_spec.rb']
  end
 
 
  namespace :spec do
    desc "Run all specs"
    Spec::Rake::SpecTask.new(:all) do |t|
      t.spec_files = FileList['spec/*_spec.rb']
    end
 
    desc "Run spec/[name]_spec.rb (e.g. 'color')"
    task :name do
      puts( "This is just a stand-in spec.",
            "Run rake spec:[name] where [name] is e.g. 'color', 'music'." )
    end
  end
 
 
  rule(/spec:.+/) do |t|
    name = t.name.gsub("spec:","")
 
    path = File.join( File.dirname(__FILE__),'spec','%s_spec.rb'%name )
 
    if File.exist? path
      Spec::Rake::SpecTask.new(name) do |t|
        t.spec_files = [path]
      end
 
      puts "\nRunning spec/%s_spec.rb"%name
 
      Rake::Task[name].invoke
    else
      puts "File does not exist: %s"%path
    end
 
  end
 
rescue LoadError
 
  error = "ERROR: RSpec is not installed?"
 
  task :spec do
    puts error
  end
 
  rule( /spec:.*/ ) do
    puts error
  end
 
end