diff --git a/Gemfile b/Gemfile index 9f6d68e1..fd22480d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'http://rubygems.org' ruby '2.6.10' -gem 'rails', '= 6.0.6.1' +gem 'rails', '= 6.1.7.4' # Our database is MySQL, in both development and production. gem 'mysql2', '~> 0.5.5' diff --git a/Gemfile.lock b/Gemfile.lock index ed7615b6..5cf0c811 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,61 +7,65 @@ GIT GEM remote: http://rubygems.org/ specs: - actioncable (6.0.6.1) - actionpack (= 6.0.6.1) + actioncable (6.1.7.4) + actionpack (= 6.1.7.4) + activesupport (= 6.1.7.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.6.1) - actionpack (= 6.0.6.1) - activejob (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) + actionmailbox (6.1.7.4) + actionpack (= 6.1.7.4) + activejob (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) mail (>= 2.7.1) - actionmailer (6.0.6.1) - actionpack (= 6.0.6.1) - actionview (= 6.0.6.1) - activejob (= 6.0.6.1) + actionmailer (6.1.7.4) + actionpack (= 6.1.7.4) + actionview (= 6.1.7.4) + activejob (= 6.1.7.4) + activesupport (= 6.1.7.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.6.1) - actionview (= 6.0.6.1) - activesupport (= 6.0.6.1) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.7.4) + actionview (= 6.1.7.4) + activesupport (= 6.1.7.4) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.6.1) - actionpack (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) + actiontext (6.1.7.4) + actionpack (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) nokogiri (>= 1.8.5) - actionview (6.0.6.1) - activesupport (= 6.0.6.1) + actionview (6.1.7.4) + activesupport (= 6.1.7.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.0.6.1) - activesupport (= 6.0.6.1) + activejob (6.1.7.4) + activesupport (= 6.1.7.4) globalid (>= 0.3.6) - activemodel (6.0.6.1) - activesupport (= 6.0.6.1) - activerecord (6.0.6.1) - activemodel (= 6.0.6.1) - activesupport (= 6.0.6.1) - activestorage (6.0.6.1) - actionpack (= 6.0.6.1) - activejob (= 6.0.6.1) - activerecord (= 6.0.6.1) + activemodel (6.1.7.4) + activesupport (= 6.1.7.4) + activerecord (6.1.7.4) + activemodel (= 6.1.7.4) + activesupport (= 6.1.7.4) + activestorage (6.1.7.4) + actionpack (= 6.1.7.4) + activejob (= 6.1.7.4) + activerecord (= 6.1.7.4) + activesupport (= 6.1.7.4) marcel (~> 1.0) - activesupport (6.0.6.1) + mini_mime (>= 1.1.0) + activesupport (6.1.7.4) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) babel-source (5.8.35) @@ -194,20 +198,20 @@ GEM rack (>= 1.0, < 4) rack-test (2.1.0) rack (>= 1.3) - rails (6.0.6.1) - actioncable (= 6.0.6.1) - actionmailbox (= 6.0.6.1) - actionmailer (= 6.0.6.1) - actionpack (= 6.0.6.1) - actiontext (= 6.0.6.1) - actionview (= 6.0.6.1) - activejob (= 6.0.6.1) - activemodel (= 6.0.6.1) - activerecord (= 6.0.6.1) - activestorage (= 6.0.6.1) - activesupport (= 6.0.6.1) - bundler (>= 1.3.0) - railties (= 6.0.6.1) + rails (6.1.7.4) + actioncable (= 6.1.7.4) + actionmailbox (= 6.1.7.4) + actionmailer (= 6.1.7.4) + actionpack (= 6.1.7.4) + actiontext (= 6.1.7.4) + actionview (= 6.1.7.4) + activejob (= 6.1.7.4) + activemodel (= 6.1.7.4) + activerecord (= 6.1.7.4) + activestorage (= 6.1.7.4) + activesupport (= 6.1.7.4) + bundler (>= 1.15.0) + railties (= 6.1.7.4) sprockets-rails (>= 2.0.0) rails-dom-testing (2.1.1) activesupport (>= 5.0.0) @@ -218,12 +222,12 @@ GEM rails-i18n (7.0.7) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (6.0.6.1) - actionpack (= 6.0.6.1) - activesupport (= 6.0.6.1) + railties (6.1.7.4) + actionpack (= 6.1.7.4) + activesupport (= 6.1.7.4) method_source - rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) + rake (>= 12.2) + thor (~> 1.0) rake (13.0.6) rb-fsevent (0.11.2) rb-inotify (0.10.1) @@ -281,11 +285,10 @@ GEM sprockets (>= 3.0.0) temple (0.8.2) thor (1.2.2) - thread_safe (0.3.6) tilt (2.2.0) timeout (0.4.0) - tzinfo (1.2.11) - thread_safe (~> 0.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) unf (0.1.4) @@ -326,7 +329,7 @@ DEPENDENCIES openneo-auth-signatory (~> 0.1.0) parallel (~> 1.23) rack-attack (~> 6.7) - rails (= 6.0.6.1) + rails (= 6.1.7.4) rails-i18n (~> 7.0, >= 7.0.7) rdiscount (~> 2.2, >= 2.2.7.1) react-rails (~> 2.7, >= 2.7.1) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 375c1897..725ab0bc 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -49,7 +49,7 @@ class ApplicationController < ActionController::Base rescue_from AccessDenied, :with => :on_access_denied def on_access_denied - render :file => 'public/403.html', :layout => false, :status => :forbidden + render template: 'public/403.html', :layout => false, :status => :forbidden end def redirect_back!(default=:back) diff --git a/app/views/layouts/items.html.haml b/app/views/layouts/items.html.haml index b609a23d..2d5dcc23 100644 --- a/app/views/layouts/items.html.haml +++ b/app/views/layouts/items.html.haml @@ -11,5 +11,5 @@ = text_field_tag :q, @query.to_s = submit_tag t('.search'), :name => nil = yield -= render :file => 'layouts/application' += render template: 'layouts/application' diff --git a/bin/rails b/bin/rails index 07396602..6fb4e405 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' +require_relative "../config/boot" +require "rails/commands" diff --git a/bin/rake b/bin/rake index 17240489..4fbf10b9 100755 --- a/bin/rake +++ b/bin/rake @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' +require_relative "../config/boot" +require "rake" Rake.application.run diff --git a/bin/setup b/bin/setup index 5853b5ea..90700ac4 100755 --- a/bin/setup +++ b/bin/setup @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -require 'fileutils' +require "fileutils" # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,8 +9,8 @@ def system!(*args) end FileUtils.chdir APP_ROOT do - # This script is a way to setup or update your development environment automatically. - # This script is idempotent, so that you can run it at anytime and get an expectable outcome. + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts '== Installing dependencies ==' @@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do system('bundle check') || system!('bundle install') # Install JavaScript dependencies - # system('bin/yarn') + system! 'bin/yarn' # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') diff --git a/bin/yarn b/bin/yarn index 460dd565..9fab2c35 100755 --- a/bin/yarn +++ b/bin/yarn @@ -1,9 +1,15 @@ #!/usr/bin/env ruby APP_ROOT = File.expand_path('..', __dir__) Dir.chdir(APP_ROOT) do - begin - exec "yarnpkg", *ARGV - rescue Errno::ENOENT + yarn = ENV["PATH"].split(File::PATH_SEPARATOR). + select { |dir| File.expand_path(dir) != __dir__ }. + product(["yarn", "yarn.cmd", "yarn.ps1"]). + map { |dir, file| File.expand_path(file, dir) }. + find { |file| File.executable?(file) } + + if yarn + exec yarn, *ARGV + else $stderr.puts "Yarn executable was not detected in the system." $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" exit 1 diff --git a/config.ru b/config.ru index b91ce3e5..4a3c09a6 100644 --- a/config.ru +++ b/config.ru @@ -1,6 +1,6 @@ # This file is used by Rack-based servers to start the application. -require ::File.expand_path('../config/environment', __FILE__) +require_relative "config/environment" -use Rack::FiberPool if defined?(USE_FIBER_POOL) && USE_FIBER_POOL -run OpenneoImpressItems::Application +run Rails.application +Rails.application.load_server diff --git a/config/application.rb b/config/application.rb index 5c9904be..1fe7543b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,6 +1,6 @@ -require_relative 'boot' +require_relative "boot" -require 'rails/all' +require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. @@ -9,7 +9,7 @@ Bundler.require(*Rails.groups) module OpenneoImpressItems class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.0 + config.load_defaults 6.1 # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers diff --git a/config/boot.rb b/config/boot.rb index b9e460ce..3cda23b4 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -require 'bundler/setup' # Set up gems listed in the Gemfile. -require 'bootsnap/setup' # Speed up boot time by caching expensive operations. +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/environment.rb b/config/environment.rb index 426333bb..cac53157 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require_relative 'application' +require_relative "application" # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index d8c9e9b1..371d6b4c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/integer/time" + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/config/environments/production.rb b/config/environments/production.rb index 03347c73..159d7ed2 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/integer/time" + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. diff --git a/config/environments/test.rb b/config/environments/test.rb index 470dee4b..17ce39cf 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/integer/time" + # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped @@ -43,6 +45,15 @@ Rails.application.configure do # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Raises error for missing translations. - # config.action_view.raise_on_missing_translations = true + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index 59385cdf..33699c30 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -1,7 +1,8 @@ # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } +# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code +# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". +Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4a994e1e..4b34a036 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,4 +1,6 @@ # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb new file mode 100644 index 00000000..00f64d71 --- /dev/null +++ b/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end diff --git a/vendor/cache/actioncable-6.0.6.1.gem b/vendor/cache/actioncable-6.0.6.1.gem deleted file mode 100644 index 7af82a26..00000000 Binary files a/vendor/cache/actioncable-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/actioncable-6.1.7.4.gem b/vendor/cache/actioncable-6.1.7.4.gem new file mode 100644 index 00000000..fb781fac Binary files /dev/null and b/vendor/cache/actioncable-6.1.7.4.gem differ diff --git a/vendor/cache/actionmailbox-6.0.6.1.gem b/vendor/cache/actionmailbox-6.0.6.1.gem deleted file mode 100644 index bf553240..00000000 Binary files a/vendor/cache/actionmailbox-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/actionmailbox-6.1.7.4.gem b/vendor/cache/actionmailbox-6.1.7.4.gem new file mode 100644 index 00000000..999c9711 Binary files /dev/null and b/vendor/cache/actionmailbox-6.1.7.4.gem differ diff --git a/vendor/cache/actionmailer-6.0.6.1.gem b/vendor/cache/actionmailer-6.0.6.1.gem deleted file mode 100644 index 5f265bd6..00000000 Binary files a/vendor/cache/actionmailer-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/actionmailer-6.1.7.4.gem b/vendor/cache/actionmailer-6.1.7.4.gem new file mode 100644 index 00000000..56cc11fc Binary files /dev/null and b/vendor/cache/actionmailer-6.1.7.4.gem differ diff --git a/vendor/cache/actionpack-6.0.6.1.gem b/vendor/cache/actionpack-6.0.6.1.gem deleted file mode 100644 index 177e10b9..00000000 Binary files a/vendor/cache/actionpack-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/actionpack-6.1.7.4.gem b/vendor/cache/actionpack-6.1.7.4.gem new file mode 100644 index 00000000..094ad889 Binary files /dev/null and b/vendor/cache/actionpack-6.1.7.4.gem differ diff --git a/vendor/cache/actiontext-6.0.6.1.gem b/vendor/cache/actiontext-6.0.6.1.gem deleted file mode 100644 index 7ee6f1b2..00000000 Binary files a/vendor/cache/actiontext-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/actiontext-6.1.7.4.gem b/vendor/cache/actiontext-6.1.7.4.gem new file mode 100644 index 00000000..37af888a Binary files /dev/null and b/vendor/cache/actiontext-6.1.7.4.gem differ diff --git a/vendor/cache/actionview-6.0.6.1.gem b/vendor/cache/actionview-6.0.6.1.gem deleted file mode 100644 index 361280b4..00000000 Binary files a/vendor/cache/actionview-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/actionview-6.1.7.4.gem b/vendor/cache/actionview-6.1.7.4.gem new file mode 100644 index 00000000..829b5158 Binary files /dev/null and b/vendor/cache/actionview-6.1.7.4.gem differ diff --git a/vendor/cache/activejob-6.0.6.1.gem b/vendor/cache/activejob-6.0.6.1.gem deleted file mode 100644 index 66a75ff6..00000000 Binary files a/vendor/cache/activejob-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/activejob-6.1.7.4.gem b/vendor/cache/activejob-6.1.7.4.gem new file mode 100644 index 00000000..36fca595 Binary files /dev/null and b/vendor/cache/activejob-6.1.7.4.gem differ diff --git a/vendor/cache/activemodel-6.0.6.1.gem b/vendor/cache/activemodel-6.0.6.1.gem deleted file mode 100644 index acf40e97..00000000 Binary files a/vendor/cache/activemodel-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/activemodel-6.1.7.4.gem b/vendor/cache/activemodel-6.1.7.4.gem new file mode 100644 index 00000000..a889a029 Binary files /dev/null and b/vendor/cache/activemodel-6.1.7.4.gem differ diff --git a/vendor/cache/activerecord-6.0.6.1.gem b/vendor/cache/activerecord-6.0.6.1.gem deleted file mode 100644 index 0d55bbaa..00000000 Binary files a/vendor/cache/activerecord-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/activerecord-6.1.7.4.gem b/vendor/cache/activerecord-6.1.7.4.gem new file mode 100644 index 00000000..3b3a4738 Binary files /dev/null and b/vendor/cache/activerecord-6.1.7.4.gem differ diff --git a/vendor/cache/activestorage-6.0.6.1.gem b/vendor/cache/activestorage-6.0.6.1.gem deleted file mode 100644 index e20eb615..00000000 Binary files a/vendor/cache/activestorage-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/activestorage-6.1.7.4.gem b/vendor/cache/activestorage-6.1.7.4.gem new file mode 100644 index 00000000..ce8a3d90 Binary files /dev/null and b/vendor/cache/activestorage-6.1.7.4.gem differ diff --git a/vendor/cache/activesupport-6.0.6.1.gem b/vendor/cache/activesupport-6.0.6.1.gem deleted file mode 100644 index c053e417..00000000 Binary files a/vendor/cache/activesupport-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/activesupport-6.1.7.4.gem b/vendor/cache/activesupport-6.1.7.4.gem new file mode 100644 index 00000000..0ad0e670 Binary files /dev/null and b/vendor/cache/activesupport-6.1.7.4.gem differ diff --git a/vendor/cache/rails-6.0.6.1.gem b/vendor/cache/rails-6.0.6.1.gem deleted file mode 100644 index 47cc00bc..00000000 Binary files a/vendor/cache/rails-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/rails-6.1.7.4.gem b/vendor/cache/rails-6.1.7.4.gem new file mode 100644 index 00000000..8d17c704 Binary files /dev/null and b/vendor/cache/rails-6.1.7.4.gem differ diff --git a/vendor/cache/railties-6.0.6.1.gem b/vendor/cache/railties-6.0.6.1.gem deleted file mode 100644 index ead13d26..00000000 Binary files a/vendor/cache/railties-6.0.6.1.gem and /dev/null differ diff --git a/vendor/cache/railties-6.1.7.4.gem b/vendor/cache/railties-6.1.7.4.gem new file mode 100644 index 00000000..e8420330 Binary files /dev/null and b/vendor/cache/railties-6.1.7.4.gem differ diff --git a/vendor/cache/thread_safe-0.3.6.gem b/vendor/cache/thread_safe-0.3.6.gem deleted file mode 100644 index 7ee950f8..00000000 Binary files a/vendor/cache/thread_safe-0.3.6.gem and /dev/null differ diff --git a/vendor/cache/tzinfo-1.2.11.gem b/vendor/cache/tzinfo-1.2.11.gem deleted file mode 100644 index a345ab95..00000000 Binary files a/vendor/cache/tzinfo-1.2.11.gem and /dev/null differ diff --git a/vendor/cache/tzinfo-2.0.6.gem b/vendor/cache/tzinfo-2.0.6.gem new file mode 100644 index 00000000..2c16da8a Binary files /dev/null and b/vendor/cache/tzinfo-2.0.6.gem differ