update to rails 4.1.8

This commit is contained in:
Serge Paquet 2014-12-13 23:47:44 -05:00
parent 346fec4ef9
commit b7b93d0bf9
11 changed files with 106 additions and 71 deletions

View File

@ -1,6 +1,6 @@
source "https://rubygems.org"
gem "rails", "4.0.8"
gem "rails", "4.1.8"
gem "unicorn"

View File

@ -1,35 +1,37 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.8)
actionpack (= 4.0.8)
mail (~> 2.5.4)
actionpack (4.0.8)
activesupport (= 4.0.8)
builder (~> 3.1.0)
erubis (~> 2.7.0)
actionmailer (4.1.8)
actionpack (= 4.1.8)
actionview (= 4.1.8)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.8)
actionview (= 4.1.8)
activesupport (= 4.1.8)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.8)
activesupport (= 4.0.8)
builder (~> 3.1.0)
activerecord (4.0.8)
activemodel (= 4.0.8)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.8)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.8)
actionview (4.1.8)
activesupport (= 4.1.8)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.8)
activesupport (= 4.1.8)
builder (~> 3.1)
activerecord (4.1.8)
activemodel (= 4.1.8)
activesupport (= 4.1.8)
arel (~> 5.0.0)
activesupport (4.1.8)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
builder (3.1.4)
builder (3.2.2)
diff-lcs (1.2.5)
dynamic_form (1.1.4)
erubis (2.7.0)
@ -43,45 +45,45 @@ GEM
htmlentities (4.3.2)
i18n (0.6.11)
innertube (1.1.0)
joiner (0.2.0)
activerecord (>= 3.1.0, < 4.1.0)
joiner (0.3.4)
activerecord (>= 4.1.0)
jquery-rails (3.1.1)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
kgio (2.9.2)
machinist (2.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mail (2.6.3)
mime-types (>= 1.16, < 3)
middleware (0.1.0)
mime-types (1.25.1)
mime-types (2.4.3)
mini_portile (0.5.3)
minitest (4.7.5)
minitest (5.5.0)
multi_json (1.10.1)
mysql2 (0.3.16)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
oauth (0.4.7)
polyglot (0.3.5)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.8)
actionmailer (= 4.0.8)
actionpack (= 4.0.8)
activerecord (= 4.0.8)
activesupport (= 4.0.8)
rails (4.1.8)
actionmailer (= 4.1.8)
actionpack (= 4.1.8)
actionview (= 4.1.8)
activemodel (= 4.1.8)
activerecord (= 4.1.8)
activesupport (= 4.1.8)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.8)
railties (= 4.1.8)
sprockets-rails (~> 2.0)
railties (4.0.8)
actionpack (= 4.0.8)
activesupport (= 4.0.8)
railties (4.1.8)
actionpack (= 4.1.8)
activesupport (= 4.1.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.3.2)
rake (10.4.2)
rdiscount (2.1.7.1)
riddle (1.5.11)
rspec-collection_matchers (1.0.0)
@ -99,15 +101,15 @@ GEM
rspec-core (~> 2.99.0)
rspec-expectations (~> 2.99.0)
rspec-mocks (~> 2.99.0)
sprockets (2.12.1)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
sprockets-rails (2.2.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.9)
thinking-sphinx (3.1.2)
activerecord (>= 3.1.0)
@ -119,10 +121,8 @@ GEM
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.41)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
@ -146,7 +146,7 @@ DEPENDENCIES
mysql2 (>= 0.3.14)
nokogiri (= 1.6.1)
oauth
rails (= 4.0.8)
rails (= 4.1.8)
rdiscount
rspec-rails (~> 2.6)
sqlite3

View File

@ -81,15 +81,9 @@ in a `config/initializers/production.rb` or similar file:
* Create an initial administrator user and at least one tag:
lobsters$ rails console
Loading development environment (Rails 3.2.6)
irb(main):001:0> u = User.new(:username => "test", :email => "test@example.com", :password => "test", :password_confirmation => "test")
irb(main):002:0> u.is_admin = true
irb(main):003:0> u.is_moderator = true
irb(main):004:0> u.save
irb(main):005:0> t = Tag.new
irb(main):006:0> t.tag = "test"
irb(main):007:0> t.save
Loading development environment (Rails 4.1.8)
irb(main):001:0> User.create(:username => "test", :email => "test@example.com", :password => "test", :password_confirmation => "test", :is_admin => true, :is_moderator => true)
irb(main):002:0> Tag.create(:tag => "test")
* Run the Rails server in development mode. You should be able to login to
`http://localhost:3000` with your new `test` user:

View File

@ -4,7 +4,7 @@ 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)
Bundler.require(*Rails.groups)
module Lobsters
class Application < Rails::Application
@ -22,7 +22,6 @@ module Lobsters
# 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 = :de
config.i18n.enforce_available_locales = true
# Future Rails version will disable implicit joins, so we'll be prepared.
config.active_record.disable_implicit_join_references = true

View File

@ -1,4 +1,4 @@
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])

View File

@ -19,11 +19,19 @@ Lobsters::Application.configure do
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise an error on page load if there are pending migrations
# Raise an error on page load if there are pending migrations.
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
# number of complex assets.
config.assets.debug = true
# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
config.assets.raise_runtime_errors = true
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end

View File

@ -5,7 +5,7 @@ Lobsters::Application.configure do
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
@ -32,8 +32,7 @@ Lobsters::Application.configure do
# Generate digests for assets URLs.
config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
@ -57,16 +56,12 @@ Lobsters::Application.configure do
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
config.action_mailer.raise_delivery_errors = true
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
@ -77,4 +72,7 @@ Lobsters::Application.configure do
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end

View File

@ -14,7 +14,7 @@ Lobsters::Application.configure do
# Configure static asset server for tests with Cache-Control for performance.
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching.
config.consider_all_requests_local = true
@ -33,4 +33,7 @@ Lobsters::Application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end

View File

@ -0,0 +1,8 @@
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )

View File

@ -0,0 +1,3 @@
# Be sure to restart your server when you modify this file.
Rails.application.config.action_dispatch.cookies_serializer = :json

22
config/secrets.yml Normal file
View File

@ -0,0 +1,22 @@
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rake secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
development:
secret_key_base: f6249dff01c3dd76b3f36a6c6a1e35b4e25b205f0f435c22fbe70a4d17d78205cd9a4dced92a5092b1e7e69a8334852462cc23c2a825b1611dec516b6afdd10e
test:
secret_key_base: 0ea31f9c376f604823c7e08d39aefcf41f9f1217df083cc45afb8c969a1b279a213119c7fba850be51ef4343bc7207000702c431e3e1aec53e3fa0152062c7ef
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>