Skip to content

Commit

Permalink
Merge pull request #189 from solidusio/elia/rubygems-update
Browse files Browse the repository at this point in the history
Fix updating rubygems in the CI
  • Loading branch information
mergify[bot] authored Sep 8, 2022
2 parents 07737e3 + a5f15d2 commit 4ed229b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ commands:
- run:
name: "Update bundler"
command: |
gem update --system
sudo gem update --system
gem --version
gem install bundler -v '>=2.3.21' --conservative
bundle --version
Expand Down
12 changes: 4 additions & 8 deletions lib/solidus_dev_support/rspec/feature_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require 'solidus_dev_support/rspec/rails_helper'
require 'solidus_dev_support/rspec/capybara'

def dev_support_assets_preload
dev_support_assets_preload = ->(*) {
if Rails.application.respond_to?(:precompiled_assets)
Rails.application.precompiled_assets
else
Expand All @@ -19,18 +19,14 @@ def dev_support_assets_preload
Rails.application.assets.find_asset(asset)
end
end
end
}

RSpec.configure do |config|
config.when_first_matching_example_defined(type: :feature) do
config.before :suite do
dev_support_assets_preload
end
config.before :suite, &dev_support_assets_preload
end

config.when_first_matching_example_defined(type: :system) do
config.before :suite do
dev_support_assets_preload
end
config.before :suite, &dev_support_assets_preload
end
end
5 changes: 5 additions & 0 deletions lib/solidus_dev_support/templates/extension/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ else
gem 'sqlite3'
end

# While we still support Ruby < 3 we need to workaround a limitation in
# the 'async' gem that relies on the latest ruby, since RubyGems doesn't
# resolve gems based on the required ruby version.
gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')

gemspec

# Use a local Gemfile to include development dependencies that might not be
Expand Down

0 comments on commit 4ed229b

Please sign in to comment.