-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix docker setup #298
base: master
Are you sure you want to change the base?
Fix docker setup #298
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
# | ||
# Also we don't use -onbuild as they're deprecated | ||
# https://github.com/docker-library/official-images/issues/2076 | ||
FROM ruby:3.0.2 as dev | ||
FROM ruby:3.0.6 as dev | ||
LABEL maintainer="[email protected]" | ||
|
||
# Installs system dependencies | ||
|
@@ -65,7 +65,7 @@ RUN mkdir /db-init && chown 1000 /db-init | |
USER decidim | ||
|
||
# Update system gems | ||
RUN gem install bundler:2.4.7 | ||
RUN gem install bundler | ||
RUN gem update --system | ||
|
||
# Copy Gemfile and install bundle dependencies | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
set -e | ||
|
||
gem install bundler | ||
bundle install | ||
|
||
bin/rails db:migrate RAILS_ENV=development | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
set -e | ||
|
||
yarn add [email protected] --dev | ||
yarn install | ||
|
||
exec "$@" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ m = Module.new do | |
bundler_version = nil | ||
update_index = nil | ||
ARGV.each_with_index do |a, i| | ||
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN | ||
if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN) | ||
bundler_version = a | ||
end | ||
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ | ||
|
@@ -47,7 +47,7 @@ m = Module.new do | |
def lockfile | ||
lockfile = | ||
case File.basename(gemfile) | ||
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) | ||
when "gems.rb" then gemfile.sub(/\.rb$/, ".locked") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Rubocop] reported by reviewdog 🐶 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Rubocop] reported by reviewdog 🐶 |
||
else "#{gemfile}.lock" | ||
end | ||
File.expand_path(lockfile) | ||
|
@@ -62,22 +62,17 @@ m = Module.new do | |
|
||
def bundler_requirement | ||
@bundler_requirement ||= | ||
env_var_version || cli_arg_version || | ||
bundler_requirement_for(lockfile_version) | ||
env_var_version || | ||
cli_arg_version || | ||
bundler_requirement_for(lockfile_version) | ||
end | ||
|
||
def bundler_requirement_for(version) | ||
return "#{Gem::Requirement.default}.a" unless version | ||
|
||
bundler_gem_version = Gem::Version.new(version) | ||
|
||
requirement = bundler_gem_version.approximate_recommendation | ||
|
||
return requirement unless Gem.rubygems_version < Gem::Version.new("2.7.0") | ||
|
||
requirement += ".a" if bundler_gem_version.prerelease? | ||
|
||
requirement | ||
bundler_gem_version.approximate_recommendation | ||
end | ||
|
||
def load_bundler! | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Rubocop] reported by reviewdog 🐶
[Correctable] Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.