Find file
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (45 sloc) 1.52 KB
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
require 'paperclip'
desc 'Default: run unit tests.'
task :default => [:clean, :test]
desc 'Test the paperclip plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc 'Generate documentation for the paperclip plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = 'Delayed::Paperclip'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
desc 'Clean up files.'
task :clean do |t|
FileUtils.rm_rf "doc"
FileUtils.rm_rf "tmp"
FileUtils.rm_rf "pkg"
FileUtils.rm "test/debug.log" rescue nil
FileUtils.rm "test/paperclip.db" rescue nil
Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
end
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "delayed_paperclip"
gemspec.summary = "Process your Paperclip attachments in the background with delayed_job."
gemspec.description = "Process your Paperclip attachments in the background with delayed_job."
gemspec.email = "jesse@jstorimer.com"
gemspec.homepage = "http://github.com/jstorimer/delayed_paperclip"
gemspec.authors = ["Jesse Storimer"]
gemspec.add_dependency('paperclip', '>= 2.3.0')
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
end