Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 9 additions & 24 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in blacklight-gallery.gemspec
gemspec

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
"https://github.com/#{repo_name}.git"
end
# Declare dependencies in blacklight-gallery.gemspec.
gemspec path: File.expand_path(__dir__)

# BEGIN ENGINE_CART BLOCK
# engine_cart: 2.2.1
# engine_cart stanza: 0.10.0
# engine_cart: 2.5.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__)))
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
Expand All @@ -31,19 +28,7 @@ else
gem 'rails', ENV['RAILS_VERSION']
end
end

case ENV['RAILS_VERSION']
when /^5.[12]/
gem 'sass-rails', '~> 5.0'
when /^4.2/
gem 'responders', '~> 2.0'
gem 'sass-rails', '>= 5.0'
gem 'coffee-rails', '~> 4.1.0'
when /^4.[01]/
gem 'sass-rails', '< 5.0'
end
end
# END ENGINE_CART BLOCK
unless File.exist?(file)
eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__))
end

eval_gemfile File.expand_path('spec/test_app_templates/Gemfile.extra', File.dirname(__FILE__)) unless File.exist?(file)
5 changes: 2 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
ENV["RAILS_ENV"] ||= 'test'
ENV['RAILS_ENV'] ||= 'test'

require 'engine_cart'
EngineCart.load_application!

require 'rspec/collection_matchers'
require 'rspec/its'
require 'rspec/rails'
Expand All @@ -16,4 +15,4 @@

RSpec.configure do |c|
c.infer_spec_type_from_file_location!
end
end
Loading