diff --git a/Gemfile b/Gemfile index de93719e..9fb37224 100644 --- a/Gemfile +++ b/Gemfile @@ -151,3 +151,38 @@ else end end # END ENGINE_CART BLOCK +# BEGIN ENGINE_CART BLOCK +# engine_cart: 2.6.0 +# engine_cart stanza: 2.5.0 +# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app. +file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__))) +if File.exist?(file) + begin + eval_gemfile file + rescue Bundler::GemfileError => e + Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:' + Bundler.ui.warn e.message + end +else + Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies" + + if ENV['RAILS_VERSION'] + if ENV['RAILS_VERSION'] == 'edge' + gem 'rails', github: 'rails/rails' + ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks' + else + gem 'rails', ENV['RAILS_VERSION'] + end + + case ENV['RAILS_VERSION'] + when /^6.0/ + gem 'sass-rails', '>= 6' + gem 'webpacker', '~> 4.0' + when /^5.[12]/ + gem 'sass-rails', '~> 5.0' + gem 'sprockets', '~> 3.7' + gem 'thor', '~> 0.20' + end + end +end +# END ENGINE_CART BLOCK diff --git a/trln_argon.gemspec b/trln_argon.gemspec index 1cf0bfda..cbb864f8 100644 --- a/trln_argon.gemspec +++ b/trln_argon.gemspec @@ -29,11 +29,11 @@ Gem::Specification.new do |s| s.add_dependency 'library_stdnums', '~> 1.6' s.add_dependency 'openurl', '~>1.0' s.add_dependency 'font-awesome-rails', '~> 4.7' - s.add_dependency 'chosen-rails', '~> 1.10' s.add_dependency 'coffee-rails', '~> 4.2' s.add_dependency 'rsolr', '>= 1.0', '< 3' s.add_dependency 'addressable', '~> 2.5' s.add_dependency 'sprockets', '~> 4.0' + s.add_dependency 'trln-chosen-rails', '~> 1.20' # no version specified for sqlite3 because engine_cart 2.2 # will otherwise use an incompatible version when generating