Skip to content

Commit

Permalink
rails g mongoid:config
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Jul 6, 2018
1 parent 74fd5a2 commit 3e1c6fc
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
26 changes: 3 additions & 23 deletions Gemfile
Original file line number Original file line Diff line number Diff line change
@@ -1,40 +1,20 @@
source 'https://rubygems.org' source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" } git_source(:github) { |repo| "https://github.com/#{repo}.git" }


ruby '2.4.1' ruby '2.5.1'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0' gem 'rails', '~> 5.2.0'
# Use Puma as the app server
gem 'puma', '~> 3.11' gem 'puma', '~> 3.11'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'mongoid'
# gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false gem 'bootsnap', '>= 1.1.0', require: false


# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible gem 'rack-cors'
# gem 'rack-cors'


group :development, :test do group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end end


group :development do group :development do
gem 'listen', '>= 3.0.5', '< 3.2' gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring' gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0' gem 'spring-watcher-listen', '~> 2.0.0'
end end


# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
16 changes: 11 additions & 5 deletions Gemfile.lock
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ GEM
arel (9.0.0) arel (9.0.0)
bootsnap (1.3.0) bootsnap (1.3.0)
msgpack (~> 1.0) msgpack (~> 1.0)
bson (4.3.0)
builder (3.2.3) builder (3.2.3)
byebug (10.0.2)
concurrent-ruby (1.0.5) concurrent-ruby (1.0.5)
crass (1.0.4) crass (1.0.4)
erubi (1.7.1) erubi (1.7.1)
Expand All @@ -71,12 +71,18 @@ GEM
mini_mime (1.0.0) mini_mime (1.0.0)
mini_portile2 (2.3.0) mini_portile2 (2.3.0)
minitest (5.11.3) minitest (5.11.3)
mongo (2.6.0)
bson (>= 4.3.0, < 5.0.0)
mongoid (7.0.1)
activemodel (>= 5.1, < 6.0.0)
mongo (>= 2.5.1, < 3.0.0)
msgpack (1.2.4) msgpack (1.2.4)
nio4r (2.3.1) nio4r (2.3.1)
nokogiri (1.8.4) nokogiri (1.8.4)
mini_portile2 (~> 2.3.0) mini_portile2 (~> 2.3.0)
puma (3.11.4) puma (3.11.4)
rack (2.0.5) rack (2.0.5)
rack-cors (1.0.2)
rack-test (1.0.0) rack-test (1.0.0)
rack (>= 1.0, < 3) rack (>= 1.0, < 3)
rails (5.2.0) rails (5.2.0)
Expand Down Expand Up @@ -133,16 +139,16 @@ PLATFORMS


DEPENDENCIES DEPENDENCIES
bootsnap (>= 1.1.0) bootsnap (>= 1.1.0)
byebug
listen (>= 3.0.5, < 3.2) listen (>= 3.0.5, < 3.2)
mongoid
puma (~> 3.11) puma (~> 3.11)
rack-cors
rails (~> 5.2.0) rails (~> 5.2.0)
spring spring
spring-watcher-listen (~> 2.0.0) spring-watcher-listen (~> 2.0.0)
tzinfo-data


RUBY VERSION RUBY VERSION
ruby 2.4.1p111 ruby 2.5.1p57


BUNDLED WITH BUNDLED WITH
1.16.1 1.16.2
17 changes: 17 additions & 0 deletions config/mongoid.yml
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,17 @@
development:
clients:
default:
database: 33_minutes_server_development
hosts:
- localhost:27017

test:
clients:
default:
database: 33_minutes_server_test
hosts:
- localhost:27017
options:
read:
mode: :primary
max_pool_size: 1

0 comments on commit 3e1c6fc

Please sign in to comment.