public
Description: Desert is a component framework for Rails that allows your plugins have a Rails app like directory structure, routes, migrations, and dependencies.
Homepage: http://desert.rubyforge.org
Clone URL: git://github.com/pivotal/desert.git
desert / Rakefile
100644 78 lines (68 sloc) 2.358 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
74
75
76
77
78
require "rake"
require 'rake/contrib/rubyforgepublisher'
require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'
 
desc "Runs the Rspec suite"
task :default do
  run_suite
end
 
desc "Runs the Rspec suite"
task :spec do
  run_suite
end
 
def run_suite
  dir = File.dirname(__FILE__)
  system("ruby #{dir}/spec/spec_suite.rb") || raise("Example Suite failed")
end
 
begin
  gem "pivotal-jeweler"
  require 'jeweler'
  Jeweler::Tasks.new do |s|
    s.name = "desert"
    s.summary = "Desert is a component framework for Rails that allows your plugins to be packaged as mini Rails apps."
    s.email = "opensource@pivotallabs.com"
    s.homepage = "http://pivotallabs.com"
    s.description = "Desert is a component framework for Rails that allows your plugins to be packaged as mini Rails apps."
    s.authors = ["Pivotal Labs", "Brian Takita", "Parker Thompson", "Adam Milligan, Joe Moore"]
    s.files = FileList[
      '[A-Z]*',
      '*.rb',
      'lib/**/*.rb',
      'generators/**/*',
      'generators/**/templates/*',
      'examples/**/*.rb'
    ].to_a
    s.extra_rdoc_files = [ "README.rdoc", "CHANGES" ]
    s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
    s.test_files = Dir.glob('spec/*_spec.rb')
    s.rubyforge_project = "desert"
  end
rescue LoadError
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
 
 
desc "Install dependencies to run the build. This task uses Git."
task :install_dependencies do
  require "lib/desert/supported_rails_versions"
  system("git clone git://github.com/rails/rails.git /Users/pivotal/workspace/desert/spec/rails_root/vendor/rails_versions/edge")
  Dir.chdir("spec/rails_root/vendor/rails_versions/edge") do
    begin
      Desert::SUPPORTED_RAILS_VERSIONS.each do |version, data|
        unless version == 'edge'
          system("git checkout #{data['git_tag']}")
          system("cp -R ../edge ../#{version}")
        end
      end
    ensure
      system("git checkout master")
    end
  end
end
 
desc "Updates the dependencies to run the build. This task uses Git."
task :update_dependencies do
  system "cd spec/rails_root/vendor/rails_versions/edge; git pull origin"
end
 
desc "Runs the CI build"
task :cruise => :install_dependencies do
  run_suite
end