mailcatcher/Rakefile

47 lines
1.1 KiB
Ruby
Raw Normal View History

require 'rubygems'
2011-05-28 02:21:11 -04:00
version_file = File.expand_path __FILE__ + '/../VERSION'
version = File.read version_file
spec_file = File.expand_path __FILE__ + '/../mailcatcher.gemspec'
spec = Gem::Specification.load spec_file
2011-05-28 02:21:11 -04:00
require 'rdoc/task'
RDoc::Task.new :rdoc => "rdoc",
:clobber_rdoc => "rdoc:clean",
:rerdoc => "rdoc:force" do |rdoc|
rdoc.title = "MailCatcher #{version}"
2011-05-27 00:16:48 -04:00
rdoc.rdoc_dir = 'rdoc'
2011-05-28 02:21:11 -04:00
rdoc.main = 'README.md'
rdoc.rdoc_files.include 'lib/**/*.rb'
end
desc "Compile SASS/SCSS files into SCSS"
task "build:sass" do
require 'sass'
Dir["public/stylesheets/**/*.scss"].each do |file|
Sass.compile_file file, file.sub(/\.scss$/, ".css"), :cache => false
end
end
task "build:rdoc" => "rdoc"
multitask "build" => ["build:sass", "build:rdoc"]
desc "Package as Gem"
task "package:gem" do
builder = Gem::Builder.new spec
builder.build
end
task "package" => ["build", "package:gem"]
desc "Release Gem to RubyGems"
task "release:gem" do
%x[gem push mailcatcher-#{version}.gem]
end
task "release" => ["package", "release:gem"]
task "default" => "build"