forked from jstorimer/delayed_paperclip
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
51 lines (45 loc) · 1.52 KB
/
Rakefile
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
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 = "[email protected]"
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