mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix CI on 0-10-stable (#2181)
* Loosen pry, pry-byebug depencency ``` Resolving dependencies... byebug-9.1.0 requires ruby version >= 2.2.0, which is incompatible with the current version, ruby 2.1.10p492 ``` * Adjust nokogiri version constraint for CI Update appveyor Ruby to 2.3 to work around: ``` Gem::InstallError: nokogiri requires Ruby version < 2.5, >= 2.2. An error occurred while installing nokogiri (1.8.0), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.8.0'` succeeds before bundling. ``` and not 2.4 since: https://ci.appveyor.com/project/bf4/active-model-serializers/build/1.0.1052-fix_ci/job/0q3itabsnvnxr83u ``` nokogiri-1.6.8.1-x86-mingw32 requires ruby version < 2.4, which is incompatible with the current version, ruby 2.4.1p111 ``` * Include rails gem in Gemfile (For Rails5) In Rails5, checking for Rails::Railtie is better * Rails5 test env requires Rails.application.class.name rails-42d09f6b49da/railties/lib/rails/application.rb ```ruby def secret_key_base if Rails.env.test? || Rails.env.development? Digest::MD5.hexdigest self.class.name ``` * Reformat exclude matrix to be easier to read * Simplify jruby-travis config per rails/rails * Organize .travis.yml per rails/rails * Allow JRuby failure on Rails 5+; try rails-5 db adapter branch https://github.com/jruby/activerecord-jdbc-adapter/issues/708 ``` uninitialized constant ActiveRecord::ConnectionAdapters::Column::Format ``` see https://travis-ci.org/rails-api/active_model_serializers/jobs/277112008
This commit is contained in:
committed by
L. Preston Sego III
parent
c2fa01624d
commit
6a7d864605
@@ -54,7 +54,7 @@ module TestHelpers
|
||||
require 'rails'
|
||||
require 'action_controller/railtie'
|
||||
|
||||
@app = Class.new(Rails::Application) do
|
||||
app = Class.new(Rails::Application) do
|
||||
config.eager_load = false
|
||||
config.session_store :cookie_store, key: '_myapp_session'
|
||||
config.active_support.deprecation = :log
|
||||
@@ -67,8 +67,10 @@ module TestHelpers
|
||||
config.logger = fake_logger
|
||||
Rails.application.routes.default_url_options = { host: 'example.com' }
|
||||
end
|
||||
@app.respond_to?(:secrets) && @app.secrets.secret_key_base = '3b7cd727ee24e8444053437c36cc66c4'
|
||||
def app.name; 'IsolatedRailsApp'; end # rubocop:disable Style/SingleLineMethods
|
||||
app.respond_to?(:secrets) && app.secrets.secret_key_base = '3b7cd727ee24e8444053437c36cc66c4'
|
||||
|
||||
@app = app
|
||||
yield @app if block_given?
|
||||
@app.initialize!
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user