Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 53 lines (43 sloc) 1.452 kb
0a59e0c Morton Jonuschat Always use # encoding: utf-8 declaration
yabawock authored
1 # encoding: utf-8
b77e11a Morton Jonuschat Make Rakefile compatible with rails2 & rails3
yabawock authored
2 require 'rubygems'
dcf8beb Initial Commit
Justin French authored
3 require 'rake'
4 require 'rake/rdoctask'
34848c4 Gabriel Sobrinho Cleanup Rakefile
sobrinho authored
5 require 'rspec/core/rake_task'
050ef12 Justin French Added new rcov tasks, made spec_and_verify_coverage the default rake tas...
authored
6 require 'tasks/verify_rcov'
7f01af4 Kouhei Sutou switch to gemspec generated by bundler. #535 #548
kou authored
7 require 'bundler'
8
9 Bundler::GemHelper.install_tasks
dcf8beb Initial Commit
Justin French authored
10
281dd18 Xavier Shay rspec support - test_helper and rake task
xaviershay authored
11 desc 'Default: run unit specs.'
050ef12 Justin French Added new rcov tasks, made spec_and_verify_coverage the default rake tas...
authored
12 task :default => :spec_and_verify_coverage
dcf8beb Initial Commit
Justin French authored
13
14 desc 'Generate documentation for the formtastic plugin.'
15 Rake::RDocTask.new(:rdoc) do |rdoc|
16 rdoc.rdoc_dir = 'rdoc'
17 rdoc.title = 'Formtastic'
18 rdoc.options << '--line-numbers' << '--inline-source'
8e2ca3a Justin French modified Rakefile to build with README.textile
authored
19 rdoc.rdoc_files.include('README.textile')
dcf8beb Initial Commit
Justin French authored
20 rdoc.rdoc_files.include('lib/**/*.rb')
21 end
7fef413 Justin French added a rake task 'specdoc' for running the specs with specdoc formattin...
authored
22
34848c4 Gabriel Sobrinho Cleanup Rakefile
sobrinho authored
23 desc 'Test the formtastic plugin.'
24 RSpec::Core::RakeTask.new('spec') do |t|
25 t.pattern = FileList['spec/**/*_spec.rb']
a27aa2b Justin French Added in a Rake task for running the specs with rcov, plus a line in .gi...
authored
26 end
b77e11a Morton Jonuschat Make Rakefile compatible with rails2 & rails3
yabawock authored
27
bd81cc7 Justin French Added a rspec:inputs task for testing just the inputs that I'm focusing ...
authored
28 desc 'Test the formtastic inputs.'
29 RSpec::Core::RakeTask.new('spec:inputs') do |t|
10b7d3a Justin French include check_boxes in inputs spec rake task
authored
30 t.pattern = FileList['spec/inputs/*_spec.rb']
bd81cc7 Justin French Added a rspec:inputs task for testing just the inputs that I'm focusing ...
authored
31 end
32
34848c4 Gabriel Sobrinho Cleanup Rakefile
sobrinho authored
33 desc 'Test the formtastic plugin with specdoc formatting and colors'
34 RSpec::Core::RakeTask.new('specdoc') do |t|
35 t.pattern = FileList['spec/**/*_spec.rb']
36 end
b77e11a Morton Jonuschat Make Rakefile compatible with rails2 & rails3
yabawock authored
37
34848c4 Gabriel Sobrinho Cleanup Rakefile
sobrinho authored
38 desc 'Run all examples with RCov'
050ef12 Justin French Added new rcov tasks, made spec_and_verify_coverage the default rake tas...
authored
39 RSpec::Core::RakeTask.new('rcov') do |t|
34848c4 Gabriel Sobrinho Cleanup Rakefile
sobrinho authored
40 t.pattern = FileList['spec/**/*_spec.rb']
41 t.rcov = true
050ef12 Justin French Added new rcov tasks, made spec_and_verify_coverage the default rake tas...
authored
42 t.rcov_opts = %w(--exclude gems/*,spec/*,.bundle/*, --aggregate coverage.data)
43 end
44
45 RCov::VerifyTask.new(:verify_coverage) do |t|
46 t.require_exact_threshold = false
b66cb77 Justin French Remove coverage requirement for 1.9.2 & 1.9.3, add back to Travis.
authored
47 t.threshold = (RUBY_VERSION == "1.8.7" ? 95 : 0)
050ef12 Justin French Added new rcov tasks, made spec_and_verify_coverage the default rake tas...
authored
48 end
49
50 desc "Run all examples and verify coverage"
51 task :spec_and_verify_coverage => [:rcov, :verify_coverage] do
b77e11a Morton Jonuschat Make Rakefile compatible with rails2 & rails3
yabawock authored
52 end
Something went wrong with that request. Please try again.