Commit 743e2e00 by Jon Yurek

Changes to get rbx passing

First off, sqlite3 needs to be exactly v1.3.8.
Need to make sure both racc and rubysl are in the Gemfiles.
RBX's File.join doesn't like nil at all.
RBX also doesn't like to remove a constant that doesn't exist yet.
parent 71727f49
...@@ -2,10 +2,13 @@ source "https://rubygems.org" ...@@ -2,10 +2,13 @@ source "https://rubygems.org"
gemspec gemspec
gem 'sqlite3', '~> 1.3.4', :platform => :ruby gem 'sqlite3', '1.3.8', :platforms => :ruby
gem 'jruby-openssl', :platform => :jruby
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby gem 'jruby-openssl', :platforms => :jruby
gem 'rubysl', :platform => :rbx gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby
gem 'rubysl', :platforms => :rbx
gem 'racc', :platforms => :rbx
# Hinting at development dependencies # Hinting at development dependencies
# Prevents bundler from taking a long-time to resolve # Prevents bundler from taking a long-time to resolve
......
...@@ -11,8 +11,10 @@ task :all do |t| ...@@ -11,8 +11,10 @@ task :all do |t|
if ENV['BUNDLE_GEMFILE'] if ENV['BUNDLE_GEMFILE']
exec('rake spec cucumber') exec('rake spec cucumber')
else else
exec("rm gemfiles/*.lock")
Rake::Task["appraisal:gemfiles"].execute
Rake::Task["appraisal:install"].execute Rake::Task["appraisal:install"].execute
exec('rake appraisal spec cucumber') exec('rake appraisal')
end end
end end
......
...@@ -8,18 +8,18 @@ Given /^I generate a new rails application$/ do ...@@ -8,18 +8,18 @@ Given /^I generate a new rails application$/ do
""" """
source "http://rubygems.org" source "http://rubygems.org"
gem "rails", "#{framework_version}" gem "rails", "#{framework_version}"
gem "sqlite3", :platform => :ruby gem "sqlite3", "1.3.8", :platform => [:ruby, :rbx]
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
gem "jruby-openssl", :platform => :jruby gem "jruby-openssl", :platform => :jruby
gem "capybara" gem "capybara"
gem "gherkin" gem "gherkin"
gem "aws-sdk" gem "aws-sdk"
gem "racc", :platform => :rbx
gem "rubysl", :platform => :rbx
""" """
And I remove turbolinks And I remove turbolinks
And I empty the application.js file And I empty the application.js file
And I configure the application to use "paperclip" from this project And I configure the application to use "paperclip" from this project
And I reset Bundler environment variable
And I successfully run `bundle install --local`
} }
end end
......
...@@ -2,4 +2,4 @@ source "http://rubygems.org" ...@@ -2,4 +2,4 @@ source "http://rubygems.org"
gem "rails", "RAILS_VERSION" gem "rails", "RAILS_VERSION"
gem "rdoc" gem "rdoc"
gem "sqlite3" gem "sqlite3", "1.3.8"
...@@ -6,7 +6,8 @@ ORIGINAL_BUNDLE_VARS = Hash[ENV.select{ |key,value| BUNDLE_ENV_VARS.include?(key ...@@ -6,7 +6,8 @@ ORIGINAL_BUNDLE_VARS = Hash[ENV.select{ |key,value| BUNDLE_ENV_VARS.include?(key
ENV['RAILS_ENV'] = 'test' ENV['RAILS_ENV'] = 'test'
Before do Before do
ENV['BUNDLE_GEMFILE'] = File.join(Dir.pwd, ENV['BUNDLE_GEMFILE']) unless ENV['BUNDLE_GEMFILE'].start_with?(Dir.pwd) gemfile = ENV['BUNDLE_GEMFILE'].to_s
ENV['BUNDLE_GEMFILE'] = File.join(Dir.pwd, gemfile) unless gemfile.start_with?(Dir.pwd)
@framework_version = nil @framework_version = nil
end end
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "sqlite3", "~> 1.3.4", :platform=>:ruby gem "sqlite3", "1.3.8", :platforms=>:ruby
gem "jruby-openssl", :platform=>:jruby gem "jruby-openssl", :platforms=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby gem "activerecord-jdbcsqlite3-adapter", :platforms=>:jruby
gem "rubysl", :platform=>:rbx gem "rubysl", :platforms=>:rbx
gem "racc", :platforms=>:rbx
gem "rails", "~> 3.2.15" gem "rails", "~> 3.2.15"
gem "paperclip", :path=>"../" gem "paperclip", :path=>"../"
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "sqlite3", "~> 1.3.4", :platform=>:ruby gem "sqlite3", "1.3.8", :platforms=>:ruby
gem "jruby-openssl", :platform=>:jruby gem "jruby-openssl", :platforms=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby gem "activerecord-jdbcsqlite3-adapter", :platforms=>:jruby
gem "rubysl", :platform=>:rbx gem "rubysl", :platforms=>:rbx
gem "racc", :platforms=>:rbx
gem "rails", "~> 4.0.0" gem "rails", "~> 4.0.0"
gem "paperclip", :path=>"../" gem "paperclip", :path=>"../"
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
source "https://rubygems.org" source "https://rubygems.org"
gem "sqlite3", "~> 1.3.4", :platform=>:ruby gem "sqlite3", "1.3.8", :platforms=>:ruby
gem "jruby-openssl", :platform=>:jruby gem "jruby-openssl", :platforms=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby gem "activerecord-jdbcsqlite3-adapter", :platforms=>:jruby
gem "rubysl", :platform=>:rbx gem "rubysl", :platforms=>:rbx
gem "racc", :platforms=>:rbx
gem "rails", "~> 4.1.0.beta" gem "rails", "~> 4.1.0.beta"
gem "paperclip", :path=>"../" gem "paperclip", :path=>"../"
......
...@@ -260,7 +260,7 @@ describe Paperclip::Thumbnail do ...@@ -260,7 +260,7 @@ describe Paperclip::Thumbnail do
context "passing a custom file geometry parser" do context "passing a custom file geometry parser" do
after do after do
Object.send(:remove_const, :GeoParser) Object.send(:remove_const, :GeoParser) if Object.const_defined?(:GeoParser)
end end
it "produces the appropriate transformation_command" do it "produces the appropriate transformation_command" do
...@@ -291,7 +291,7 @@ describe Paperclip::Thumbnail do ...@@ -291,7 +291,7 @@ describe Paperclip::Thumbnail do
context "passing a custom geometry string parser" do context "passing a custom geometry string parser" do
after do after do
Object.send(:remove_const, :GeoParser) Object.send(:remove_const, :GeoParser) if Object.const_defined?(:GeoParser)
end end
it "produces the appropriate transformation_command" do it "produces the appropriate transformation_command" do
......
...@@ -21,7 +21,7 @@ describe Paperclip::Validators do ...@@ -21,7 +21,7 @@ describe Paperclip::Validators do
it 'prevents you from attaching a file that violates that validation' do it 'prevents you from attaching a file that violates that validation' do
Dummy.class_eval{ validate(:name) { raise "DO NOT RUN THIS" } } Dummy.class_eval{ validate(:name) { raise "DO NOT RUN THIS" } }
dummy = Dummy.new(avatar: File.new(fixture_file("12k.png"))) dummy = Dummy.new(avatar: File.new(fixture_file("12k.png")))
assert_equal [:avatar_content_type, :avatar, :avatar_file_size], dummy.errors.keys expect(dummy.errors.keys).to match_array [:avatar_content_type, :avatar, :avatar_file_size]
assert_raises(RuntimeError){ dummy.valid? } assert_raises(RuntimeError){ dummy.valid? }
end end
end end
...@@ -42,7 +42,7 @@ describe Paperclip::Validators do ...@@ -42,7 +42,7 @@ describe Paperclip::Validators do
end end
end end
dummy = Dummy.new(avatar: File.new(fixture_file("12k.png"))) dummy = Dummy.new(avatar: File.new(fixture_file("12k.png")))
assert_equal [:avatar_content_type, :avatar, :avatar_file_size], dummy.errors.keys expect(dummy.errors.keys).to match_array [:avatar_content_type, :avatar, :avatar_file_size]
end end
it "does not validate attachment if title is not present" do it "does not validate attachment if title is not present" do
......
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