Commit 49c8460e by Gabe Berke-Williams

Use Bundler gem conventions.

This also removes Pry.
parent bc5c51d1
*~ *~
*.swp *.swp
.rvmrc
.bundle
tmp tmp
test/s3.yml test/s3.yml
test/debug.log
test/paperclip.db
test/doc
test/pkg
test/tmp
public public
paperclip*.gem paperclip*.gem
capybara*.html capybara*.html
*.rbc *.rbc
.bundle .rbx
*SPIKE* *SPIKE*
.rvmrc
*emfile.lock *emfile.lock
.rbx
source "http://rubygems.org" source "http://rubygems.org"
gem "activerecord", :require => "active_record" gemspec
gem "appraisal"
gem "aruba"
gem "aws-s3", :require => "aws/s3"
gem "bundler"
gem "cocaine", "~>0.2"
gem "fog"
gem "jruby-openssl", :platform => :jruby
gem "mime-types"
gem "mocha"
gem "rake"
gem "rdoc", :require => false
gem "capybara"
gem "cucumber", "~> 1.0.0"
gem "shoulda"
gem "sqlite3", "~>1.3.4"
gem "fakeweb", :require => false
gem 'pry' gem "jruby-openssl", :platform => :jruby
require 'rubygems' require 'bundler'
require 'bundler/setup'
require 'appraisal' require 'appraisal'
require 'rake'
require 'rake/testtask' require 'rake/testtask'
require 'rdoc/task'
require 'cucumber/rake/task' require 'cucumber/rake/task'
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') Bundler::GemHelper.install_tasks
require 'paperclip'
desc 'Default: run unit tests.' desc 'Default: run unit tests.'
task :default => [:clean, 'appraisal:install', :all] task :default => [:clean, 'appraisal:install', :all]
...@@ -36,20 +31,6 @@ task :shell do |t| ...@@ -36,20 +31,6 @@ task :shell do |t|
exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init' exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init'
end end
desc 'Generate documentation for the paperclip plugin.'
RDoc::Task.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.' desc 'Clean up files.'
task :clean do |t| task :clean do |t|
FileUtils.rm_rf "doc" FileUtils.rm_rf "doc"
...@@ -60,27 +41,3 @@ task :clean do |t| ...@@ -60,27 +41,3 @@ task :clean do |t|
FileUtils.rm "test/paperclip.db" rescue nil FileUtils.rm "test/paperclip.db" rescue nil
Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f } Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
end 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
...@@ -2,24 +2,8 @@ ...@@ -2,24 +2,8 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "sqlite3", "~>1.3.4"
gem "fakeweb", :require=>false
gem "rails", "~> 2.3.14"
gem "activerecord", :require=>"active_record"
gem "pry"
gem "cocaine", "~>0.2"
gem "rake"
gem "shoulda"
gem "mime-types"
gem "aruba"
gem "jruby-openssl", :platform=>:jruby gem "jruby-openssl", :platform=>:jruby
gem "rails", "~> 2.3.14"
gem "paperclip", :path=>"../" gem "paperclip", :path=>"../"
gem "mocha"
gem "bundler"
gem "fog"
gem "cucumber", "~> 1.0.0"
gem "appraisal"
gem "aws-s3", :require=>"aws/s3"
gem "rdoc", :require=>false
gem "capybara"
gemspec :path=>"../"
\ No newline at end of file
...@@ -2,24 +2,8 @@ ...@@ -2,24 +2,8 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "sqlite3", "~>1.3.4"
gem "fakeweb", :require=>false
gem "rails", "~> 3.0.10"
gem "activerecord", :require=>"active_record"
gem "pry"
gem "cocaine", "~>0.2"
gem "rake"
gem "shoulda"
gem "mime-types"
gem "aruba"
gem "jruby-openssl", :platform=>:jruby gem "jruby-openssl", :platform=>:jruby
gem "rails", "~> 3.0.10"
gem "paperclip", :path=>"../" gem "paperclip", :path=>"../"
gem "mocha"
gem "bundler"
gem "fog"
gem "cucumber", "~> 1.0.0"
gem "appraisal"
gem "aws-s3", :require=>"aws/s3"
gem "rdoc", :require=>false
gem "capybara"
gemspec :path=>"../"
\ No newline at end of file
...@@ -2,24 +2,8 @@ ...@@ -2,24 +2,8 @@
source "http://rubygems.org" source "http://rubygems.org"
gem "sqlite3", "~>1.3.4"
gem "fakeweb", :require=>false
gem "rails", "~> 3.1.0"
gem "activerecord", :require=>"active_record"
gem "pry"
gem "cocaine", "~>0.2"
gem "rake"
gem "shoulda"
gem "mime-types"
gem "aruba"
gem "jruby-openssl", :platform=>:jruby gem "jruby-openssl", :platform=>:jruby
gem "rails", "~> 3.1.0"
gem "paperclip", :path=>"../" gem "paperclip", :path=>"../"
gem "mocha"
gem "bundler"
gem "fog"
gem "cucumber", "~> 1.0.0"
gem "appraisal"
gem "aws-s3", :require=>"aws/s3"
gem "rdoc", :require=>false
gem "capybara"
gemspec :path=>"../"
\ No newline at end of file
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') $LOAD_PATH.push File.expand_path("../lib", __FILE__)
require 'paperclip/version' require 'paperclip/version'
include_files = ["README*", "LICENSE", "Rakefile", "init.rb", "{lib,tasks,test,rails,generators,shoulda_macros}/**/*"].map do |glob| Gem::Specification.new do |s|
Dir[glob]
end.flatten
exclude_files = ["**/*.rbc", "test/s3.yml", "test/debug.log", "test/paperclip.db", "test/doc", "test/doc/*", "test/pkg", "test/pkg/*", "test/tmp", "test/tmp/*"].map do |glob|
Dir[glob]
end.flatten
spec = Gem::Specification.new do |s|
s.name = "paperclip" s.name = "paperclip"
s.version = Paperclip::VERSION s.version = Paperclip::VERSION
s.platform = Gem::Platform::RUBY
s.author = "Jon Yurek" s.author = "Jon Yurek"
s.email = "jyurek@thoughtbot.com" s.email = ["jyurek@thoughtbot.com"]
s.homepage = "https://github.com/thoughtbot/paperclip" s.homepage = "https://github.com/thoughtbot/paperclip"
s.description = "Easy upload management for ActiveRecord"
s.platform = Gem::Platform::RUBY
s.summary = "File attachments as attributes for ActiveRecord" s.summary = "File attachments as attributes for ActiveRecord"
s.files = include_files - exclude_files s.description = "Easy upload management for ActiveRecord"
s.require_path = "lib"
s.test_files = Dir["test/**/test_*.rb"]
s.rubyforge_project = "paperclip" s.rubyforge_project = "paperclip"
s.extra_rdoc_files = Dir["README*"]
s.rdoc_options << '--line-numbers' << '--inline-source' s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.requirements << "ImageMagick" s.requirements << "ImageMagick"
s.add_dependency 'activerecord', '>=2.3.0'
s.add_dependency 'activesupport', '>=2.3.2' s.add_dependency('activerecord', '>= 2.3.0')
s.add_dependency 'cocaine', '>=0.0.2' s.add_dependency('activesupport', '>= 2.3.2')
s.add_dependency 'mime-types' s.add_dependency('cocaine', '>= 0.0.2')
s.add_development_dependency 'shoulda' s.add_dependency('mime-types')
s.add_development_dependency 'appraisal'
s.add_development_dependency 'mocha' s.add_development_dependency('shoulda')
s.add_development_dependency 'aws-s3' s.add_development_dependency('appraisal', '~> 0.4.0')
s.add_development_dependency 'sqlite3' s.add_development_dependency('mocha')
s.add_development_dependency 'cucumber' s.add_development_dependency('aws-s3')
s.add_development_dependency 'capybara' s.add_development_dependency('sqlite3', '~> 1.3.4')
s.add_development_dependency('cucumber', '~> 1.0.0')
s.add_development_dependency('aruba')
s.add_development_dependency('capybara')
s.add_development_dependency('bundler')
s.add_development_dependency('cocaine', '~> 0.2')
s.add_development_dependency('fog')
s.add_development_dependency('rake')
s.add_development_dependency('fakeweb')
end end
...@@ -10,7 +10,6 @@ require 'active_record' ...@@ -10,7 +10,6 @@ require 'active_record'
require 'active_record/version' require 'active_record/version'
require 'active_support' require 'active_support'
require 'mime/types' require 'mime/types'
require 'pry'
require 'pathname' require 'pathname'
puts "Testing against version #{ActiveRecord::VERSION::STRING}" puts "Testing against version #{ActiveRecord::VERSION::STRING}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment