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"
gemspec
gem 'sqlite3', '~> 1.3.4', :platform => :ruby
gem 'jruby-openssl', :platform => :jruby
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
gem 'rubysl', :platform => :rbx
gem 'sqlite3', '1.3.8', :platforms => :ruby
gem 'jruby-openssl', :platforms => :jruby
gem 'activerecord-jdbcsqlite3-adapter', :platforms => :jruby
gem 'rubysl', :platforms => :rbx
gem 'racc', :platforms => :rbx
# Hinting at development dependencies
# Prevents bundler from taking a long-time to resolve
......
......@@ -11,8 +11,10 @@ task :all do |t|
if ENV['BUNDLE_GEMFILE']
exec('rake spec cucumber')
else
exec("rm gemfiles/*.lock")
Rake::Task["appraisal:gemfiles"].execute
Rake::Task["appraisal:install"].execute
exec('rake appraisal spec cucumber')
exec('rake appraisal')
end
end
......
......@@ -8,18 +8,18 @@ Given /^I generate a new rails application$/ do
"""
source "http://rubygems.org"
gem "rails", "#{framework_version}"
gem "sqlite3", :platform => :ruby
gem "sqlite3", "1.3.8", :platform => [:ruby, :rbx]
gem "activerecord-jdbcsqlite3-adapter", :platform => :jruby
gem "jruby-openssl", :platform => :jruby
gem "capybara"
gem "gherkin"
gem "aws-sdk"
gem "racc", :platform => :rbx
gem "rubysl", :platform => :rbx
"""
And I remove turbolinks
And I empty the application.js file
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
......
......@@ -2,4 +2,4 @@ source "http://rubygems.org"
gem "rails", "RAILS_VERSION"
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
ENV['RAILS_ENV'] = 'test'
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
end
......
......@@ -2,10 +2,11 @@
source "https://rubygems.org"
gem "sqlite3", "~> 1.3.4", :platform=>:ruby
gem "jruby-openssl", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "rubysl", :platform=>:rbx
gem "sqlite3", "1.3.8", :platforms=>:ruby
gem "jruby-openssl", :platforms=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platforms=>:jruby
gem "rubysl", :platforms=>:rbx
gem "racc", :platforms=>:rbx
gem "rails", "~> 3.2.15"
gem "paperclip", :path=>"../"
......
......@@ -2,10 +2,11 @@
source "https://rubygems.org"
gem "sqlite3", "~> 1.3.4", :platform=>:ruby
gem "jruby-openssl", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "rubysl", :platform=>:rbx
gem "sqlite3", "1.3.8", :platforms=>:ruby
gem "jruby-openssl", :platforms=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platforms=>:jruby
gem "rubysl", :platforms=>:rbx
gem "racc", :platforms=>:rbx
gem "rails", "~> 4.0.0"
gem "paperclip", :path=>"../"
......
......@@ -2,10 +2,11 @@
source "https://rubygems.org"
gem "sqlite3", "~> 1.3.4", :platform=>:ruby
gem "jruby-openssl", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "rubysl", :platform=>:rbx
gem "sqlite3", "1.3.8", :platforms=>:ruby
gem "jruby-openssl", :platforms=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platforms=>:jruby
gem "rubysl", :platforms=>:rbx
gem "racc", :platforms=>:rbx
gem "rails", "~> 4.1.0.beta"
gem "paperclip", :path=>"../"
......
......@@ -260,7 +260,7 @@ describe Paperclip::Thumbnail do
context "passing a custom file geometry parser" do
after do
Object.send(:remove_const, :GeoParser)
Object.send(:remove_const, :GeoParser) if Object.const_defined?(:GeoParser)
end
it "produces the appropriate transformation_command" do
......@@ -291,7 +291,7 @@ describe Paperclip::Thumbnail do
context "passing a custom geometry string parser" do
after do
Object.send(:remove_const, :GeoParser)
Object.send(:remove_const, :GeoParser) if Object.const_defined?(:GeoParser)
end
it "produces the appropriate transformation_command" do
......
......@@ -21,7 +21,7 @@ describe Paperclip::Validators do
it 'prevents you from attaching a file that violates that validation' do
Dummy.class_eval{ validate(:name) { raise "DO NOT RUN THIS" } }
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? }
end
end
......@@ -42,7 +42,7 @@ describe Paperclip::Validators do
end
end
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
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