Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 94 lines (80 sloc) 2.56 kb
f9ac5a0 PT/BT - Added gem stuff
btakita authored
1 require "rake"
2 require 'rake/gempackagetask'
3 require 'rake/contrib/rubyforgepublisher'
4 require 'rake/clean'
5 require 'rake/testtask'
6 require 'rake/rdoctask'
7
8 desc "Runs the Rspec suite"
9 task(:default) do
10 run_suite
11 end
12
13 desc "Runs the Rspec suite"
14 task(:spec) do
15 run_suite
16 end
17
18 def run_suite
19 dir = File.dirname(__FILE__)
f6a033e Fixed rakefile
btakita authored
20 system("ruby #{dir}/spec/spec_suite.rb") || raise("Example Suite failed")
f9ac5a0 PT/BT - Added gem stuff
btakita authored
21 end
22
0a189fb Adding tag release
btakita authored
23 desc "Copies the trunk to a tag with the name of the current release"
24 task(:tag_release) do
25 tag_release
26 end
27
90659c5 Gem configuration
btakita authored
28 PKG_NAME = "desert"
430d0af Version 0.3.3
Brian Takita authored
29 PKG_VERSION = "0.3.3"
f9ac5a0 PT/BT - Added gem stuff
btakita authored
30 PKG_FILES = FileList[
31 '[A-Z]*',
32 '*.rb',
33 'lib/**/*.rb',
51d2d7b updated plugin specification to properly include the generators
btakita authored
34 'generators/**/*',
35 'generators/**/templates/*',
f9ac5a0 PT/BT - Added gem stuff
btakita authored
36 'examples/**/*.rb'
37 ]
38
39 spec = Gem::Specification.new do |s|
40 s.name = PKG_NAME
41 s.version = PKG_VERSION
90659c5 Gem configuration
btakita authored
42 s.summary = "Desert is a component framework for Rails that allows your plugins to be packaged as mini Rails apps."
f9ac5a0 PT/BT - Added gem stuff
btakita authored
43 s.test_files = "examples/spec_suite.rb"
44 s.description = s.summary
45
46 s.files = PKG_FILES.to_a
47 s.require_path = 'lib'
48
49 s.has_rdoc = true
a24ec82 renamed readme to readme.rdoc to get github formatting
btakita authored
50 s.extra_rdoc_files = [ "README.rdoc", "CHANGES" ]
51 s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
f9ac5a0 PT/BT - Added gem stuff
btakita authored
52
53 s.test_files = Dir.glob('spec/*_spec.rb')
54 s.require_path = 'lib'
55 s.author = "Pivotal Labs"
56 s.email = "opensource@pivotallabs.com"
57 s.homepage = "http://pivotallabs.com"
58 s.rubyforge_project = "pivotalrb"
59 end
60
61 Rake::GemPackageTask.new(spec) do |pkg|
62 pkg.need_zip = true
63 pkg.need_tar = true
64 end
0a189fb Adding tag release
btakita authored
65
66 def tag_release
67 dashed_version = PKG_VERSION.gsub('.', '-')
68 svn_user = "#{ENV["SVN_USER"]}@" || ""
69 `svn cp svn+ssh://#{svn_user}rubyforge.org/var/svn/pivotalrb/desert/trunk svn+ssh://#{svn_user}rubyforge.org/var/svn/pivotalrb/desert/tags/REL-#{dashed_version} -m 'Version #{PKG_VERSION}'`
409f5d3 Removing Edge Rails from repo. Going to use a rake task to checkout the ...
btakita authored
70 end
71
f5e0d12 Fixed boot.rb using edge rails. Update geminstaller to have the supporte...
btakita authored
72 desc "Install dependencies to run the build. This task uses Git."
409f5d3 Removing Edge Rails from repo. Going to use a rake task to checkout the ...
btakita authored
73 task(:install_dependencies) do
cf40608 Using SUPPORTED_RAILS_VERSIONS hash in rake install_dependencies.
btakita authored
74 require "lib/desert/supported_rails_versions"
bd7171e Successfully running edge rails specs. They are failing, however.
btakita authored
75 system("git clone git://github.com/rails/rails.git spec/rails_root/vendor/rails_versions/edge")
76 Dir.chdir("spec/rails_root/vendor/rails_versions/edge") do
7bcf91b Using exports from git tags to load the dependent versions of Rails. Fix...
btakita authored
77 begin
cf40608 Using SUPPORTED_RAILS_VERSIONS hash in rake install_dependencies.
btakita authored
78 Desert::SUPPORTED_RAILS_VERSIONS.each do |version, data|
79 unless version == 'edge'
80 system("git checkout #{data['git_tag']}")
81 system("cp -R ../edge ../#{version}")
82 end
83 end
7bcf91b Using exports from git tags to load the dependent versions of Rails. Fix...
btakita authored
84 ensure
85 system("git checkout master")
86 end
87 end
f5e0d12 Fixed boot.rb using edge rails. Update geminstaller to have the supporte...
btakita authored
88 end
89
90 desc "Updates the dependencies to run the build. This task uses Git."
91 task(:update_dependencies) do
a3d5bed Fixed rake update_dependencies.
btakita authored
92 system "cd spec/rails_root/vendor/rails_versions/edge; git pull origin"
409f5d3 Removing Edge Rails from repo. Going to use a rake task to checkout the ...
btakita authored
93 end
Something went wrong with that request. Please try again.