diff options
| author | hukl <contact@smyck.org> | 2009-04-24 11:43:08 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-04-25 14:55:27 +0200 |
| commit | cf1b60e0cfa7d1a8f4a80d686649cc12e73a634e (patch) | |
| tree | b68bd845d290ce968892c4532bcff52083925834 /vendor/plugins/paperclip/Rakefile | |
| parent | b2b78c06074046bd73cc3408a29386a976f0469c (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/Rakefile | 77 |
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 @@ | |||
| 1 | require 'rake' | ||
| 2 | require 'rake/testtask' | ||
| 3 | require 'rake/rdoctask' | ||
| 4 | |||
| 5 | $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') | ||
| 6 | require 'paperclip' | ||
| 7 | |||
| 8 | desc 'Default: run unit tests.' | ||
| 9 | task :default => [:clean, :test] | ||
| 10 | |||
| 11 | desc 'Test the paperclip plugin.' | ||
| 12 | Rake::TestTask.new(:test) do |t| | ||
| 13 | t.libs << 'lib' << 'profile' | ||
| 14 | t.pattern = 'test/**/*_test.rb' | ||
| 15 | t.verbose = true | ||
| 16 | end | ||
| 17 | |||
| 18 | desc 'Start an IRB session with all necessary files required.' | ||
| 19 | task :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' | ||
| 22 | end | ||
| 23 | |||
| 24 | desc 'Generate documentation for the paperclip plugin.' | ||
| 25 | Rake::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') | ||
| 31 | end | ||
| 32 | |||
| 33 | desc 'Update documentation on website' | ||
| 34 | task :sync_docs => 'rdoc' do | ||
| 35 | `rsync -ave ssh doc/ dev@dev.thoughtbot.com:/home/dev/www/dev.thoughtbot.com/paperclip` | ||
| 36 | end | ||
| 37 | |||
| 38 | desc 'Clean up files.' | ||
| 39 | task :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 | ||
| 45 | end | ||
| 46 | |||
| 47 | spec = 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' | ||
| 70 | end | ||
| 71 | |||
| 72 | desc "Generate a gemspec file for GitHub" | ||
| 73 | task :gemspec do | ||
| 74 | File.open("#{spec.name}.gemspec", 'w') do |f| | ||
| 75 | f.write spec.to_ruby | ||
| 76 | end | ||
| 77 | end | ||
