-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathRakefile
51 lines (39 loc) · 1.1 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
require 'rubygems'
require 'bundler/setup'
require 'rake'
require 'appraisal'
require 'bundler/setup'
require 'rspec/core/rake_task'
require 'rdoc/task'
Bundler::GemHelper.install_tasks
desc 'Default: run unit tests.'
task :default => [:clean, :test]
desc "Run Specs"
RSpec::Core::RakeTask.new(:spec) do |t|
end
task :test => :spec
desc 'Default: run unit tests.'
task :default => [:clean, :all]
desc 'Test the paperclip plugin under all supported Rails versions.'
task :all do |t|
if ENV['BUNDLE_GEMFILE']
exec('rake test')
else
Rake::Task["appraisal:install"].execute
exec('rake appraisal test')
end
end
desc "Clean up files."
task :clean do |t|
FileUtils.rm_rf "tmp"
Dir.glob("message_block-*.gem").each {|f| FileUtils.rm f }
end
desc "Generate documentation for the plugin."
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = "rdoc"
rdoc.title = "message_block"
rdoc.options << "--line-numbers" << "--inline-source"
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
Dir["#{File.dirname(__FILE__)}/lib/tasks/*.rake"].sort.each { |ext| load ext }