Skip to content

HTTPS clone URL

Subversion checkout URL

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