public
Description: Treat an ActiveRecord model as a file attachment, storing its patch, size, content type, etc.
Homepage: http://weblog.techno-weenie.net
Clone URL: git://github.com/technoweenie/attachment_fu.git
Click here to lend your support to: attachment_fu and make a donation at www.pledgie.com !
rick (author)
Wed Apr 23 01:02:54 -0700 2008
commit  748af7ea77c243d8520cd3351035710638821c79
tree    37f707dffe47766c11d994c290c15ea96dd78b9c
parent  47447569571d5d17e337215c5be42cb35547b181
attachment_fu / Rakefile
100644 53 lines (43 sloc) 1.495 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require 'rake'
require "rake/rdoctask"
require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'spec', 'spec_helper')
require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'
 
rdoc_files = FileList["{bin,lib,example_configs}/**/*"].to_a
extra_rdoc_files = %w(README COPYRIGHT RELEASES CHANGELOG)
 
Rake::RDocTask.new do |rd|
  rd.main = "README"
  rd.rdoc_files.include(rdoc_files, extra_rdoc_files)
  rd.rdoc_dir = "doc/rdoc/"
end
 
desc "Run all examples with RCov"
Spec::Rake::SpecTask.new(:rcov) do |t|
  t.spec_files = FileList['spec/**/*.rb']
  t.rcov = true
  t.rcov_opts = %w(--exclude spec --exclude activesupport --exclude activerecord)
  t.rcov_dir = "doc/rcov"
end
 
desc "Run all specs"
Spec::Rake::SpecTask.new(:spec) do |t|
  t.spec_files = FileList['spec/**/*.rb']
  t.rcov = false
end
 
desc "Generate RSpec Report"
task :rspec_report => [:clobber_rspec_report] do
  files = FileList["spec/**/*.rb"].to_s
  %x(spec #{files} --format html:doc/rspec_report.html)
end
 
task :clobber_rspec_report do
  %x(rm -rf doc/rspec_report.html)
end
 
desc "Generate all documentation"
task :generate_documentation => [:clobber_documentation, :rdoc, :rcov, :rspec_report]
 
desc "Remove all documentation"
task :clobber_documentation => [:clobber_rdoc, :clobber_rcov, :clobber_rspec_report]
 
desc "Build Release"
task :build_release => [:pre_commit, :generate_documentation, :repackage] do
  %x(mv pkg gem)
end
 
desc "Run this before commiting"
task :pre_commit => [:verify_rcov]