Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 37 lines (28 sloc) 0.823 kb
a038b3d @jeremy Make Rakefile usable outside of base dir
jeremy authored
1 dir = File.dirname(__FILE__)
66d713f @josh License, version, and gemspec for ActiveModel. Ship it!
josh authored
2
b7c6cef @technoweenie tweak activemodel load order a bit
technoweenie authored
3 require 'rake/testtask'
3baf810 @jakehow Add rdoc task to activemodel. [#156 state:resolved]
jakehow authored
4
b7c6cef @technoweenie tweak activemodel load order a bit
technoweenie authored
5 task :default => :test
6
6094e65 @josh We won't be publishing tars and zips anymore
josh authored
7 Rake::TestTask.new do |t|
1a2fba1 @josh don't expand test path
josh authored
8 t.libs << "test"
a038b3d @jeremy Make Rakefile usable outside of base dir
jeremy authored
9 t.test_files = Dir.glob("#{dir}/test/cases/**/*_test.rb").sort
6dc9ad8 @josh Fix warnings in AMo
josh authored
10 t.warning = true
b7c6cef @technoweenie tweak activemodel load order a bit
technoweenie authored
11 end
66d713f @josh License, version, and gemspec for ActiveModel. Ship it!
josh authored
12
bbb3e5a @jeremy Unify test:isolated across components and run by default at toplevel
jeremy authored
13 namespace :test do
14 task :isolated do
15 ruby = File.join(*RbConfig::CONFIG.values_at('bindir', 'RUBY_INSTALL_NAME'))
16 Dir.glob("#{dir}/test/**/*_test.rb").all? do |file|
9a57a22 @spastorino sorry, the CI cannot lie to us anymore (Part II)
spastorino authored
17 sh(ruby, '-w', "-I#{dir}/lib", "-I#{dir}/test", file)
bbb3e5a @jeremy Unify test:isolated across components and run by default at toplevel
jeremy authored
18 end or raise "Failures"
19 end
e8550ee @jeremy Cherry-pick core extensions
jeremy authored
20 end
b7c6cef @technoweenie tweak activemodel load order a bit
technoweenie authored
21
66d713f @josh License, version, and gemspec for ActiveModel. Ship it!
josh authored
22 require 'rake/packagetask'
a81c2ec @vijaydev fixes Rake::GemPackageTask deprecation warnings from rake 0.9.0
vijaydev authored
23 require 'rubygems/package_task'
66d713f @josh License, version, and gemspec for ActiveModel. Ship it!
josh authored
24
a038b3d @jeremy Make Rakefile usable outside of base dir
jeremy authored
25 spec = eval(File.read("#{dir}/activemodel.gemspec"))
66d713f @josh License, version, and gemspec for ActiveModel. Ship it!
josh authored
26
a81c2ec @vijaydev fixes Rake::GemPackageTask deprecation warnings from rake 0.9.0
vijaydev authored
27 Gem::PackageTask.new(spec) do |p|
66d713f @josh License, version, and gemspec for ActiveModel. Ship it!
josh authored
28 p.gem_spec = spec
29 end
c1785f3 @jeremy Release using gemcutter gem:push tasks
jeremy authored
30
31 desc "Release to gemcutter"
459ecaf @jeremy Submarine the rake-gemcutter dep in Rakefiles
jeremy authored
32 task :release => :package do
33 require 'rake/gemcutter'
34 Rake::Gemcutter::Tasks.new(spec).define
35 Rake::Task['gem:push'].invoke
36 end
Something went wrong with that request. Please try again.