Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 103 lines (87 sloc) 3.458 kb
542d308 @grimen Fixing some issues with the specs to get them to run on Ruby 1.9.x. S…
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. S…
grimen authored
4
b86764b @grimen Enhanced the Rakefile a bit to make it handle missing RSpec dependenc…
grimen authored
5 begin
6 require 'spec/rake/spectask'
7 rescue LoadError
8 begin
9 gem 'rspec-rails', '>= 1.0.0'
10 require 'spec/rake/spectask'
11 rescue LoadError
12 puts "[formtastic:] RSpec - or one of it's dependencies - is not available. Install it with: sudo gem install rspec-rails"
13 end
14 end
dcf8beb Initial Commit
Justin French authored
15
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
16 begin
17 GEM = "formtastic"
18 AUTHOR = "Justin French"
19 EMAIL = "justin@indent.com.au"
20 SUMMARY = "A Rails form builder plugin/gem with semantically rich and accessible markup"
21 HOMEPAGE = "http://github.com/justinfrench/formtastic/tree/master"
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
22 INSTALL_MESSAGE = %q{
23 ========================================================================
24 Thanks for installing Formtastic!
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored
25 ------------------------------------------------------------------------
74a0d00 @benschwarz Corrected a typo
benschwarz authored
26 You can now (optionally) run the generator to copy some stylesheets and
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
27 a config initializer into your application:
28 ./script/generate formtastic
29
fef3288 @grimen Added documentation for the form generator in README, and showing som…
grimen authored
30 To generate some semantic form markup for your exisiting models, just run:
31 ./script/generate form MODEL_NAME
32
17f1777 @justinfrench make the gem install message a little more succinct
authored
33 Find out more and get involved:
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
34 http://github.com/justinfrench/formtastic
35 http://groups.google.com.au/group/formtastic
36 ========================================================================
37 }
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
38
b9b6a54 @jgdavey Use 'canonical' version of jeweler
jgdavey authored
39 gem 'jeweler', '>= 1.0.0'
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
40 require 'jeweler'
542d308 @grimen Fixing some issues with the specs to get them to run on Ruby 1.9.x. S…
grimen authored
41
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
42 Jeweler::Tasks.new do |s|
43 s.name = GEM
44 s.summary = SUMMARY
45 s.email = EMAIL
46 s.homepage = HOMEPAGE
47 s.description = SUMMARY
48 s.author = AUTHOR
eed8b71 @justinfrench added a post_install_message to rake task/gemspec
authored
49 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
50
51 s.require_path = 'lib'
0735d1a @justinfrench updated the gem Rake task to include generators too
authored
52 s.files = %w(MIT-LICENSE README.textile Rakefile) + Dir.glob("{rails,lib,generators,spec}/**/*")
b86764b @grimen Enhanced the Rakefile a bit to make it handle missing RSpec dependenc…
grimen authored
53
54 # Runtime dependencies: When installing Formtastic these will be checked if they are installed.
55 # Will be offered to install these if they are not already installed.
b361e70 @justinfrench fixed activesupport and actionpack dependencies, generated a new gemspec
authored
56 s.add_dependency 'activesupport', '>= 2.3.0'
57 s.add_dependency 'actionpack', '>= 2.3.0'
b86764b @grimen Enhanced the Rakefile a bit to make it handle missing RSpec dependenc…
grimen authored
58
59 # Development dependencies. Not installed by default.
60 # Install with: sudo gem install formtastic --development
61 s.add_development_dependency 'rspec-rails', '>= 1.2.6'
3875a5b @justinfrench Revert "bug-fix: Corrected incorrect gem dependency library names cau…
authored
62 s.add_development_dependency 'hpricot', '>= 0.6.1' # for: rspec_hpricot_matchers
63 s.add_development_dependency 'rspec_hpricot_matchers', '>= 1.0.0'
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
64 end
b86764b @grimen Enhanced the Rakefile a bit to make it handle missing RSpec dependenc…
grimen authored
65
66 Jeweler::GemcutterTasks.new
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
67 rescue LoadError
b86764b @grimen Enhanced the Rakefile a bit to make it handle missing RSpec dependenc…
grimen authored
68 puts "[formtastic:] Jeweler - or one of it's dependencies - is not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
350bf0a @justinfrench first cut of a gem rake task, gemspec and version 0.1.0 gem (I hope)
authored
69 end
70
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
71 desc 'Default: run unit specs.'
72 task :default => :spec
dcf8beb Initial Commit
Justin French authored
73
74 desc 'Generate documentation for the formtastic plugin.'
75 Rake::RDocTask.new(:rdoc) do |rdoc|
76 rdoc.rdoc_dir = 'rdoc'
77 rdoc.title = 'Formtastic'
78 rdoc.options << '--line-numbers' << '--inline-source'
8e2ca3a @justinfrench modified Rakefile to build with README.textile
authored
79 rdoc.rdoc_files.include('README.textile')
dcf8beb Initial Commit
Justin French authored
80 rdoc.rdoc_files.include('lib/**/*.rb')
81 end
7fef413 @justinfrench added a rake task 'specdoc' for running the specs with specdoc format…
authored
82
b86764b @grimen Enhanced the Rakefile a bit to make it handle missing RSpec dependenc…
grimen authored
83 if defined?(Spec)
84 desc 'Test the formtastic plugin.'
85 Spec::Rake::SpecTask.new('spec') do |t|
86 t.spec_files = FileList['spec/**/*_spec.rb']
87 t.spec_opts = ["-c"]
88 end
89
90 desc 'Test the formtastic plugin with specdoc formatting and colors'
91 Spec::Rake::SpecTask.new('specdoc') do |t|
92 t.spec_files = FileList['spec/**/*_spec.rb']
93 t.spec_opts = ["--format specdoc", "-c"]
94 end
95
96 desc "Run all examples with RCov"
97 Spec::Rake::SpecTask.new('examples_with_rcov') do |t|
98 t.spec_files = FileList['spec/**/*_spec.rb']
99 t.rcov = true
100 t.rcov_opts = ['--exclude', 'spec,Library']
101 end
a27aa2b @justinfrench Added in a Rake task for running the specs with rcov, plus a line in …
authored
102 end
Something went wrong with that request. Please try again.