Permalink
Browse files

Trying to get some continuous testing up and running. Taking papercli…

…p as a best practice example
  • Loading branch information...
1 parent 0c4cf7c commit 9af9ab64a1593593513dd4fab44b256ac89bb22e @Bertg Bertg committed Aug 29, 2011
View
@@ -0,0 +1,11 @@
+rvm:
+ - 1.8.7
+ - 1.9.2
+ - ree
+ - rbx-2.0
+
+script: "bundle exec rake clean test"
+gemfile:
+ - gemfiles/rails2.gemfile
+ - gemfiles/rails3.gemfile
+ - gemfiles/rails3_1.gemfile
View
@@ -0,0 +1,11 @@
+appraise "rails2" do
+ gem "rails", "~> 2.3.12"
+end
+
+appraise "rails3" do
+ gem "rails", "~> 3.0.9"
+end
+
+appraise "rails3_1" do
+ gem "rails", "~> 3.1.0.rc5"
+end
View
@@ -1,3 +1,8 @@
-source :rubygems
+source "http://rubygems.org"
-gemspec
+gem "paperclip"
+gem "appraisal"
+gem "mocha"
+gem "sqlite3"
+gem "delayed_job"
+gem "resque"
View
@@ -1,15 +1,36 @@
+require 'rubygems'
+require 'bundler/setup'
+
+require 'appraisal'
+
require 'rake'
require 'rake/testtask'
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
+
desc 'Default: run unit tests.'
-task :default => :test
+task :default => [:clean, 'appraisal:install', :all]
+
+desc 'Test the paperclip plugin under all supported Rails versions.'
+task :all do |t|
+ exec('rake appraisal test')
+end
+
+desc 'Clean up files.'
+task :clean do |t|
+ FileUtils.rm_rf "doc"
+ FileUtils.rm_rf "tmp"
+ FileUtils.rm_rf "pkg"
+ FileUtils.rm_rf "public"
+ FileUtils.rm "test/debug.log" rescue nil
+ FileUtils.rm "test/paperclip.db" rescue nil
+ Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
+end
desc 'Test the paperclip plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib:test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
-
@@ -1,20 +1,29 @@
-Gem::Specification.new do |s|
- s.name = %q{delayed_paperclip}
- s.version = "0.7.2"
- s.authors = ["Jesse Storimer", "Bert Goethals"]
- s.summary = %q{Process your Paperclip attachments in the background.}
+include_files = ["README*", "LICENSE", "Rakefile", "init.rb", "{lib,tasks,test,rails,generators,shoulda_macros}/**/*"].map do |glob|
+ 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 = %q{delayed_paperclip}
+ s.version = "0.7.2"
+
+ s.authors = ["Jesse Storimer", "Bert Goethals"]
+ s.summary = %q{Process your Paperclip attachments in the background.}
s.description = %q{Process your Paperclip attachments in the background with delayed_job, Resque or your own processor.}
- s.email = %q{jesse@jstorimer.com}
- s.homepage = %q{http://github.com/jstorimer/delayed_paperclip}
+ s.email = %q{jesse@jstorimer.com}
+ s.homepage = %q{http://github.com/jstorimer/delayed_paperclip}
+
+ s.files = include_files - exclude_files
- s.files = `git ls-files`.split("\n")
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.test_files = Dir["test/**/*,rb"] + Dir['test/features/*']
- s.add_runtime_dependency 'paperclip', ["~> 2.3.9"]
+ s.add_dependency 'paperclip', ["~> 2.3.9"]
s.add_development_dependency 'mocha'
- s.add_development_dependency 'sqlite3-ruby'
+ s.add_development_dependency 'sqlite3'
s.add_development_dependency 'delayed_job'
s.add_development_dependency 'resque'
end
@@ -0,0 +1,12 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "paperclip"
+gem "appraisal"
+gem "mocha"
+gem "sqlite3"
+gem "delayed_job"
+gem "resque"
+gem "rails", "~> 2.3.12"
+
@@ -0,0 +1,65 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ actionmailer (2.3.14)
+ actionpack (= 2.3.14)
+ actionpack (2.3.14)
+ activesupport (= 2.3.14)
+ rack (~> 1.1.0)
+ activerecord (2.3.14)
+ activesupport (= 2.3.14)
+ activeresource (2.3.14)
+ activesupport (= 2.3.14)
+ activesupport (2.3.14)
+ appraisal (0.3.8)
+ bundler
+ rake
+ cocaine (0.2.0)
+ daemons (1.0.10)
+ delayed_job (2.0.7)
+ activesupport (~> 2.0)
+ daemons (= 1.0.10)
+ json (1.5.3)
+ mime-types (1.16)
+ mocha (0.9.12)
+ paperclip (2.3.16)
+ activerecord (>= 2.3.0)
+ activesupport (>= 2.3.2)
+ cocaine (>= 0.0.2)
+ mime-types
+ rack (1.1.2)
+ rails (2.3.14)
+ actionmailer (= 2.3.14)
+ actionpack (= 2.3.14)
+ activerecord (= 2.3.14)
+ activeresource (= 2.3.14)
+ activesupport (= 2.3.14)
+ rake (>= 0.8.3)
+ rake (0.9.2)
+ redis (2.2.2)
+ redis-namespace (1.0.3)
+ redis (< 3.0.0)
+ resque (1.17.1)
+ json (< 1.6, >= 1.4.6)
+ redis-namespace (~> 1.0.2)
+ sinatra (>= 0.9.2)
+ vegas (~> 0.1.2)
+ sinatra (1.2.6)
+ rack (~> 1.1)
+ tilt (< 2.0, >= 1.2.2)
+ sqlite3 (1.3.4)
+ tilt (1.3.3)
+ vegas (0.1.8)
+ rack (>= 1.0.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ appraisal
+ delayed_job
+ mocha
+ paperclip
+ rails (~> 2.3.12)
+ resque
+ sqlite3
@@ -0,0 +1,12 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "paperclip"
+gem "appraisal"
+gem "mocha"
+gem "sqlite3"
+gem "delayed_job"
+gem "resque"
+gem "rails", "~> 3.0.9"
+
@@ -0,0 +1,110 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.10)
+ actionpack (= 3.0.10)
+ mail (~> 2.2.19)
+ actionpack (3.0.10)
+ activemodel (= 3.0.10)
+ activesupport (= 3.0.10)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.10)
+ activesupport (= 3.0.10)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.10)
+ activemodel (= 3.0.10)
+ activesupport (= 3.0.10)
+ arel (~> 2.0.10)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.10)
+ activemodel (= 3.0.10)
+ activesupport (= 3.0.10)
+ activesupport (3.0.10)
+ appraisal (0.3.8)
+ bundler
+ rake
+ arel (2.0.10)
+ builder (2.1.2)
+ cocaine (0.2.0)
+ daemons (1.1.4)
+ delayed_job (2.1.4)
+ activesupport (~> 3.0)
+ daemons
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.5.0)
+ json (1.5.3)
+ mail (2.2.19)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ mocha (0.9.12)
+ paperclip (2.3.16)
+ activerecord (>= 2.3.0)
+ activesupport (>= 2.3.2)
+ cocaine (>= 0.0.2)
+ mime-types
+ polyglot (0.3.2)
+ rack (1.2.3)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.10)
+ actionmailer (= 3.0.10)
+ actionpack (= 3.0.10)
+ activerecord (= 3.0.10)
+ activeresource (= 3.0.10)
+ activesupport (= 3.0.10)
+ bundler (~> 1.0)
+ railties (= 3.0.10)
+ railties (3.0.10)
+ actionpack (= 3.0.10)
+ activesupport (= 3.0.10)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.4)
+ rake (0.9.2)
+ rdoc (3.9.4)
+ redis (2.2.2)
+ redis-namespace (1.0.3)
+ redis (< 3.0.0)
+ resque (1.17.1)
+ json (< 1.6, >= 1.4.6)
+ redis-namespace (~> 1.0.2)
+ sinatra (>= 0.9.2)
+ vegas (~> 0.1.2)
+ sinatra (1.2.6)
+ rack (~> 1.1)
+ tilt (< 2.0, >= 1.2.2)
+ sqlite3 (1.3.4)
+ thor (0.14.6)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.29)
+ vegas (0.1.8)
+ rack (>= 1.0.0)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ appraisal
+ delayed_job
+ mocha
+ paperclip
+ rails (~> 3.0.9)
+ resque
+ sqlite3
@@ -0,0 +1,12 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "paperclip"
+gem "appraisal"
+gem "mocha"
+gem "sqlite3"
+gem "delayed_job"
+gem "resque"
+gem "rails", "~> 3.1.0.rc5"
+
Oops, something went wrong.

0 comments on commit 9af9ab6

Please sign in to comment.