Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 59 lines (50 sloc) 1.736 kb
dcf8beb Initial Commit
Justin French authored
1 require 'rake'
2 require 'rake/rdoctask'
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
3 require 'spec/rake/spectask'
dcf8beb Initial Commit
Justin French authored
4
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
5 begin
6 GEM = "formtastic"
7 AUTHOR = "Justin French"
8 EMAIL = "justin@indent.com.au"
9 SUMMARY = "A Rails form builder plugin/gem with semantically rich and accessible markup"
10 HOMEPAGE = "http://github.com/justinfrench/formtastic/tree/master"
11
12 require 'jeweler'
13 Jeweler::Tasks.new do |s|
14 s.name = GEM
15 s.summary = SUMMARY
16 s.email = EMAIL
17 s.homepage = HOMEPAGE
18 s.description = SUMMARY
19 s.author = AUTHOR
20
21 s.require_path = 'lib'
22 s.autorequire = GEM
23 s.files = %w(MIT-LICENSE README.textile Rakefile) + Dir.glob("{rails,lib,spec}/**/*")
24 end
25 rescue LoadError
26 puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
27 end
28
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
29 desc 'Default: run unit specs.'
30 task :default => :spec
dcf8beb Initial Commit
Justin French authored
31
32 desc 'Test the formtastic plugin.'
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
33 Spec::Rake::SpecTask.new('spec') do |t|
34 t.spec_files = FileList['spec/**/*_spec.rb']
40d1857 @justinfrench use color formatting in the main spec rake task too
authored
35 t.spec_opts = ["-c"]
dcf8beb Initial Commit
Justin French authored
36 end
37
7fef413 @justinfrench added a rake task 'specdoc' for running the specs with specdoc format…
authored
38 desc 'Test the formtastic plugin with specdoc formatting and colors'
39 Spec::Rake::SpecTask.new('specdoc') do |t|
40 t.spec_files = FileList['spec/**/*_spec.rb']
41 t.spec_opts = ["--format specdoc", "-c"]
42 end
43
dcf8beb Initial Commit
Justin French authored
44 desc 'Generate documentation for the formtastic plugin.'
45 Rake::RDocTask.new(:rdoc) do |rdoc|
46 rdoc.rdoc_dir = 'rdoc'
47 rdoc.title = 'Formtastic'
48 rdoc.options << '--line-numbers' << '--inline-source'
8e2ca3a @justinfrench modified Rakefile to build with README.textile
authored
49 rdoc.rdoc_files.include('README.textile')
dcf8beb Initial Commit
Justin French authored
50 rdoc.rdoc_files.include('lib/**/*.rb')
51 end
7fef413 @justinfrench added a rake task 'specdoc' for running the specs with specdoc format…
authored
52
a27aa2b @justinfrench Added in a Rake task for running the specs with rcov, plus a line in …
authored
53 desc "Run all examples with RCov"
54 Spec::Rake::SpecTask.new('examples_with_rcov') do |t|
55 t.spec_files = FileList['spec/**/*_spec.rb']
56 t.rcov = true
57 t.rcov_opts = ['--exclude', 'spec,Library']
58 end
Something went wrong with that request. Please try again.