Skip to content

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
76fcfe8 first commit
kristian meier authored
1 # -*- ruby -*-
2
3 require 'rubygems'
0fdb33b @mkristian added specs and fixed bugs on the way
authored
4
5 require 'spec'
6 require 'spec/rake/spectask'
7
989bdf5 @mkristian clean up pom, Rakefile, gemspec
authored
8 BUILD_DIR = 'target'
ef60ed6 @mkristian * switch over to use pom.xml as primary project configuration
authored
9
10 desc 'clean up'
11 task :clean do
989bdf5 @mkristian clean up pom, Rakefile, gemspec
authored
12 FileUtils.rm_rf(BUILD_DIR)
ef60ed6 @mkristian * switch over to use pom.xml as primary project configuration
authored
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}")
989bdf5 @mkristian clean up pom, Rakefile, gemspec
authored
20 FileUtils.mkdir_p(BUILD_DIR)
ef60ed6 @mkristian * switch over to use pom.xml as primary project configuration
authored
21 gem = Dir['*.gem'].first
989bdf5 @mkristian clean up pom, Rakefile, gemspec
authored
22 FileUtils.mv(gem, File.join(BUILD_DIR,"#{gem}"))
23 puts File.join(BUILD_DIR,"#{gem}")
76fcfe8 first commit
kristian meier authored
24 end
25
26 desc 'Install the package as a gem.'
ef60ed6 @mkristian * switch over to use pom.xml as primary project configuration
authored
27 task :install => [:package] do
989bdf5 @mkristian clean up pom, Rakefile, gemspec
authored
28 gem = Dir[File.join(BUILD_DIR, '*.gem')].first
ef60ed6 @mkristian * switch over to use pom.xml as primary project configuration
authored
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'))
76fcfe8 first commit
kristian meier authored
39 end
40
4f1e648 @mkristian * fixed the rack_datamapper naming problem
authored
41 desc 'generate rails using all generators and run the specs'
4315c5a @mkristian use rails 2.3.8 for integration-test
authored
42 task :"integration-test" => [:spec, :install] do
4f1e648 @mkristian * fixed the rack_datamapper naming problem
authored
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
ef60ed6 @mkristian * switch over to use pom.xml as primary project configuration
authored
52 #require 'yard'
76fcfe8 first commit
kristian meier authored
53
ef60ed6 @mkristian * switch over to use pom.xml as primary project configuration
authored
54 #YARD::Rake::YardocTask.new
76fcfe8 first commit
kristian meier authored
55
56 # vim: syntax=Ruby
Something went wrong with that request. Please try again.