Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 57 lines (45 sloc) 1.509 kb
76fcfe83 »
2009-03-21 first commit
1 # -*- ruby -*-
2
3 require 'rubygems'
0fdb33bc »
2009-03-28 added specs and fixed bugs on the way
4
5 require 'spec'
6 require 'spec/rake/spectask'
7
989bdf54 »
2010-07-30 clean up pom, Rakefile, gemspec
8 BUILD_DIR = 'target'
ef60ed6f »
2010-07-29 * switch over to use pom.xml as primary project configuration
9
10 desc 'clean up'
11 task :clean do
989bdf54 »
2010-07-30 clean up pom, Rakefile, gemspec
12 FileUtils.rm_rf(BUILD_DIR)
ef60ed6f »
2010-07-29 * switch over to use pom.xml as primary project configuration
13 end
14
15 desc 'Package as a gem.'
16 task :package do
17 require 'fileutils'
18 gemspec = Dir['*.gemspec'].first
19 Kernel.system("#{RUBY} -S gem build #{gemspec}")
989bdf54 »
2010-07-30 clean up pom, Rakefile, gemspec
20 FileUtils.mkdir_p(BUILD_DIR)
ef60ed6f »
2010-07-29 * switch over to use pom.xml as primary project configuration
21 gem = Dir['*.gem'].first
989bdf54 »
2010-07-30 clean up pom, Rakefile, gemspec
22 FileUtils.mv(gem, File.join(BUILD_DIR,"#{gem}"))
23 puts File.join(BUILD_DIR,"#{gem}")
76fcfe83 »
2009-03-21 first commit
24 end
25
26 desc 'Install the package as a gem.'
ef60ed6f »
2010-07-29 * switch over to use pom.xml as primary project configuration
27 task :install => [:package] do
989bdf54 »
2010-07-30 clean up pom, Rakefile, gemspec
28 gem = Dir[File.join(BUILD_DIR, '*.gem')].first
ef60ed6f »
2010-07-29 * switch over to use pom.xml as primary project configuration
29 extra = ENV['GEM_HOME'].nil? && ENV['GEM_PATH'].nil? ? "--user-install" : ""
30 Kernel.system("#{RUBY} -S gem install --local #{gem} --no-ri --no-rdoc #{extra}")
31 end
32
33 desc 'Run specifications'
34 Spec::Rake::SpecTask.new(:spec) do |t|
35 if File.exists?(File.join('spec','spec.opts'))
36 t.spec_opts << '--options' << File.join('spec','spec.opts')
37 end
38 t.spec_files = Dir.glob(File.join('spec','**','*_spec.rb'))
76fcfe83 »
2009-03-21 first commit
39 end
40
4f1e648f »
2009-10-07 * fixed the rack_datamapper naming problem
41 desc 'generate rails using all generators and run the specs'
4315c5a9 »
2010-07-30 use rails 2.3.8 for integration-test
42 task :"integration-test" => [:spec, :install] do
4f1e648f »
2009-10-07 * fixed the rack_datamapper naming problem
43 require 'datamapper4rails/integration_test'
44 Datamapper4Rails::IntegrationTest.new do |t|
45 t.generate "datamapper_model role name:string"
46 t.generate "datamapper_scaffold domain name:string"
47 t.generate "datamapper_rspec_model user name:string"
48 t.generate "datamapper_rspec_scaffold group name:string"
49 end
50 end
51
ef60ed6f »
2010-07-29 * switch over to use pom.xml as primary project configuration
52 #require 'yard'
76fcfe83 »
2009-03-21 first commit
53
ef60ed6f »
2010-07-29 * switch over to use pom.xml as primary project configuration
54 #YARD::Rake::YardocTask.new
76fcfe83 »
2009-03-21 first commit
55
56 # vim: syntax=Ruby
Something went wrong with that request. Please try again.