Update to rails 5.1.4
This commit is contained in:
parent
4b91dc4228
commit
f773f67958
8 changed files with 77 additions and 58 deletions
4
Gemfile
4
Gemfile
|
@ -1,7 +1,7 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
# Require rails
|
||||
gem "rails", "5.0.6"
|
||||
gem "rails", "5.1.4"
|
||||
|
||||
# Require things which have moved to gems in ruby 1.9
|
||||
gem "bigdecimal", "~> 1.1.0", :platforms => :ruby_19
|
||||
|
@ -42,7 +42,7 @@ gem "image_optim_rails"
|
|||
|
||||
# Load rails plugins
|
||||
gem "actionpack-page_caching"
|
||||
gem "composite_primary_keys", "~> 9.0.7"
|
||||
gem "composite_primary_keys", "~> 10.0.0"
|
||||
gem "dynamic_form"
|
||||
gem "http_accept_language", "~> 2.0.0"
|
||||
gem "i18n-js", ">= 3.0.0"
|
||||
|
|
98
Gemfile.lock
98
Gemfile.lock
|
@ -2,56 +2,56 @@ GEM
|
|||
remote: https://rubygems.org/
|
||||
specs:
|
||||
SystemTimer (1.2.3)
|
||||
actioncable (5.0.6)
|
||||
actionpack (= 5.0.6)
|
||||
nio4r (>= 1.2, < 3.0)
|
||||
actioncable (5.1.4)
|
||||
actionpack (= 5.1.4)
|
||||
nio4r (~> 2.0)
|
||||
websocket-driver (~> 0.6.1)
|
||||
actionmailer (5.0.6)
|
||||
actionpack (= 5.0.6)
|
||||
actionview (= 5.0.6)
|
||||
activejob (= 5.0.6)
|
||||
actionmailer (5.1.4)
|
||||
actionpack (= 5.1.4)
|
||||
actionview (= 5.1.4)
|
||||
activejob (= 5.1.4)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
actionpack (5.0.6)
|
||||
actionview (= 5.0.6)
|
||||
activesupport (= 5.0.6)
|
||||
actionpack (5.1.4)
|
||||
actionview (= 5.1.4)
|
||||
activesupport (= 5.1.4)
|
||||
rack (~> 2.0)
|
||||
rack-test (~> 0.6.3)
|
||||
rack-test (>= 0.6.3)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||
actionpack-page_caching (1.1.0)
|
||||
actionpack (>= 4.0.0, < 6)
|
||||
actionview (5.0.6)
|
||||
activesupport (= 5.0.6)
|
||||
actionview (5.1.4)
|
||||
activesupport (= 5.1.4)
|
||||
builder (~> 3.1)
|
||||
erubis (~> 2.7.0)
|
||||
erubi (~> 1.4)
|
||||
rails-dom-testing (~> 2.0)
|
||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||
activejob (5.0.6)
|
||||
activesupport (= 5.0.6)
|
||||
activejob (5.1.4)
|
||||
activesupport (= 5.1.4)
|
||||
globalid (>= 0.3.6)
|
||||
activemodel (5.0.6)
|
||||
activesupport (= 5.0.6)
|
||||
activerecord (5.0.6)
|
||||
activemodel (= 5.0.6)
|
||||
activesupport (= 5.0.6)
|
||||
arel (~> 7.0)
|
||||
activesupport (5.0.6)
|
||||
activemodel (5.1.4)
|
||||
activesupport (= 5.1.4)
|
||||
activerecord (5.1.4)
|
||||
activemodel (= 5.1.4)
|
||||
activesupport (= 5.1.4)
|
||||
arel (~> 8.0)
|
||||
activesupport (5.1.4)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
arel (7.1.4)
|
||||
arel (8.0.0)
|
||||
ast (2.3.0)
|
||||
autoprefixer-rails (7.1.4.1)
|
||||
autoprefixer-rails (7.1.5)
|
||||
execjs
|
||||
bigdecimal (1.1.0)
|
||||
builder (3.2.3)
|
||||
canonical-rails (0.2.1)
|
||||
rails (>= 4.1, < 5.2)
|
||||
capybara (2.15.3)
|
||||
capybara (2.15.4)
|
||||
addressable
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (>= 1.3.3)
|
||||
|
@ -69,8 +69,8 @@ GEM
|
|||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
composite_primary_keys (9.0.7)
|
||||
activerecord (~> 5.0.0)
|
||||
composite_primary_keys (10.0.0)
|
||||
activerecord (~> 5.1.0)
|
||||
concurrent-ruby (1.0.5)
|
||||
coveralls (0.8.21)
|
||||
json (>= 1.8, < 3)
|
||||
|
@ -84,7 +84,7 @@ GEM
|
|||
dalli (2.7.6)
|
||||
docile (1.1.5)
|
||||
dynamic_form (1.1.4)
|
||||
erubis (2.7.0)
|
||||
erubi (1.6.1)
|
||||
execjs (2.7.0)
|
||||
exifr (1.3.2)
|
||||
factory_girl (4.8.1)
|
||||
|
@ -99,7 +99,7 @@ GEM
|
|||
geoip (1.6.3)
|
||||
globalid (0.4.0)
|
||||
activesupport (>= 4.2.0)
|
||||
hashdiff (0.3.6)
|
||||
hashdiff (0.3.7)
|
||||
hashie (3.5.6)
|
||||
htmlentities (4.3.4)
|
||||
http_accept_language (2.0.5)
|
||||
|
@ -222,7 +222,7 @@ GEM
|
|||
cliver (~> 0.3.1)
|
||||
websocket-driver (>= 0.2.0)
|
||||
powerpack (0.1.1)
|
||||
progress (3.3.1)
|
||||
progress (3.3.2)
|
||||
psych (2.2.4)
|
||||
public_suffix (3.0.0)
|
||||
r2 (0.2.7)
|
||||
|
@ -231,20 +231,20 @@ GEM
|
|||
rack-openid (1.3.1)
|
||||
rack (>= 1.1.0)
|
||||
ruby-openid (>= 2.1.8)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rack-test (0.7.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rack-uri_sanitizer (0.0.2)
|
||||
rails (5.0.6)
|
||||
actioncable (= 5.0.6)
|
||||
actionmailer (= 5.0.6)
|
||||
actionpack (= 5.0.6)
|
||||
actionview (= 5.0.6)
|
||||
activejob (= 5.0.6)
|
||||
activemodel (= 5.0.6)
|
||||
activerecord (= 5.0.6)
|
||||
activesupport (= 5.0.6)
|
||||
rails (5.1.4)
|
||||
actioncable (= 5.1.4)
|
||||
actionmailer (= 5.1.4)
|
||||
actionpack (= 5.1.4)
|
||||
actionview (= 5.1.4)
|
||||
activejob (= 5.1.4)
|
||||
activemodel (= 5.1.4)
|
||||
activerecord (= 5.1.4)
|
||||
activesupport (= 5.1.4)
|
||||
bundler (>= 1.3.0)
|
||||
railties (= 5.0.6)
|
||||
railties (= 5.1.4)
|
||||
sprockets-rails (>= 2.0.0)
|
||||
rails-controller-testing (1.0.2)
|
||||
actionpack (~> 5.x, >= 5.0.1)
|
||||
|
@ -258,9 +258,9 @@ GEM
|
|||
rails-i18n (4.0.2)
|
||||
i18n (~> 0.6)
|
||||
rails (>= 4.0)
|
||||
railties (5.0.6)
|
||||
actionpack (= 5.0.6)
|
||||
activesupport (= 5.0.6)
|
||||
railties (5.1.4)
|
||||
actionpack (= 5.1.4)
|
||||
activesupport (= 5.1.4)
|
||||
method_source
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
|
@ -335,7 +335,7 @@ GEM
|
|||
validates_email_format_of (1.6.3)
|
||||
i18n
|
||||
vendorer (0.1.16)
|
||||
webmock (3.0.1)
|
||||
webmock (3.1.0)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff
|
||||
|
@ -355,7 +355,7 @@ DEPENDENCIES
|
|||
bigdecimal (~> 1.1.0)
|
||||
canonical-rails
|
||||
coffee-rails (~> 4.2)
|
||||
composite_primary_keys (~> 9.0.7)
|
||||
composite_primary_keys (~> 10.0.0)
|
||||
coveralls
|
||||
dalli
|
||||
dynamic_form
|
||||
|
@ -391,7 +391,7 @@ DEPENDENCIES
|
|||
r2 (~> 0.2.7)
|
||||
rack-cors
|
||||
rack-uri_sanitizer
|
||||
rails (= 5.0.6)
|
||||
rails (= 5.1.4)
|
||||
rails-controller-testing
|
||||
rails-i18n (~> 4.0.0)
|
||||
record_tag_helper
|
||||
|
|
|
@ -3,9 +3,9 @@ module ApplicationHelper
|
|||
|
||||
def linkify(text)
|
||||
if text.html_safe?
|
||||
Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow")).html_safe
|
||||
Rinku.auto_link(text, :urls, tag_builder.tag_options(:rel => "nofollow")).html_safe
|
||||
else
|
||||
Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow"))
|
||||
Rinku.auto_link(text, :urls, tag_builder.tag_options(:rel => "nofollow"))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Load the Rails application.
|
||||
require File.expand_path("../application", __FILE__)
|
||||
require_relative "application"
|
||||
|
||||
# Initialize the Rails application.
|
||||
Rails.application.initialize!
|
||||
|
|
|
@ -12,6 +12,20 @@ Rails.application.configure do
|
|||
# Show full error reports.
|
||||
config.consider_all_requests_local = true
|
||||
|
||||
# Enable/disable caching. By default caching is disabled.
|
||||
if Rails.root.join("tmp", "caching-dev.txt").exist?
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
config.cache_store = :memory_store
|
||||
config.public_file_server.headers = {
|
||||
"Cache-Control" => "public, max-age=#{2.days.seconds.to_i}"
|
||||
}
|
||||
else
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
config.cache_store = :null_store
|
||||
end
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
|
|
|
@ -14,6 +14,11 @@ Rails.application.configure do
|
|||
config.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
|
||||
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
|
||||
# `config/secrets.yml.key`.
|
||||
config.read_encrypted_secrets = true
|
||||
|
||||
# Disable serving static files from the `/public` folder by default since
|
||||
# Apache or NGINX already handles this.
|
||||
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
||||
|
@ -57,7 +62,7 @@ Rails.application.configure do
|
|||
|
||||
# Use a real queuing backend for Active Job (and separate queues per environment)
|
||||
# config.active_job.queue_adapter = :resque
|
||||
# config.active_job.queue_name_prefix = "rails50_#{Rails.env}"
|
||||
# config.active_job.queue_name_prefix = "openstreetmap_#{Rails.env}"
|
||||
config.action_mailer.perform_caching = false
|
||||
|
||||
# Configure caching of static assets
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
||||
ActiveSupport.on_load(:action_controller) do
|
||||
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
||||
wrap_parameters format: [:json]
|
||||
end
|
||||
|
||||
# To enable root element in JSON for ActiveRecord objects.
|
||||
|
|
|
@ -57,9 +57,9 @@ module RichText
|
|||
|
||||
def linkify(text)
|
||||
if text.html_safe?
|
||||
Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow")).html_safe
|
||||
Rinku.auto_link(text, :urls, tag_builder.tag_options(:rel => "nofollow")).html_safe
|
||||
else
|
||||
Rinku.auto_link(text, :urls, tag_options(:rel => "nofollow"))
|
||||
Rinku.auto_link(text, :urls, tag_builder.tag_options(:rel => "nofollow"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue