Skip to content

Commit

Permalink
Merge pull request #559 from h0tw1r3/gem-override
Browse files Browse the repository at this point in the history
allow overriding default gems
  • Loading branch information
jordanbreen28 authored Feb 12, 2024
2 parents 23c6fff + 09cd2d3 commit 28a50c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ In this example the automated release prep workflow is triggered every Saturday
| :------------- |:--------------|
|required|Allows you to specify gems that are required within the Gemfile. Gems can be defined here within groups, for example we use the :development gem group to add in several gems that are relevant to the development of any module and the :system_tests gem group for gems relevant only to acceptance testing.|
|optional|Allows you to specify additional gems that are required within the Gemfile. This key can be used to further configure the Gemfile through assignment of a value in the .sync.yml file.|
|overrides|Allows you to specify an array of gems that should override template default gems of the same name. _This is an advanced option which may result in unresolved dependencies or other unexpected interactions._ |

>Within each Gem group defined using the options above one or more gem item definitions may be listed in an array. Each item in that array must be a gem item hash.

Expand Down
1 change: 1 addition & 0 deletions moduleroot/Gemfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ end
group <%= group %> do
<%
gems.map! do |gem|
gem = @configs['overrides']&.find { |prefer| prefer['gem'] == gem['gem'] } || gem
{
'gem' => gem['gem'],
'version' => gem['version'],
Expand Down

0 comments on commit 28a50c4

Please sign in to comment.