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
# 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"
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)
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)
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)
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)
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)
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)
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)
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
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
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
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
# Load the Rails application.
-require File.expand_path("../application", __FILE__)
+require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!
# 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
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?
# 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
# 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.
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