Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 42 lines (33 sloc) 1.024 kB
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
1 # -*- ruby -*-
2
3 require 'rubygems'
4
5 require 'spec'
6 require 'spec/rake/spectask'
7
6f7c870 @mkristian clean up pom, Rakefile, gemspec
authored
8 BUILD_DIR = 'target'
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
9
99d6a83 @mkristian switch to new jruby plugin, adjusted Rakefile to do basic tasks
authored
10 desc 'clean up'
9c30c20 @mkristian fixed Rakefile to have some tasks as with hoe
authored
11 task :clean do
6f7c870 @mkristian clean up pom, Rakefile, gemspec
authored
12 FileUtils.rm_rf(BUILD_DIR)
9c30c20 @mkristian fixed Rakefile to have some tasks as with hoe
authored
13 end
14
5fd87b0 @mkristian clean up pom, Rakefilem gemspec
authored
15 desc 'Package as a gem.'
9c30c20 @mkristian fixed Rakefile to have some tasks as with hoe
authored
16 task :package do
99d6a83 @mkristian switch to new jruby plugin, adjusted Rakefile to do basic tasks
authored
17 require 'fileutils'
18 gemspec = Dir['*.gemspec'].first
5fd87b0 @mkristian clean up pom, Rakefilem gemspec
authored
19 Kernel.system("#{RUBY} -S gem build #{gemspec}")
6f7c870 @mkristian clean up pom, Rakefile, gemspec
authored
20 FileUtils.mkdir_p(BUILD_DIR)
99d6a83 @mkristian switch to new jruby plugin, adjusted Rakefile to do basic tasks
authored
21 gem = Dir['*.gem'].first
6f7c870 @mkristian clean up pom, Rakefile, gemspec
authored
22 FileUtils.mv(gem, File.join(BUILD_DIR,"#{gem}"))
23 puts File.join(BUILD_DIR,"#{gem}")
9c30c20 @mkristian fixed Rakefile to have some tasks as with hoe
authored
24 end
25
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
26 desc 'Install the package as a gem.'
99d6a83 @mkristian switch to new jruby plugin, adjusted Rakefile to do basic tasks
authored
27 task :install => [:package] do
6f7c870 @mkristian clean up pom, Rakefile, gemspec
authored
28 gem = Dir[File.join(BUILD_DIR, '*.gem')].first
5fd87b0 @mkristian clean up pom, Rakefilem gemspec
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}")
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
31 end
32
99d6a83 @mkristian switch to new jruby plugin, adjusted Rakefile to do basic tasks
authored
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'))
39 end
e0cee5c @mkristian initial import after porting code from datamapper4rails to rack
authored
40
41 # vim: syntax=Ruby
Something went wrong with that request. Please try again.