Skip to content

Instantly share code, notes, and snippets.

@mijoharas
Created October 1, 2013 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mijoharas/6775136 to your computer and use it in GitHub Desktop.
Save mijoharas/6775136 to your computer and use it in GitHub Desktop.
New Rails Project
source 'https://rubygems.org'
gem 'rails', '4.0.1'
gem 'pg', '0.15.1'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', '2.3.1.0'
gem 'bcrypt-ruby', '3.1.2'
gem 'faker', '1.1.2'
gem 'will_paginate', '3.0.5'
gem 'bootstrap-will_paginate', '0.0.9'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
group :development, :test do
gem 'rspec-rails', '2.13.1'
gem 'guard-rspec'
gem 'spork-rails', github: 'railstutorial/spork-rails'
gem 'guard-bundler'
# gem 'guard-cucumber'
gem 'guard-zeus'
# gem 'guard-spork'
gem 'childprocess'
gem 'railroady'
gem 'annotate'
gem "better_errors"
gem "binding_of_caller"
gem 'debugger'
gem 'pry'
gem 'pry-rails'
gem 'bullet' # optimise queries
gem 'debugger' # debugger
gem 'rack-mini-profiler'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
gem 'factory_girl_rails', '4.2.1'
# gem 'cucumber-rails', '1.3.0', :require => false
gem 'database_cleaner', '~> 1.0.0.RC1'
# # Uncomment these lines on OS X.
# gem 'rb-fsevent', '0.9.3', :require => false
# gem 'growl'
# Uncomment these lines on Linux.
gem 'rb-inotify'
gem 'libnotify'
# Uncomment these lines on Windows.
# gem 'rb-fchange', '0.0.6'
# gem 'rb-notifu', '0.0.4'
# gem 'win32console', '1.3.2'
end
group :production do
gem 'rails_12factor'
end
rails new $APPNAME --skip-test-unit -d postgresql
# put in custom gemfile
rails generate rspec:install
# put in specfile
zeus start
zeus g controller static_pages home contact help about
zeus g model User email:string name:string password_digest:string remember_token:string
bundle install --without production
guard init
# comment zeus, comment cucumber, change line rspec to
# guard :rspec, zeus: true, bundler: false do
# change specfile to be standard spork specfile
# fix annotate_models https://github.com/ctran/annotate_models/issues/118
zeus init
# do this to remove cucumber
zeus g annotate_models:install
# authentication
zeus g model user name:string email:string remember_token:string password_digest:string
require 'rubygems'
require 'spork'
#uncomment the following line to use spork with the debugger
#require 'spork/ext/ruby-debug'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
# require 'rspec/autorun'
# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config|
# ## Mock Framework
#
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
#
# config.mock_with :mocha
# config.mock_with :flexmock
# config.mock_with :rr
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{::Rails.root}/spec/fixtures"
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
# If true, the base class of anonymous controllers will be inferred
# automatically. This will be the default behavior in future versions of
# rspec-rails.
config.infer_base_class_for_anonymous_controllers = false
# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
# --seed 1234
config.order = "random"
config.include Capybara::DSL
end
Spork.each_run do
# This code will be run each time you run your specs.
end
# --- Instructions ---
# Sort the contents of this file into a Spork.prefork and a Spork.each_run
# block.
#
# The Spork.prefork block is run only once when the spork server is started.
# You typically want to place most of your (slow) initializer code in here, in
# particular, require'ing any 3rd-party gems that you don't normally modify
# during development.
#
# The Spork.each_run block is run each time you run your specs. In case you
# need to load files that tend to change during development, require them here.
# With Rails, your application modules are loaded automatically, so sometimes
# this block can remain empty.
#
# Note: You can modify files loaded *from* the Spork.each_run block without
# restarting the spork server. However, this file itself will not be reloaded,
# so if you change any of the code inside the each_run block, you still need to
# restart the server. In general, if you have non-trivial code in this file,
# it's advisable to move it into a separate file so you can easily edit it
# without restarting spork. (For example, with RSpec, you could move
# non-trivial code into a file spec/support/my_helper.rb, making sure that the
# spec/support/* files are require'd from inside the each_run block.)
#
# Any code that is left outside the two blocks will be run during preforking
# *and* during each_run -- that's probably not what you want.
#
# These instructions should self-destruct in 10 seconds. If they don't, feel
# free to delete them.
# This file is copied to spec/ when you run 'rails generate rspec:install'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment