Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 78 lines (66 sloc) 2.444 kb
542d308 @grimen Fixing some issues with the specs to get them to run on Ruby 1.9.x. Spec...
grimen authored
1 # coding: utf-8
dcf8beb Initial Commit
Justin French authored
2 require 'rake'
3 require 'rake/rdoctask'
542d308 @grimen Fixing some issues with the specs to get them to run on Ruby 1.9.x. Spec...
grimen authored
4
5 gem 'rspec-rails', '>= 1.0.0'
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
6 require 'spec/rake/spectask'
dcf8beb Initial Commit
Justin French authored
7
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
8 begin
9 GEM = "formtastic"
10 AUTHOR = "Justin French"
11 EMAIL = "justin@indent.com.au"
12 SUMMARY = "A Rails form builder plugin/gem with semantically rich and accessible markup"
13 HOMEPAGE = "http://github.com/justinfrench/formtastic/tree/master"
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
14 INSTALL_MESSAGE = %q{
15 ========================================================================
16 Thanks for installing Formtastic!
17f1777 @justinfrench make the gem install message a little more succinct
authored
17 ------------------------------------------------------------------------
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
18 You can now (optionally) run the generater to copy some stylesheets and
19 a config initializer into your application:
20 ./script/generate formtastic
21
17f1777 @justinfrench make the gem install message a little more succinct
authored
22 Find out more and get involved:
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
23 http://github.com/justinfrench/formtastic
24 http://groups.google.com.au/group/formtastic
25 ========================================================================
26 }
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
27
b9b6a54 @jgdavey Use 'canonical' version of jeweler
jgdavey authored
28 gem 'jeweler', '>= 1.0.0'
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
29 require 'jeweler'
542d308 @grimen Fixing some issues with the specs to get them to run on Ruby 1.9.x. Spec...
grimen authored
30
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
31 Jeweler::Tasks.new do |s|
32 s.name = GEM
33 s.summary = SUMMARY
34 s.email = EMAIL
35 s.homepage = HOMEPAGE
36 s.description = SUMMARY
37 s.author = AUTHOR
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
38 s.post_install_message = INSTALL_MESSAGE
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
39
40 s.require_path = 'lib'
41 s.autorequire = GEM
0735d1a @justinfrench updated the gem Rake task to include generators too
authored
42 s.files = %w(MIT-LICENSE README.textile Rakefile) + Dir.glob("{rails,lib,generators,spec}/**/*")
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
43 end
44 rescue LoadError
45 puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
46 end
47
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
48 desc 'Default: run unit specs.'
49 task :default => :spec
dcf8beb Initial Commit
Justin French authored
50
51 desc 'Test the formtastic plugin.'
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
52 Spec::Rake::SpecTask.new('spec') do |t|
53 t.spec_files = FileList['spec/**/*_spec.rb']
40d1857 @justinfrench use color formatting in the main spec rake task too
authored
54 t.spec_opts = ["-c"]
dcf8beb Initial Commit
Justin French authored
55 end
56
7fef413 @justinfrench added a rake task 'specdoc' for running the specs with specdoc formattin...
authored
57 desc 'Test the formtastic plugin with specdoc formatting and colors'
58 Spec::Rake::SpecTask.new('specdoc') do |t|
59 t.spec_files = FileList['spec/**/*_spec.rb']
60 t.spec_opts = ["--format specdoc", "-c"]
61 end
62
dcf8beb Initial Commit
Justin French authored
63 desc 'Generate documentation for the formtastic plugin.'
64 Rake::RDocTask.new(:rdoc) do |rdoc|
65 rdoc.rdoc_dir = 'rdoc'
66 rdoc.title = 'Formtastic'
67 rdoc.options << '--line-numbers' << '--inline-source'
8e2ca3a @justinfrench modified Rakefile to build with README.textile
authored
68 rdoc.rdoc_files.include('README.textile')
dcf8beb Initial Commit
Justin French authored
69 rdoc.rdoc_files.include('lib/**/*.rb')
70 end
7fef413 @justinfrench added a rake task 'specdoc' for running the specs with specdoc formattin...
authored
71
a27aa2b @justinfrench Added in a Rake task for running the specs with rcov, plus a line in .gi...
authored
72 desc "Run all examples with RCov"
73 Spec::Rake::SpecTask.new('examples_with_rcov') do |t|
74 t.spec_files = FileList['spec/**/*_spec.rb']
75 t.rcov = true
76 t.rcov_opts = ['--exclude', 'spec,Library']
77 end
Something went wrong with that request. Please try again.