Skip to content

Commit

Permalink
Move gems for the document sync worker into group
Browse files Browse the repository at this point in the history
This lets us load these gems separately in the worker and not need to
either a) set `require: false` and manually require them, or b) have
them in the main API Rails app where we don't need them.
  • Loading branch information
csutter committed Oct 6, 2023
1 parent 3c3a23d commit 6279be1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ gem "railties", RAILS_GEMS_VERSION
gem "bootsnap", require: false
gem "govuk_app_config"

# Gems for document_sync_worker
gem "govuk_message_queue_consumer", require: false
gem "jsonpath", require: false
gem "plek", require: false
# Gems specific to the document sync worker that aren't required for the main Rails API app
group :document_sync_worker do
gem "govuk_message_queue_consumer"
gem "jsonpath"
gem "plek"
end

group :test do
gem "simplecov", require: false
Expand Down
5 changes: 2 additions & 3 deletions lib/document_sync_worker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require "govuk_message_queue_consumer"
require "jsonpath"
require "plek"
# Gems specific to the document sync worker are in their own group in the Gemfile
Bundler.require(:document_sync_worker)

require "document_sync_worker/configuration"
require "document_sync_worker/message_processor"
Expand Down

0 comments on commit 6279be1

Please sign in to comment.