Sha256: 59863a5edcc75fd71872ee85186957d79defee46968e329a0c5c889a011b1e0d

Contents?: true

Size: 1.93 KB

Versions: 18

Compression:

Stored size: 1.93 KB

Contents

require 'rubygems'
require 'appraisal'
require 'bundler/setup'

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, :all]

desc 'Test the paperclip plugin under all supported Rails versions.'
task :all do |t|
  exec('rake appraisal test')
end

desc 'Test the paperclip plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib' << 'profile'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end

desc 'Start an IRB session with all necessary files required.'
task :shell do |t|
  chdir File.dirname(__FILE__)
  exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init'
end

desc 'Generate documentation for the paperclip plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'doc'
  rdoc.title    = 'Paperclip'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

desc 'Update documentation on website'
task :sync_docs => 'rdoc' do
  `rsync -ave ssh doc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/paperclip`
end

desc 'Clean up files.'
task :clean do |t|
  FileUtils.rm_rf "doc"
  FileUtils.rm_rf "tmp"
  FileUtils.rm_rf "pkg"
  FileUtils.rm_rf "public"
  FileUtils.rm "test/debug.log" rescue nil
  FileUtils.rm "test/paperclip.db" rescue nil
  Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
end

desc 'Build the gemspec.'
task :gemspec do |t|
  exec 'gem build paperclip.gemspec'
end

desc "Print a list of the files to be put into the gem"
task :manifest => :clean do
  spec.files.each do |file|
    puts file
  end
end

desc "Generate a gemspec file for GitHub"
task :gemspec => :clean do
  File.open("#{spec.name}.gemspec", 'w') do |f|
    f.write spec.to_ruby
  end
end

desc "Build the gem into the current directory"
task :gem => :gemspec do
  `gem build #{spec.name}.gemspec`
end

Version data entries

18 entries across 18 versions & 9 rubygems

Version Path
cemeng-paperclip-2.3.6 Rakefile
paperclip-2.3.12 Rakefile
sayso-paperclip-2.3.10.001 Rakefile
ryansch-paperclip-2.3.10 Rakefile
paperclip-2.3.11 Rakefile
paperclip-2.3.10 Rakefile
paperclip-2.3.9 Rakefile
paperclip-youtube-2.3.8.2 Rakefile
paperclip-youtube-2.3.8.1 Rakefile
organicinternet-paperclip-2.3.8.1 Rakefile
arielvalentin-paperclip-2.3.6 Rakefile
twm_paperclip-2.3.8t Rakefile
reenhanced-paperclip-2.3.8 Rakefile
paperclip-2.3.8 Rakefile
paperclip-2.3.7 Rakefile
twm_paperclip-2.3.6b Rakefile
twm_paperclip-2.3.6 Rakefile
paperclip-2.3.6 Rakefile