Update rails to version 4.2.0.rc1

This commit is contained in:
Erik Michaels-Ober 2014-11-29 12:36:18 +01:00
parent 2d15d0ed9a
commit 493e667d8a
17 changed files with 129 additions and 79 deletions

3
.gitignore vendored
View File

@ -16,5 +16,6 @@
/db/*.sqlite3-journal /db/*.sqlite3-journal
# Ignore all logfiles and tempfiles. # Ignore all logfiles and tempfiles.
/log/*.log /log/*
!/log/.keep
/tmp /tmp

View File

@ -1,7 +1,7 @@
source 'https://rubygems.org' source 'https://rubygems.org'
ruby '2.2.0' ruby '2.2.0'
gem 'rails', '~> 4.1.8' gem 'rails', '~> 4.2.0.rc1'
gem 'arel' gem 'arel'
gem 'devise' gem 'devise'

View File

@ -1,34 +1,43 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
actionmailer (4.1.8) actionmailer (4.2.0.rc1)
actionpack (= 4.1.8) actionpack (= 4.2.0.rc1)
actionview (= 4.1.8) actionview (= 4.2.0.rc1)
activejob (= 4.2.0.rc1)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
actionpack (4.1.8) rails-dom-testing (~> 1.0, >= 1.0.5)
actionview (= 4.1.8) actionpack (4.2.0.rc1)
activesupport (= 4.1.8) actionview (= 4.2.0.rc1)
rack (~> 1.5.2) activesupport (= 4.2.0.rc1)
rack (~> 1.6.0.beta2)
rack-test (~> 0.6.2) rack-test (~> 0.6.2)
actionview (4.1.8) rails-dom-testing (~> 1.0, >= 1.0.5)
activesupport (= 4.1.8) rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0.rc1)
activesupport (= 4.2.0.rc1)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
activemodel (4.1.8) rails-dom-testing (~> 1.0, >= 1.0.5)
activesupport (= 4.1.8) rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0.rc1)
activesupport (= 4.2.0.rc1)
globalid (>= 0.3.0)
activemodel (4.2.0.rc1)
activesupport (= 4.2.0.rc1)
builder (~> 3.1) builder (~> 3.1)
activerecord (4.1.8) activerecord (4.2.0.rc1)
activemodel (= 4.1.8) activemodel (= 4.2.0.rc1)
activesupport (= 4.1.8) activesupport (= 4.2.0.rc1)
arel (~> 5.0.0) arel (~> 6.0)
activesupport (4.1.8) activesupport (4.2.0.rc1)
i18n (~> 0.6, >= 0.6.9) i18n (>= 0.7.0.beta1, < 0.8)
json (~> 1.7, >= 1.7.7) json (~> 1.7, >= 1.7.7)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
addressable (2.3.6) addressable (2.3.6)
arel (5.0.1.20140414130214) arel (6.0.0)
ast (2.0.0) ast (2.0.0)
astrolabe (1.3.0) astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0) parser (>= 2.2.0.pre.3, < 3.0)
@ -65,11 +74,13 @@ GEM
railties (>= 3.2, < 5.0) railties (>= 3.2, < 5.0)
geokit (1.9.0) geokit (1.9.0)
multi_json (>= 1.3.2) multi_json (>= 1.3.2)
globalid (0.3.0)
activesupport (>= 4.1.0)
haml (4.0.5) haml (4.0.5)
tilt tilt
hike (1.2.3) hike (1.2.3)
http_accept_language (2.0.2) http_accept_language (2.0.2)
i18n (0.6.11) i18n (0.7.0.beta1)
jquery-rails (3.1.2) jquery-rails (3.1.2)
railties (>= 3.0, < 5.0) railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
@ -79,6 +90,8 @@ GEM
kaminari (0.16.1) kaminari (0.16.1)
actionpack (>= 3.0.0) actionpack (>= 3.0.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3) mail (2.6.3)
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 3)
method_source (0.8.2) method_source (0.8.2)
@ -102,22 +115,31 @@ GEM
slop (~> 3.4) slop (~> 3.4)
puma (2.10.2) puma (2.10.2)
rack (>= 1.1, < 2.0) rack (>= 1.1, < 2.0)
rack (1.5.2) rack (1.6.0.beta2)
rack-pjax (0.8.0) rack-pjax (0.8.0)
nokogiri (~> 1.5) nokogiri (~> 1.5)
rack (~> 1.1) rack (~> 1.1)
rack-test (0.6.2) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
rails (4.1.8) rails (4.2.0.rc1)
actionmailer (= 4.1.8) actionmailer (= 4.2.0.rc1)
actionpack (= 4.1.8) actionpack (= 4.2.0.rc1)
actionview (= 4.1.8) actionview (= 4.2.0.rc1)
activemodel (= 4.1.8) activejob (= 4.2.0.rc1)
activerecord (= 4.1.8) activemodel (= 4.2.0.rc1)
activesupport (= 4.1.8) activerecord (= 4.2.0.rc1)
activesupport (= 4.2.0.rc1)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.1.8) railties (= 4.2.0.rc1)
sprockets-rails (~> 2.0) sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.5)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.1)
loofah (~> 2.0)
rails_12factor (0.0.3) rails_12factor (0.0.3)
rails_serve_static_assets rails_serve_static_assets
rails_stdout_logging rails_stdout_logging
@ -137,16 +159,16 @@ GEM
sass-rails (~> 4.0) sass-rails (~> 4.0)
rails_serve_static_assets (0.0.2) rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3) rails_stdout_logging (0.0.3)
railties (4.1.8) railties (4.2.0.rc1)
actionpack (= 4.1.8) actionpack (= 4.2.0.rc1)
activesupport (= 4.1.8) activesupport (= 4.2.0.rc1)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
rainbow (2.0.0) rainbow (2.0.0)
rake (10.4.0) rake (10.4.0)
remotipart (1.2.1) remotipart (1.2.1)
responders (1.1.2) responders (2.0.2)
railties (>= 3.2, < 4.2) railties (>= 4.2.0.alpha, < 5)
rest-client (1.7.2) rest-client (1.7.2)
mime-types (>= 1.16, < 3.0) mime-types (>= 1.16, < 3.0)
netrc (~> 0.7) netrc (~> 0.7)
@ -217,7 +239,7 @@ DEPENDENCIES
pg pg
pry pry
puma puma
rails (~> 4.1.8) rails (~> 4.2.0.rc1)
rails_12factor rails_12factor
rails_admin rails_admin
rubocop rubocop

View File

@ -2,7 +2,7 @@
// listed below. // listed below.
// //
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
// //
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file. // compiled file.

View File

@ -3,13 +3,13 @@
* listed below. * listed below.
* *
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
* *
* You're free to add application-wide styles to this file and they'll appear at the bottom of the * You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles * compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope. * file per style scope.
* *
*= require_self
*= require_tree . *= require_tree .
*= require_self
*/ */

View File

@ -1,8 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin APP_PATH = File.expand_path('../../config/application', __FILE__)
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot' require_relative '../config/boot'
require 'rails/commands' require 'rails/commands'

View File

@ -1,8 +1,4 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
require_relative '../config/boot' require_relative '../config/boot'
require 'rake' require 'rake'
Rake.application.run Rake.application.run

29
bin/setup Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env ruby
require 'pathname'
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
Dir.chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file:
puts "== Installing dependencies =="
system "gem install bundler --conservative"
system "bundle check || bundle install"
# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# end
puts "\n== Preparing database =="
system "bin/rake db:setup"
puts "\n== Removing old logs and tempfiles =="
system "rm -f log/*"
system "rm -rf tmp/cache"
puts "\n== Restarting application server =="
system "touch tmp/restart.txt"
end

View File

@ -1,4 +1,4 @@
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)
run Rails.application run Rails.application

View File

@ -19,5 +19,8 @@ module AdoptAThing
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # 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.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de # config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
end end
end end

View File

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

View File

@ -28,6 +28,10 @@ Rails.application.configure do
# number of complex assets. # number of complex assets.
config.assets.debug = true config.assets.debug = true
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# Adds additional error checking when serving assets at runtime. # Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies. # Checks for improperly declared sprockets dependencies.
# Raises helpful error messages. # Raises helpful error messages.

View File

@ -16,10 +16,11 @@ Rails.application.configure do
# Enable Rack::Cache to put a simple HTTP cache in front of your application # Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this. # Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. # For large-scale production use, consider using a caching reverse proxy like
# NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true # config.action_dispatch.rack_cache = true
# Disable Rails's static asset server (Apache or nginx will already do this). # Disable Rails's static asset server (Apache or NGINX will already do this).
config.serve_static_assets = false config.serve_static_assets = false
# Compress JavaScripts and CSS. # Compress JavaScripts and CSS.
@ -29,21 +30,22 @@ Rails.application.configure do
# Do not fallback to assets pipeline if a precompiled asset is missed. # Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false config.assets.compile = false
# Generate digests for assets URLs. # Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets. # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
config.assets.version = '1.0'
# Specifies the header that your server uses for sending files. # Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true # config.force_ssl = true
# Set to :debug to see everything in the log. # Use the lowest log level to ensure availability of diagnostic information
config.log_level = :info # when problems arise.
config.log_level = :debug
# Prepend all log lines with the following tags. # Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ] # config.log_tags = [ :subdomain, :uuid ]
@ -55,11 +57,7 @@ Rails.application.configure do
# config.cache_store = :mem_cache_store # config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server. # Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com" # 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. # 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. # Set this to true and configure the email server for immediate delivery to raise delivery errors.

View File

@ -32,6 +32,9 @@ Rails.application.configure do
config.action_mailer.delivery_method = :test config.action_mailer.delivery_method = :test
config.action_mailer.default_url_options = {host: 'localhost:3000'} config.action_mailer.default_url_options = {host: 'localhost:3000'}
# Randomize the order test cases are executed
config.active_support.test_order = :random
# Print deprecation notices to the stderr. # Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr config.active_support.deprecation = :stderr

View File

@ -0,0 +1,11 @@
# 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'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# 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

@ -1,3 +1,3 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_adopt-a-hydrant_session' Rails.application.config.session_store :cookie_store, key: '_adopt-a-thing_session'

View File

@ -1,12 +0,0 @@
require 'test_helper'
require 'rails/performance_test_help'
class BrowsingTest < ActionDispatch::PerformanceTest
# Refer to the documentation for all available options
# self.profile_options = { runs: 5, metrics: [:wall_time, :memory]
# output: 'tmp/performance', formats: [:flat] }
def test_homepage
get '/'
end
end