summaryrefslogtreecommitdiff
path: root/vendor/plugins/paperclip/Rakefile
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-04-24 11:43:08 +0200
committerhukl <contact@smyck.org>2009-04-25 14:55:27 +0200
commitcf1b60e0cfa7d1a8f4a80d686649cc12e73a634e (patch)
treeb68bd845d290ce968892c4532bcff52083925834 /vendor/plugins/paperclip/Rakefile
parentb2b78c06074046bd73cc3408a29386a976f0469c (diff)
Integrated basic Asset upload functionality. You can upload files now and use their url in pages.
Diffstat (limited to 'vendor/plugins/paperclip/Rakefile')
-rw-r--r--vendor/plugins/paperclip/Rakefile77
1 files changed, 77 insertions, 0 deletions
diff --git a/vendor/plugins/paperclip/Rakefile b/vendor/plugins/paperclip/Rakefile
new file mode 100644
index 0000000..91f1687
--- /dev/null
+++ b/vendor/plugins/paperclip/Rakefile
@@ -0,0 +1,77 @@
1require 'rake'
2require 'rake/testtask'
3require 'rake/rdoctask'
4
5$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
6require 'paperclip'
7
8desc 'Default: run unit tests.'
9task :default => [:clean, :test]
10
11desc 'Test the paperclip plugin.'
12Rake::TestTask.new(:test) do |t|
13 t.libs << 'lib' << 'profile'
14 t.pattern = 'test/**/*_test.rb'
15 t.verbose = true
16end
17
18desc 'Start an IRB session with all necessary files required.'
19task :shell do |t|
20 chdir File.dirname(__FILE__)
21 exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init'
22end
23
24desc 'Generate documentation for the paperclip plugin.'
25Rake::RDocTask.new(:rdoc) do |rdoc|
26 rdoc.rdoc_dir = 'doc'
27 rdoc.title = 'Paperclip'
28 rdoc.options << '--line-numbers' << '--inline-source'
29 rdoc.rdoc_files.include('README*')
30 rdoc.rdoc_files.include('lib/**/*.rb')
31end
32
33desc 'Update documentation on website'
34task :sync_docs => 'rdoc' do
35 `rsync -ave ssh doc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/paperclip`
36end
37
38desc 'Clean up files.'
39task :clean do |t|
40 FileUtils.rm_rf "doc"
41 FileUtils.rm_rf "tmp"
42 FileUtils.rm_rf "pkg"
43 FileUtils.rm "test/debug.log" rescue nil
44 FileUtils.rm "test/paperclip.db" rescue nil
45end
46
47spec = Gem::Specification.new do |s|
48 s.name = "paperclip"
49 s.version = Paperclip::VERSION
50 s.author = "Jon Yurek"
51 s.email = "jyurek@thoughtbot.com"
52 s.homepage = "http://www.thoughtbot.com/projects/paperclip"
53 s.platform = Gem::Platform::RUBY
54 s.summary = "File attachments as attributes for ActiveRecord"
55 s.files = FileList["README*",
56 "LICENSE",
57 "Rakefile",
58 "init.rb",
59 "{generators,lib,tasks,test,shoulda_macros}/**/*"].to_a
60 s.require_path = "lib"
61 s.test_files = FileList["test/**/test_*.rb"].to_a
62 s.rubyforge_project = "paperclip"
63 s.has_rdoc = true
64 s.extra_rdoc_files = FileList["README*"].to_a
65 s.rdoc_options << '--line-numbers' << '--inline-source'
66 s.requirements << "ImageMagick"
67 s.add_runtime_dependency 'right_aws'
68 s.add_development_dependency 'thoughtbot-shoulda'
69 s.add_development_dependency 'mocha'
70end
71
72desc "Generate a gemspec file for GitHub"
73task :gemspec do
74 File.open("#{spec.name}.gemspec", 'w') do |f|
75 f.write spec.to_ruby
76 end
77end