Skip to content

Commit 5a93270

Browse files
authored
allow for mongodb uri to be set allowing for authentication (#2067)
* allow for mongodb uri to be set allowing for authentication * address bundle audit issues
1 parent 97703ee commit 5a93270

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ GEM
350350
local_time (3.0.3)
351351
log4r (1.1.10)
352352
logger (1.7.0)
353-
loofah (2.25.1)
353+
loofah (2.25.2)
354354
crass (~> 1.0.2)
355355
nokogiri (>= 1.12.0)
356356
macaddr (1.7.2)
@@ -499,8 +499,8 @@ GEM
499499
activesupport (>= 5.0.0)
500500
minitest
501501
nokogiri (>= 1.6)
502-
rails-html-sanitizer (1.7.0)
503-
loofah (~> 2.25)
502+
rails-html-sanitizer (1.7.1)
503+
loofah (~> 2.25, >= 2.25.2)
504504
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
505505
rails-perftest (0.0.7)
506506
rails_best_practices (1.23.4)

config/mongoid.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ test:
2323
production:
2424
clients:
2525
default:
26-
database: cypress_production
27-
hosts:
28-
- <%= ENV.fetch('MONGO_PORT_27017_TCP_ADDR', '127.0.0.1') %>:<%= ENV.fetch('MONGO_PORT_27017_TCP_PORT', '27017') %>
26+
<% if ENV['MONGODB_URI'].present? %>
27+
uri: <%= ENV['MONGODB_URI'] %>
28+
<% else %>
29+
database: cypress_production
30+
hosts:
31+
- <%= ENV.fetch('MONGO_PORT_27017_TCP_ADDR', '127.0.0.1') %>:<%= ENV.fetch('MONGO_PORT_27017_TCP_PORT', '27017') %>
32+
<% end %>
2933

3034
options:
3135
raise_not_found_error: false

0 commit comments

Comments
 (0)