Skip to content

Commit 776fec3

Browse files
committed
Remove test gems from production build
1 parent 1cf312e commit 776fec3

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN apt-get update -qq && \
2323
ENV RAILS_ENV="production" \
2424
BUNDLE_DEPLOYMENT="1" \
2525
BUNDLE_PATH="/usr/local/bundle" \
26-
BUNDLE_WITHOUT="development"
26+
BUNDLE_WITHOUT="development:test"
2727

2828
# Throw-away build stage to reduce size of final image
2929
FROM base AS build

Dockerfile-ssr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz
3030
ENV RAILS_ENV="production" \
3131
BUNDLE_DEPLOYMENT="1" \
3232
BUNDLE_PATH="/usr/local/bundle" \
33-
BUNDLE_WITHOUT="development"
33+
BUNDLE_WITHOUT="development:test"
3434

3535
# Throw-away build stage to reduce size of final image
3636
FROM base AS build

Rakefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ require_relative "config/application"
77

88
Rails.application.load_tasks
99

10-
require "rubocop/rake_task"
10+
if defined?(RuboCop)
11+
require "rubocop/rake_task"
12+
RuboCop::RakeTask.new
1113

12-
RuboCop::RakeTask.new
13-
14-
task default: %i[rubocop:autocorrect]
14+
task default: %i[rubocop:autocorrect]
15+
end
1516

1617
# Update js-routes file before javascript build
1718
task "assets:precompile" => "js:routes"

0 commit comments

Comments
 (0)