requireFile.expand_path('../boot',__FILE__)require'rails/all'# Require the gems listed in Gemfile, including any gems# you've limited to :test, :development, or :production.Bundler.require(:default,Rails.env)moduleProjectClassclassApplication<Rails::Application# Settings in config/environments/* take precedence over those specified here.# Application configuration should go into files in config/initializers# -- all .rb files in that directory are automatically loaded.config.autoload_paths+=%W(#{Rails.root}/lib)# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.config.time_zone='Tokyo'# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]# config.i18n.default_locale = :deconfig.i18n.load_path+=Dir[Rails.root.join('config','locales','**','*.{rb,yml}').to_s]config.i18n.available_locales=[:ja,:en]config.i18n.enforce_available_locales=trueconfig.i18n.default_locale=:jaconfig.generatorsdo|g|g.assetsfalseg.helperfalseendendend
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle# Ignore the default SQLite database.
/db/*.sqlite3/db/*.sqlite3-journal# Ignore database.yml (use self settings)
config/database.yml# Ignore all logfiles and tempfiles.
/log/*.log/tmp#rails specific
.sass-cache//public/system/public/uploads# generic files to ignore
*~*.DS_Store*.swp.rvmrc.ruby-version/.idea/.codeintel/vendor/bundle
source'https://rubygems.org'# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'gem'rails','4.0.2'# Use sqlite3 as the database for Active Recordgem'sqlite3'# Use SCSS for stylesheetsgem'sass-rails','~> 4.0.0'# Use Uglifier as compressor for JavaScript assetsgem'uglifier','>= 1.3.0'# Use CoffeeScript for .js.coffee assets and viewsgem'coffee-rails','~> 4.0.0'# See https://github.com/sstephenson/execjs#readme for more supported runtimes# gem 'therubyracer', platforms: :ruby# Use jquery as the JavaScript librarygem'jquery-rails'# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinksgem'turbolinks'# Build JSON APIs with ease. Read more: https://github.com/rails/jbuildergem'jbuilder','~> 1.2'gem'rails_config'group:development,:testdogem'rspec-rails'gem'rb-fsevent',require: falsegem'guard-rspec'gem'growl'gem'factory_girl_rails'gem'spring'gem'spring-commands-rspec'end# Use ActiveModel has_secure_password# gem 'bcrypt-ruby', '~> 3.1.2'# Use unicorn as the app server# gem 'unicorn'# Use Capistrano for deployment# gem 'capistrano', group: :development# Use debugger# gem 'debugger', group: [:development, :test]
# This file is copied to spec/ when you run 'rails generate rspec:install'ENV["RAILS_ENV"]||='test'requireFile.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|requiref}# Checks for pending migrations before tests are run.# If you are not using ActiveRecord, you can remove this line.ActiveRecord::Migration.check_pending!ifdefined?(ActiveRecord::Migration)RSpec.configuredo|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 fixturesconfig.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 1234config.order="random"config.before(:all)doFactoryGirl.reloadendend
# A sample Guardfile# More info at https://github.com/guard/guard#readmeguard:rspec,cmd: 'spring rspec -f doc'dowatch(%r{^spec/.+_spec\.rb$})watch(%r{^lib/(.+)\.rb$}){|m|"spec/lib/#{m[1]}_spec.rb"}watch('spec/spec_helper.rb'){"spec"}# Rails examplewatch(%r{^app/(.+)\.rb$}){|m|"spec/#{m[1]}_spec.rb"}watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}){|m|"spec/#{m[1]}#{m[2]}_spec.rb"}watch(%r{^app/controllers/(.+)_(controller)\.rb$}){|m|["spec/routing/#{m[1]}_routing_spec.rb","spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb","spec/acceptance/#{m[1]}_spec.rb"]}watch(%r{^spec/support/(.+)\.rb$}){"spec"}watch('config/routes.rb'){"spec/routing"}watch('app/controllers/application_controller.rb'){"spec/controllers"}# Capybara features specswatch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}){|m|"spec/features/#{m[1]}_spec.rb"}# Turnip features and stepswatch(%r{^spec/acceptance/(.+)\.feature$})watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}){|m|Dir[File.join("**/#{m[1]}.feature")][0]||'spec/acceptance'}end