Skip to content

Commit

Permalink
Initial - Bare
Browse files Browse the repository at this point in the history
  • Loading branch information
i5okie committed Dec 10, 2013
1 parent 9953752 commit f3657cc
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ doc/
.idea
.secret
.DS_Store
Gemfile.lock
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0-p353
9 changes: 7 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ source 'https://rubygems.org'
gem 'rails', '4.0.2'

# Use sqlite3 as the database for Active Record
gem 'sqlite3'
#gem 'sqlite3'

# Use mongoid instead of Active Record
gem 'mongoid', github: 'mongoid/mongoid'
gem 'bson_ext'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
Expand All @@ -25,7 +29,7 @@ gem 'jquery-rails'
gem 'turbolinks'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
gem 'jbuilder'

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
Expand All @@ -51,6 +55,7 @@ gem "cancan"
gem "haml-rails"
gem "simple_form", git: "https://github.com/plataformatec/simple_form"
gem "uuidtools"

group :development do
gem "rspec-rails"
gem "guard-rspec"
Expand Down
4 changes: 3 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require File.expand_path('../boot', __FILE__)

require 'rails/all'
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Expand Down
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
config.active_support.deprecation = :log

# Raise an error on page load if there are pending migrations
config.active_record.migration_error = :page_load
# config.active_record.migration_error = :page_load

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
Expand Down
76 changes: 76 additions & 0 deletions config/mongoid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
development:
# Configure available database sessions. (required)
sessions:
# Defines the default session. (required)
default:
# Defines the name of the default database that Mongoid can connect to.
# (required).
database: redress_development
# Provides the hosts the default session can connect to. Must be an array
# of host:port pairs. (required)
hosts:
- localhost:27017
options:
# Change the default write concern. (default = { w: 1 })
# write:
# w: 1

# Change the default consistency model to primary, secondary.
# 'secondary' will send reads to secondaries, 'primary' sends everything
# to master. (default: primary)
# read: secondary_preferred

# How many times Moped should attempt to retry an operation after
# failure. (default: 30)
# max_retries: 30

# The time in seconds that Moped should wait before retrying an
# operation on failure. (default: 1)
# retry_interval: 1
# Configure Mongoid specific options. (optional)
options:
# Enable the identity map, needed for eager loading. (default: false)
# identity_map_enabled: false

# Includes the root model name in json serialization. (default: false)
# include_root_in_json: false

# Include the _type field in serializaion. (default: false)
# include_type_for_serialization: false

# Preload all models in development, needed when models use
# inheritance. (default: false)
# preload_models: false

# Protect id and type from mass assignment. (default: true)
# protect_sensitive_fields: true

# Raise an error when performing a #find and the document is not found.
# (default: true)
# raise_not_found_error: true

# Raise an error when defining a scope with the same name as an
# existing method. (default: false)
# scope_overwrite_exception: false

# Skip the database version check, used when connecting to a db without
# admin access. (default: false)
# skip_version_check: false

# Use Active Support's time zone in conversions. (default: true)
# use_activesupport_time_zone: true

# Ensure all times are UTC in the app side. (default: false)
# use_utc: false
test:
sessions:
default:
database: redress_test
hosts:
- localhost:27017
options:
read: primary
# In the test environment we lower the retries and retry interval to
# low amounts for fast failures.
max_retries: 1
retry_interval: 0

0 comments on commit f3657cc

Please sign in to comment.