Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

build using rails_apps_composer 2.2.13

  • Loading branch information...
commit f4084b97c08f97fa38e37879337f78976a1426d0 1 parent b915fd1
@DanielKehoe DanielKehoe authored
View
5 Gemfile
@@ -8,11 +8,12 @@ end
gem 'jquery-rails'
gem "mongoid", ">= 3.0.6"
gem "rspec-rails", ">= 2.11.0", :group => [:development, :test]
-gem "capybara", ">= 1.1.2", :group => :test
gem "database_cleaner", ">= 0.8.0", :group => :test
gem "mongoid-rspec", ">= 1.4.6", :group => :test
gem "email_spec", ">= 1.2.1", :group => :test
gem "cucumber-rails", ">= 1.3.0", :group => :test, :require => false
gem "launchy", ">= 2.1.2", :group => :test
+gem "capybara", ">= 1.1.2", :group => :test
gem "factory_girl_rails", ">= 4.1.0", :group => [:development, :test]
-gem "devise", ">= 2.1.2"
+gem "devise", ">= 2.1.2"
+gem "quiet_assets", ">= 1.0.1", :group => :development
View
13 Gemfile.lock
@@ -57,7 +57,7 @@ GEM
capybara (>= 1.1.2)
cucumber (>= 1.1.8)
nokogiri (>= 1.5.0)
- database_cleaner (0.8.0)
+ database_cleaner (0.9.1)
devise (2.1.2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
@@ -76,7 +76,7 @@ GEM
factory_girl (~> 4.1.0)
railties (>= 3.0.0)
ffi (1.1.5)
- gherkin (2.11.2)
+ gherkin (2.11.4)
json (>= 1.4.6)
hike (1.2.1)
i18n (0.6.1)
@@ -94,7 +94,7 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
- mongoid (3.0.6)
+ mongoid (3.0.9)
activemodel (~> 3.1)
moped (~> 1.1)
origin (~> 1.0)
@@ -103,12 +103,14 @@ GEM
mongoid (>= 3.0.1)
rake
rspec (>= 2.9)
- moped (1.2.5)
+ moped (1.2.7)
multi_json (1.3.6)
nokogiri (1.5.5)
origin (1.0.9)
orm_adapter (0.4.0)
polyglot (0.3.3)
+ quiet_assets (1.0.1)
+ railties (~> 3.1)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
@@ -164,7 +166,7 @@ GEM
tilt (~> 1.1, != 1.3.0)
thor (0.16.0)
tilt (1.3.3)
- treetop (1.4.10)
+ treetop (1.4.11)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.33)
@@ -191,6 +193,7 @@ DEPENDENCIES
launchy (>= 2.1.2)
mongoid (>= 3.0.6)
mongoid-rspec (>= 1.4.6)
+ quiet_assets (>= 1.0.1)
rails (= 3.2.8)
rspec-rails (>= 2.11.0)
sass-rails (~> 3.2.3)
View
4 app/views/layouts/_messages.html.erb
@@ -1,3 +1,5 @@
<% flash.each do |name, msg| %>
- <%= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String) %>
+ <% if msg.is_a?(String) %>
+ <%= content_tag :div, msg, :id => "flash_#{name}" %>
+ <% end %>
<% end %>
View
6 config/application.rb
@@ -20,9 +20,13 @@ class Application < Rails::Application
# don't generate RSpec tests for views and helpers
config.generators do |g|
+
+ g.test_framework :rspec, fixture: true
+ g.fixture_replacement :factory_girl
+
+
g.view_specs false
g.helper_specs false
-
end
# Settings in config/environments/* take precedence over those specified here.
View
14 config/mongoid.yml
@@ -18,7 +18,15 @@ development:
# Change the default consistency model to :eventual or :strong.
# :eventual will send reads to secondaries, :strong sends everything
# to master. (default: :eventual)
- consistency: :strong
+ # consistency: :eventual
+
+ # 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:
# Configuration for whether or not to allow access to fields that do
@@ -66,3 +74,7 @@ test:
- localhost:27017
options:
consistency: :strong
+ # In the test environment we lower the retries and retry interval to
+ # low amounts for fast failures.
+ max_retries: 1
+ retry_interval: 0
View
4 config/routes.rb
@@ -4,5 +4,5 @@
end
root :to => "home#index"
devise_for :users
- resources :users, :only => [:show, :index]
-end
+ resources :users
+end
View
10 spec/spec_helper.rb
@@ -38,4 +38,14 @@
# the seed, which is printed after each run.
# --seed 1234
config.order = "random"
+
+ config.before(:suite) do
+ DatabaseCleaner.strategy = :truncation
+ end
+ config.before(:each) do
+ DatabaseCleaner.start
+ end
+ config.after(:each) do
+ DatabaseCleaner.clean
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.