Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 81 lines (67 sloc) 1.981 kb
ffe6609 @jyurek Added Gemfiles and start using Appraisal
jyurek authored
1 require 'rubygems'
2 require 'appraisal'
3 require 'bundler/setup'
4
13318e6 Initial version
jyurek authored
5 require 'rake'
6 require 'rake/testtask'
7 require 'rake/rdoctask'
8
22b4c0c Rearranged stuff and added a gem build/deploy process. Official relea…
jyurek authored
9 $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
10 require 'paperclip'
11
13318e6 Initial version
jyurek authored
12 desc 'Default: run unit tests.'
9e3b5db @jyurek Added Appraisal to Gemfile and have the default task run all appraisals
jyurek authored
13 task :default => [:clean, :all]
13318e6 Initial version
jyurek authored
14
21802b3 @jyurek Added a rake task for testing all versions. Changed gem statements to…
jyurek authored
15 desc 'Test the paperclip plugin under all supported Rails versions.'
b65ea24 @jyurek Changed rake :all_versions to :all
jyurek authored
16 task :all do |t|
9e3b5db @jyurek Added Appraisal to Gemfile and have the default task run all appraisals
jyurek authored
17 exec('rake appraisal test')
21802b3 @jyurek Added a rake task for testing all versions. Changed gem statements to…
jyurek authored
18 end
19
13318e6 Initial version
jyurek authored
20 desc 'Test the paperclip plugin.'
21 Rake::TestTask.new(:test) do |t|
110df00 Extensive documentation, adding ability to crop thumbnails.
jyurek authored
22 t.libs << 'lib' << 'profile'
0effaa6 @jyurek Changed tests from test_*.rb to *_test.rb
jyurek authored
23 t.pattern = 'test/**/*_test.rb'
13318e6 Initial version
jyurek authored
24 t.verbose = true
25 end
26
52fb528 Fixed regexp that was losing the geometry modifiers.
jyurek authored
27 desc 'Start an IRB session with all necessary files required.'
28 task :shell do |t|
29 chdir File.dirname(__FILE__)
30 exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init'
31 end
32
13318e6 Initial version
jyurek authored
33 desc 'Generate documentation for the paperclip plugin.'
34 Rake::RDocTask.new(:rdoc) do |rdoc|
110df00 Extensive documentation, adding ability to crop thumbnails.
jyurek authored
35 rdoc.rdoc_dir = 'doc'
13318e6 Initial version
jyurek authored
36 rdoc.title = 'Paperclip'
37 rdoc.options << '--line-numbers' << '--inline-source'
e345764 @jyurek Updated documentation. Also changed the defaults of :path and :url to…
jyurek authored
38 rdoc.rdoc_files.include('README*')
13318e6 Initial version
jyurek authored
39 rdoc.rdoc_files.include('lib/**/*.rb')
40 end
110df00 Extensive documentation, adding ability to crop thumbnails.
jyurek authored
41
e35fa9e Fixed bug with default_url
jyurek authored
42 desc 'Update documentation on website'
43 task :sync_docs => 'rdoc' do
44 `rsync -ave ssh doc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/paperclip`
45 end
46
110df00 Extensive documentation, adding ability to crop thumbnails.
jyurek authored
47 desc 'Clean up files.'
48 task :clean do |t|
49 FileUtils.rm_rf "doc"
50 FileUtils.rm_rf "tmp"
b3703a1 Added gem building task to Rakefile
jyurek authored
51 FileUtils.rm_rf "pkg"
eefaa9c @jyurek The gemspec is a separate file which can handle itself.
jyurek authored
52 FileUtils.rm_rf "public"
110df00 Extensive documentation, adding ability to crop thumbnails.
jyurek authored
53 FileUtils.rm "test/debug.log" rescue nil
54 FileUtils.rm "test/paperclip.db" rescue nil
f47a4b5 @jyurek Added gem build task, gemspec cleans first
jyurek authored
55 Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
11086ba Re-refactoring, plus the beginning of lots of tests.
jyurek authored
56 end
b3703a1 Added gem building task to Rakefile
jyurek authored
57
eefaa9c @jyurek The gemspec is a separate file which can handle itself.
jyurek authored
58 desc 'Build the gemspec.'
59 task :gemspec do |t|
60 exec 'gem build paperclip.gemspec'
b3703a1 Added gem building task to Rakefile
jyurek authored
61 end
6d792fd @jyurek Attempt to get github gems built by excluding files from the gemspec
jyurek authored
62
63 desc "Print a list of the files to be put into the gem"
64 task :manifest => :clean do
65 spec.files.each do |file|
66 puts file
67 end
68 end
3be55fc @joshuaclayton Clean up whitespace
joshuaclayton authored
69
30ebb74 @jyurek Changes for gem building on github.
jyurek authored
70 desc "Generate a gemspec file for GitHub"
f47a4b5 @jyurek Added gem build task, gemspec cleans first
jyurek authored
71 task :gemspec => :clean do
30ebb74 @jyurek Changes for gem building on github.
jyurek authored
72 File.open("#{spec.name}.gemspec", 'w') do |f|
73 f.write spec.to_ruby
74 end
3be55fc @joshuaclayton Clean up whitespace
joshuaclayton authored
75 end
f47a4b5 @jyurek Added gem build task, gemspec cleans first
jyurek authored
76
77 desc "Build the gem into the current directory"
78 task :gem => :gemspec do
79 `gem build #{spec.name}.gemspec`
30ebb74 @jyurek Changes for gem building on github.
jyurek authored
80 end
Something went wrong with that request. Please try again.