Guest User

Untitled

a guest
Oct 19th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. development: &defaults
  2. # Configure available database sessions. (required)
  3. sessions:
  4. # Defines the default session. (required)
  5. default: &default_session
  6. # Defines the name of the default database that Mongoid can connect to.
  7. # (required).
  8. database: delight_development
  9. # Provides the hosts the default session can connect to. Must be an array
  10. # of host:port pairs. (required)
  11. hosts:
  12. - localhost:27017
  13. options:
  14. # Change whether the session persists in safe mode by default.
  15. # (default: false)
  16. # safe: false
  17.  
  18. # Change the default consistency model to :eventual or :strong.
  19. # :eventual will send reads to secondaries, :strong sends everything
  20. # to master. (default: :eventual)
  21. # consistency: :strong
  22. # Configure Mongoid specific options. (optional)
  23. options:
  24. # Configuration for whether or not to allow access to fields that do
  25. # not have a field definition on the model. (default: true)
  26. # allow_dynamic_fields: true
  27.  
  28. # Enable the identity map, needed for eager loading. (default: false)
  29. # identity_map_enabled: false
  30.  
  31. # Includes the root model name in json serialization. (default: false)
  32. # include_root_in_json: false
  33.  
  34. # Include the _type field in serializaion. (default: false)
  35. # include_type_for_serialization: false
  36.  
  37. # Preload all models in development, needed when models use
  38. # inheritance. (default: false)
  39. preload_models: true
  40.  
  41. # Protect id and type from mass assignment. (default: true)
  42. # protect_sensitive_fields: true
  43.  
  44. # Raise an error when performing a #find and the document is not found.
  45. # (default: true)
  46. raise_not_found_error: false
  47.  
  48. # Raise an error when defining a scope with the same name as an
  49. # existing method. (default: false)
  50. # scope_overwrite_exception: false
  51.  
  52. # Skip the database version check, used when connecting to a db without
  53. # admin access. (default: false)
  54. # skip_version_check: false
  55.  
  56. # User Active Support's time zone in conversions. (default: true)
  57. # use_activesupport_time_zone: true
  58.  
  59. # Ensure all times are UTC in the app side. (default: false)
  60. # use_utc: false
  61.  
  62. test:
  63. <<: *defaults
  64. sessions:
  65. default:
  66. <<: *default_session
  67. database: delight_test
  68.  
  69. <% if ENV['MONGOHQ_URL'] %>
  70. <% uri = URI.parse(ENV['MONGOHQ_URL']) %>
  71. production:
  72. <<: *defaults
  73. sessions:
  74. default:
  75. <<: *default_session
  76. database: <%= uri.path.sub('/','') %>
  77. username: <%= uri.user %>
  78. password: <%= uri.password %>
  79. hosts:
  80. - <%= uri.host %>:<%= uri.port %>
  81. <% end %>
Add Comment
Please, Sign In to add comment