From faa7908619a4713d0ffc4b79de78667b98f45de8 Mon Sep 17 00:00:00 2001 From: Heiko Bernloehr Date: Wed, 28 Feb 2018 11:46:19 +0100 Subject: Upgrade to Rails 4.2.10 --- Gemfile | 7 +- Gemfile.lock | 142 +++++++++++++++++++----------- bin/rails | 7 +- bin/rake | 5 -- config/boot.rb | 3 +- config/environments/development.rb | 4 + config/environments/production.rb | 27 +++--- config/environments/test.rb | 7 +- config/initializers/assets.rb | 3 + config/initializers/cookies_serializer.rb | 3 +- db/schema.rb | 74 ++++++++-------- 11 files changed, 164 insertions(+), 118 deletions(-) diff --git a/Gemfile b/Gemfile index b5a40ce..398b58b 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '4.1.8' +gem 'rails', '4.2.10' # Use sqlite3 as the database for Active Record gem 'sqlite3' # Use SCSS for stylesheets @@ -38,7 +38,10 @@ gem 'unicorn' # Use debugger # gem 'debugger', group: [:development, :test] -gem "pg" +gem "pg", '~> 0.11' gem "haml", "4.0.5" gem "simple-navigation" +gem 'web-console', '~> 2.0', group: :development +gem 'responders', '~> 2.0' gem 'unicorn-rails' +gem "less" diff --git a/Gemfile.lock b/Gemfile.lock index 710af2e..69c4a37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,33 +1,43 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.1.8) - actionpack (= 4.1.8) - actionview (= 4.1.8) + actionmailer (4.2.10) + actionpack (= 4.2.10) + actionview (= 4.2.10) + activejob (= 4.2.10) mail (~> 2.5, >= 2.5.4) - actionpack (4.1.8) - actionview (= 4.1.8) - activesupport (= 4.1.8) - rack (~> 1.5.2) + rails-dom-testing (~> 1.0, >= 1.0.5) + actionpack (4.2.10) + actionview (= 4.2.10) + activesupport (= 4.2.10) + rack (~> 1.6) rack-test (~> 0.6.2) - actionview (4.1.8) - activesupport (= 4.1.8) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (4.2.10) + activesupport (= 4.2.10) builder (~> 3.1) erubis (~> 2.7.0) - activemodel (4.1.8) - activesupport (= 4.1.8) + rails-dom-testing (~> 1.0, >= 1.0.5) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (4.2.10) + activesupport (= 4.2.10) + globalid (>= 0.3.0) + activemodel (4.2.10) + activesupport (= 4.2.10) 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) - json (~> 1.7, >= 1.7.7) + activerecord (4.2.10) + activemodel (= 4.2.10) + activesupport (= 4.2.10) + arel (~> 6.0) + activesupport (4.2.10) + i18n (~> 0.7) minitest (~> 5.1) - thread_safe (~> 0.1) + thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - arel (5.0.1.20140414130214) + arel (6.0.4) + binding_of_caller (0.8.0) + debug_inspector (>= 0.0.1) builder (3.2.3) coffee-rails (4.0.1) coffee-script (>= 2.2.0) @@ -36,53 +46,77 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) + commonjs (0.2.7) concurrent-ruby (1.0.5) + crass (1.0.3) + debug_inspector (0.0.3) erubis (2.7.0) execjs (2.7.0) + globalid (0.4.1) + activesupport (>= 4.2.0) haml (4.0.5) tilt hike (1.2.3) - i18n (0.9.1) + i18n (0.9.5) concurrent-ruby (~> 1.0) - jbuilder (2.6.4) - activesupport (>= 3.0.0) + jbuilder (2.7.0) + activesupport (>= 4.2.0) multi_json (>= 1.2) - jquery-rails (3.1.4) - railties (>= 3.0, < 5.0) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.6) - kgio (2.11.1) + kgio (2.11.2) + less (2.6.0) + commonjs (~> 0.2.7) libv8 (3.16.14.19) + loofah (2.2.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) mail (2.7.0) mini_mime (>= 0.1.1) mini_mime (1.0.0) - minitest (5.11.1) + mini_portile2 (2.3.0) + minitest (5.11.3) multi_json (1.13.1) - pg (1.0.0) - rack (1.5.5) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) + pg (0.21.0) + rack (1.6.9) rack-test (0.6.3) rack (>= 1.0) - 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) + rails (4.2.10) + actionmailer (= 4.2.10) + actionpack (= 4.2.10) + actionview (= 4.2.10) + activejob (= 4.2.10) + activemodel (= 4.2.10) + activerecord (= 4.2.10) + activesupport (= 4.2.10) bundler (>= 1.3.0, < 2.0) - railties (= 4.1.8) - sprockets-rails (~> 2.0) - rails-observers (0.1.2) - activemodel (~> 4.0) - railties (4.1.8) - actionpack (= 4.1.8) - activesupport (= 4.1.8) + railties (= 4.2.10) + sprockets-rails + rails-deprecated_sanitizer (1.0.3) + activesupport (>= 4.2.0.alpha) + rails-dom-testing (1.0.9) + activesupport (>= 4.2.0, < 5.0) + nokogiri (~> 1.6) + rails-deprecated_sanitizer (>= 1.0.1) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (4.2.10) + actionpack (= 4.2.10) + activesupport (= 4.2.10) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) raindrops (0.19.0) rake (12.3.0) rdoc (4.3.0) ref (2.0.0) + responders (2.4.0) + actionpack (>= 4.2.0, < 5.3) + railties (>= 4.2.0, < 5.3) sass (3.2.19) sass-rails (4.0.5) railties (>= 4.0.0, < 5.0) @@ -94,7 +128,8 @@ GEM rdoc (~> 4.0) simple-navigation (4.0.5) activesupport (>= 2.3.2) - spring (1.7.2) + spring (2.0.2) + activesupport (>= 4.2) sprockets (2.12.4) hike (~> 1.2) multi_json (~> 1.0) @@ -114,9 +149,9 @@ GEM turbolinks (5.1.0) turbolinks-source (~> 5.1) turbolinks-source (5.1.0) - tzinfo (1.2.4) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.3) + uglifier (4.1.6) execjs (>= 0.3.0, < 3) unicorn (5.4.0) kgio (~> 2.6) @@ -124,6 +159,11 @@ GEM unicorn-rails (2.2.1) rack unicorn + web-console (2.3.0) + activemodel (>= 4.0) + binding_of_caller (>= 0.7.2) + railties (>= 4.0) + sprockets-rails (>= 2.0, < 4.0) PLATFORMS ruby @@ -133,9 +173,10 @@ DEPENDENCIES haml (= 4.0.5) jbuilder (~> 2.0) jquery-rails - pg - rails (= 4.1.8) - rails-observers + less + pg (~> 0.11) + rails (= 4.2.10) + responders (~> 2.0) sass-rails (~> 4.0.3) sdoc (~> 0.4.0) simple-navigation @@ -146,6 +187,7 @@ DEPENDENCIES uglifier (>= 1.3.0) unicorn unicorn-rails + web-console (~> 2.0) BUNDLED WITH - 1.15.4 + 1.13.6 diff --git a/bin/rails b/bin/rails index f2b0313..5191e69 100755 --- a/bin/rails +++ b/bin/rails @@ -1,9 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end -APP_PATH = File.expand_path('../../config/application', __FILE__) +APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' diff --git a/bin/rake b/bin/rake index d87d5f5..1724048 100755 --- a/bin/rake +++ b/bin/rake @@ -1,9 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end require_relative '../config/boot' require 'rake' Rake.application.run diff --git a/config/boot.rb b/config/boot.rb index 5e5f0c1..6b750f0 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,3 @@ -# Set up gems listed in the Gemfile. 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. diff --git a/config/environments/development.rb b/config/environments/development.rb index ddf0e90..b55e214 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -27,6 +27,10 @@ Rails.application.configure do # number of complex assets. 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. # Checks for improperly declared sprockets dependencies. # Raises helpful error messages. diff --git a/config/environments/production.rb b/config/environments/production.rb index b93a877..10a93dd 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -16,33 +16,37 @@ Rails.application.configure do # Enable Rack::Cache to put a simple HTTP cache in front of your application # 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 - # Disable Rails's static asset server (Apache or nginx will already do this). - config.serve_static_assets = false + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. - config.assets.compile = false + config.assets.compile = true - # 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.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 - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # 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. # config.force_ssl = true - # Set to :debug to see everything in the log. - config.log_level = :info + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] @@ -54,7 +58,7 @@ Rails.application.configure do # config.cache_store = :mem_cache_store # 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' # 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. @@ -67,9 +71,6 @@ Rails.application.configure do # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify - # Disable automatic flushing of the log to improve performance. - # config.autoflush_log = false - # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new diff --git a/config/environments/test.rb b/config/environments/test.rb index 053f5b6..1c19f08 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -12,8 +12,8 @@ Rails.application.configure do # preloads Rails for running tests, you may have to set it to true. config.eager_load = false - # Configure static asset server for tests with Cache-Control for performance. - config.serve_static_assets = true + # Configure static file server for tests with Cache-Control for performance. + config.serve_static_files = true config.static_cache_control = 'public, max-age=3600' # Show full error reports and disable caching. @@ -31,6 +31,9 @@ Rails.application.configure do # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + # Randomize the order test cases are executed. + config.active_support.test_order = :random + # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index d2f4ec3..01ef3e6 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -3,6 +3,9 @@ # 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 ) diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index 7a06a89..573e579 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -1,3 +1,4 @@ # Be sure to restart your server when you modify this file. -Rails.application.config.action_dispatch.cookies_serializer = :json \ No newline at end of file +Rails.application.config.action_dispatch.cookies_serializer = :json + diff --git a/db/schema.rb b/db/schema.rb index bf624dd..3712855 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -16,34 +16,34 @@ ActiveRecord::Schema.define(version: 20150420210728) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" - create_table "auths", force: true do |t| - t.string "one_touch_hash" + create_table "auths", force: :cascade do |t| + t.string "one_touch_hash", limit: 255 t.integer "message_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "communities", force: true do |t| - t.string "name" + create_table "communities", force: :cascade do |t| + t.string "name", limit: 255 t.text "description" t.datetime "created_at" t.datetime "updated_at" end - create_table "community_messages", force: true do |t| + create_table "community_messages", force: :cascade do |t| t.integer "community_id" t.integer "message_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "ev_types", force: true do |t| - t.string "name" + create_table "ev_types", force: :cascade do |t| + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" end - create_table "events", force: true do |t| + create_table "events", force: :cascade do |t| t.integer "participant_id" t.integer "message_id" t.integer "ev_type_id" @@ -52,15 +52,15 @@ ActiveRecord::Schema.define(version: 20150420210728) do t.integer "lock_version", default: 0 end - create_table "identities", force: true do |t| + create_table "identities", force: :cascade do |t| t.integer "participant_id" - t.string "name" + t.string "name", limit: 255 t.text "description" t.datetime "created_at" t.datetime "updated_at" end - create_table "membership_messages", force: true do |t| + create_table "membership_messages", force: :cascade do |t| t.integer "membership_id" t.integer "message_id" t.datetime "created_at" @@ -68,65 +68,65 @@ ActiveRecord::Schema.define(version: 20150420210728) do t.integer "lock_version", default: 0 end - create_table "memberships", force: true do |t| + create_table "memberships", force: :cascade do |t| t.integer "participant_id" t.integer "community_id" t.datetime "created_at" t.datetime "updated_at" end - create_table "messages", force: true do |t| - t.string "content_type" + create_table "messages", force: :cascade do |t| + t.string "content_type", limit: 255 t.integer "sender" t.text "body" t.integer "ressource_id" t.datetime "created_at" t.datetime "updated_at" - t.boolean "removed", default: false + t.boolean "removed", default: false end - create_table "organizations", force: true do |t| - t.string "name" + create_table "organizations", force: :cascade do |t| + t.string "name", limit: 255 t.text "description" - t.string "abrev" + t.string "abrev", limit: 255 t.datetime "created_at" t.datetime "updated_at" end - create_table "participants", force: true do |t| - t.string "name" - t.string "dns" - t.string "email" + create_table "participants", force: :cascade do |t| + t.string "name", limit: 255 + t.string "dns", limit: 255 + t.string "email", limit: 255 t.text "description" t.integer "organization_id" t.datetime "ttl" - t.boolean "anonymous", default: false, null: false + t.boolean "anonymous", default: false, null: false t.datetime "created_at" t.datetime "updated_at" - t.boolean "community_selfrouting", default: false - t.boolean "events_", default: true + t.boolean "community_selfrouting", default: false + t.boolean "events_", default: true t.string "ptype" end - create_table "ressource_monitors", force: true do |t| - t.integer "lock_version", default: 0 - t.integer "monitor_counter", default: 0 - t.string "name" + create_table "ressource_monitors", force: :cascade do |t| + t.integer "lock_version", default: 0 + t.integer "monitor_counter", default: 0 + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" end - create_table "ressources", force: true do |t| - t.string "namespace" - t.string "ressource" - t.boolean "postroute", default: false + create_table "ressources", force: :cascade do |t| + t.string "namespace", limit: 255 + t.string "ressource", limit: 255 + t.boolean "postroute", default: false t.datetime "created_at" t.datetime "updated_at" - t.boolean "events", default: true + t.boolean "events", default: true end - create_table "sessions", force: true do |t| - t.string "session_id", null: false + create_table "sessions", force: :cascade do |t| + t.string "session_id", limit: 255, null: false t.text "data" t.datetime "created_at" t.datetime "updated_at" @@ -135,7 +135,7 @@ ActiveRecord::Schema.define(version: 20150420210728) do add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", using: :btree add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree - create_table "subparticipants", force: true do |t| + create_table "subparticipants", force: :cascade do |t| t.integer "participant_id" t.integer "parent_id" t.string "realm" -- cgit v1.2.3