Skip to content

Commit

Permalink
Upgrade to Rails 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Apr 4, 2014
1 parent 58f308a commit bf8bf97
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 60 deletions.
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,7 +1,7 @@
source 'http://rubygems.org'
ruby '2.1.1'

gem 'rails', '~> 4.0.3'
gem 'rails', '~> 4.1.0.rc2'

gem 'json'
gem 'thin'
Expand Down
71 changes: 38 additions & 33 deletions Gemfile.lock
Expand Up @@ -10,35 +10,37 @@ GIT
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.0.4)
actionpack (= 4.0.4)
actionmailer (4.1.0.rc2)
actionpack (= 4.1.0.rc2)
actionview (= 4.1.0.rc2)
mail (~> 2.5.4)
actionpack (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
erubis (~> 2.7.0)
actionpack (4.1.0.rc2)
actionview (= 4.1.0.rc2)
activesupport (= 4.1.0.rc2)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.4)
activesupport (= 4.0.4)
builder (~> 3.1.0)
activerecord (4.0.4)
activemodel (= 4.0.4)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.4)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.4)
actionview (4.1.0.rc2)
activesupport (= 4.1.0.rc2)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.0.rc2)
activesupport (= 4.1.0.rc2)
builder (~> 3.1)
activerecord (4.1.0.rc2)
activemodel (= 4.1.0.rc2)
activesupport (= 4.1.0.rc2)
arel (~> 5.0.0)
activesupport (4.1.0.rc2)
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.0)
atomic (1.1.16)
bootstrap-sass (3.1.1.0)
sass (~> 3.2)
builder (3.1.4)
builder (3.2.2)
daemons (1.1.9)
erubis (2.7.0)
eventmachine (1.0.3)
Expand All @@ -53,24 +55,26 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
minitest (4.7.5)
minitest (5.3.2)
multi_json (1.9.2)
pg (0.17.1)
polyglot (0.3.4)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.4)
actionmailer (= 4.0.4)
actionpack (= 4.0.4)
activerecord (= 4.0.4)
activesupport (= 4.0.4)
rails (4.1.0.rc2)
actionmailer (= 4.1.0.rc2)
actionpack (= 4.1.0.rc2)
actionview (= 4.1.0.rc2)
activemodel (= 4.1.0.rc2)
activerecord (= 4.1.0.rc2)
activesupport (= 4.1.0.rc2)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.4)
railties (= 4.1.0.rc2)
sprockets-rails (~> 2.0.0)
railties (4.0.4)
actionpack (= 4.0.4)
activesupport (= 4.0.4)
railties (4.1.0.rc2)
actionpack (= 4.1.0.rc2)
activesupport (= 4.1.0.rc2)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.2.2)
Expand Down Expand Up @@ -101,7 +105,8 @@ GEM
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.39)
tzinfo (1.1.0)
thread_safe (~> 0.1)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
Expand All @@ -114,7 +119,7 @@ DEPENDENCIES
jquery-rails
json
pg
rails (~> 4.0.3)
rails (~> 4.1.0.rc2)
sass-rails (~> 4.0.2)
simple_form (~> 3.0.0)!
sqlite3
Expand Down
2 changes: 1 addition & 1 deletion config/application.rb
Expand Up @@ -4,7 +4,7 @@

# 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 SimpleFormBootstrap
class Application < Rails::Application
Expand Down
2 changes: 1 addition & 1 deletion config/boot.rb
@@ -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'])
6 changes: 3 additions & 3 deletions config/environment.rb
@@ -1,5 +1,5 @@
# Load the rails application.
# Load the Rails application.
require File.expand_path('../application', __FILE__)

# Initialize the rails application.
SimpleFormBootstrap::Application.initialize!
# Initialize the Rails application.
Rails.application.initialize!
12 changes: 10 additions & 2 deletions config/environments/development.rb
@@ -1,4 +1,4 @@
SimpleFormBootstrap::Application.configure do
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# In the development environment your application's code is reloaded on
Expand All @@ -19,11 +19,19 @@
# 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
9 changes: 6 additions & 3 deletions config/environments/production.rb
@@ -1,11 +1,11 @@
SimpleFormBootstrap::Application.configure do
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# Code is not reloaded between requests.
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
Expand Down Expand Up @@ -66,7 +66,7 @@
# config.action_mailer.raise_delivery_errors = false

# 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.
Expand All @@ -77,4 +77,7 @@

# 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
7 changes: 5 additions & 2 deletions config/environments/test.rb
@@ -1,4 +1,4 @@
SimpleFormBootstrap::Application.configure do
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# The test environment is used exclusively to run your application's
Expand All @@ -14,7 +14,7 @@

# 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
Expand All @@ -33,4 +33,7 @@

# 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
3 changes: 3 additions & 0 deletions config/initializers/cookies_serializer.rb
@@ -0,0 +1,3 @@
# Be sure to restart your server when you modify this file.

Rails.application.config.action_dispatch.cookies_serializer = :json
12 changes: 0 additions & 12 deletions config/initializers/secret_token.rb

This file was deleted.

2 changes: 1 addition & 1 deletion config/initializers/session_store.rb
@@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file.

SimpleFormBootstrap::Application.config.session_store :cookie_store, key: '_simple_form_bootstrap_session'
Rails.application.config.session_store :cookie_store, key: '_simple_form_bootstrap_session'
2 changes: 1 addition & 1 deletion config/routes.rb
@@ -1,4 +1,4 @@
SimpleFormBootstrap::Application.routes.draw do
Rails.application.routes.draw do
resources :examples, only: :index do
collection do
post :create_basic
Expand Down
22 changes: 22 additions & 0 deletions config/secrets.yml
@@ -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: d803f328cbf048e554d11d014cff31819dc494cafb9001de0ddc840eedb68817bd297f090b190aa841eda9da68b7ee6e94b0ab79768a745bba5797adbe81056a

test:
secret_key_base: 080d3abebd457ff857d979639d0fcc9ec46e2955cfdfdbfba920caed02319cf8efc8812ba4df67fd53bb362d8f932f5f7f98b1739bf7ea9f9ffa1658cb880662

# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

0 comments on commit bf8bf97

Please sign in to comment.