From 867fb8df12024d75ac714ed0bcfda67cd3f3438c Mon Sep 17 00:00:00 2001 From: Thomas Burkhalter Date: Mon, 6 Feb 2023 10:59:49 +0100 Subject: [PATCH 001/113] WIP: Upgrade to 6.0.6.1 --- .tool-versions | 2 +- Gemfile | 9 +- Gemfile.lock | 601 ++++++++++--------- app/assets/javascripts/application.js.coffee | 2 +- config/application.rb | 2 +- config/environments/development.rb | 40 +- config/initializers/session_store.rb | 35 +- 7 files changed, 373 insertions(+), 318 deletions(-) diff --git a/.tool-versions b/.tool-versions index 16cf04a64..0003ae989 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -ruby 2.5.5 +ruby 2.7.7 nodejs 14.4.0 diff --git a/Gemfile b/Gemfile index 35375953e..376f19572 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,10 @@ source 'https://rubygems.org' -gem 'rails', '~> 5.2.x' +git_source(:github) { |name| "https://github.com/#{name}.git" } -gem 'pg', '~> 0.21.0' + gem 'rails', '~> 6.0.6.1' + +gem 'pg' #, '~> 0.21.0' gem 'activerecord-nulldb-adapter' gem 'nochmal', github: 'puzzle/nochmal' @@ -37,6 +39,7 @@ gem 'omniauth-saml' gem 'prawn' gem 'prometheus_exporter' gem 'protective' +gem 'psych', '~> 3.0' gem 'puma' gem 'rails_autolink' gem 'rails-i18n' @@ -116,3 +119,5 @@ group :metrics do gem 'sdoc' gem 'simplecov-rcov', git: 'https://github.com/puzzle/simplecov-rcov' end + +gem "listen", "~> 3.8" diff --git a/Gemfile.lock b/Gemfile.lock index 22d688825..306baf293 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,10 @@ GIT remote: https://github.com/puzzle/nochmal.git - revision: d66a5e9a99e550084d29763d1395e1529fa17c2a + revision: 55a9cfbade16e78396ce69dbbb6267864d35fc84 specs: - nochmal (0.1.0) + nochmal (0.2.1) + pastel + rails (>= 6.0) GIT remote: https://github.com/puzzle/simplecov-rcov @@ -14,126 +16,139 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (5.2.7) - actionpack (= 5.2.7) + actioncable (6.0.6.1) + actionpack (= 6.0.6.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.7) - actionpack (= 5.2.7) - actionview (= 5.2.7) - activejob (= 5.2.7) + 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) + mail (>= 2.7.1) + actionmailer (6.0.6.1) + actionpack (= 6.0.6.1) + actionview (= 6.0.6.1) + activejob (= 6.0.6.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.7) - actionview (= 5.2.7) - activesupport (= 5.2.7) + actionpack (6.0.6.1) + actionview (= 6.0.6.1) + activesupport (= 6.0.6.1) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.7) - activesupport (= 5.2.7) + 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) + nokogiri (>= 1.8.5) + actionview (6.0.6.1) + activesupport (= 6.0.6.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.7) - activesupport (= 5.2.7) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.0.6.1) + activesupport (= 6.0.6.1) globalid (>= 0.3.6) - activemodel (5.2.7) - activesupport (= 5.2.7) + activemodel (6.0.6.1) + activesupport (= 6.0.6.1) activemodel-serializers-xml (1.0.2) activemodel (> 5.x) activesupport (> 5.x) builder (~> 3.1) - activerecord (5.2.7) - activemodel (= 5.2.7) - activesupport (= 5.2.7) - arel (>= 9.0) + activerecord (6.0.6.1) + activemodel (= 6.0.6.1) + activesupport (= 6.0.6.1) activerecord-nulldb-adapter (0.8.0) activerecord (>= 5.2.0, < 7.1) - activeresource (5.1.1) - activemodel (>= 5.0, < 7) + activeresource (6.0.0) + activemodel (>= 6.0) activemodel-serializers-xml (~> 1.0) - activesupport (>= 5.0, < 7) - activestorage (5.2.7) - actionpack (= 5.2.7) - activerecord (= 5.2.7) - marcel (~> 1.0.0) - activesupport (5.2.7) + activesupport (>= 6.0) + activestorage (6.0.6.1) + actionpack (= 6.0.6.1) + activejob (= 6.0.6.1) + activerecord (= 6.0.6.1) + marcel (~> 1.0) + activesupport (6.0.6.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) acts_as_tree (2.9.1) activerecord (>= 3.0.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) aes_key_wrap (1.1.0) - airbrake (11.0.3) - airbrake-ruby (~> 5.1) - airbrake-ruby (5.2.1) + airbrake (13.0.3) + airbrake-ruby (~> 6.0) + airbrake-ruby (6.2.0) rbtree3 (~> 0.5) - annotate (3.1.1) - activerecord (>= 3.2, < 7.0) + annotate (3.2.0) + activerecord (>= 3.2, < 8.0) rake (>= 10.4, < 14.0) ansi (1.5.0) - arel (9.0.0) ast (2.4.2) - autoprefixer-rails (10.2.5.1) - execjs (> 0) + autoprefixer-rails (10.4.7.0) + execjs (~> 2) aws-eventstream (1.2.0) - aws-partitions (1.496.0) - aws-sdk-core (3.121.0) + aws-partitions (1.705.0) + aws-sdk-core (3.170.0) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.5) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.62.0) + aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.48.0) - aws-sdk-core (~> 3, >= 3.120.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.102.0) - aws-sdk-core (~> 3, >= 3.120.0) + aws-sdk-s3 (1.119.0) + aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) - aws-sigv4 (1.4.0) + aws-sigv4 (1.5.2) aws-eventstream (~> 1, >= 1.0.2) - bcrypt (3.1.16) + bcrypt (3.1.18) better_errors (2.9.1) coderay (>= 1.0.0) erubi (>= 1.0.0) rack (>= 0.9.0) - bindata (2.4.10) + bindata (2.4.14) bindex (0.8.1) binding_of_caller (1.0.0) debug_inspector (>= 0.0.1) - bleib (0.0.11) - bootsnap (1.7.5) - msgpack (~> 1.0) + bleib (0.0.12) + bootsnap (1.16.0) + msgpack (~> 1.2) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) - brakeman (5.0.4) + brakeman (5.4.0) builder (3.2.4) - bullet (6.1.4) + bullet (7.0.7) activesupport (>= 3.0.0) uniform_notifier (~> 1.11) - bundler-audit (0.8.0) + bundler-audit (0.9.1) bundler (>= 1.2.0, < 3) thor (~> 1.0) byebug (11.1.3) - cancancan (3.3.0) - capybara (3.35.3) + cancancan (3.4.0) + capybara (3.38.0) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartjs-ror (3.6.4) + chartjs-ror (3.7.0) rails (>= 3.1) - childprocess (3.0.0) choice (0.2.0) chunky_png (1.4.0) coderay (1.1.3) @@ -147,260 +162,274 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.10) - config (3.1.0) + concurrent-ruby (1.2.0) + config (4.1.0) deep_merge (~> 1.2, >= 1.2.1) dry-validation (~> 1.0, >= 1.0.0) - countries (4.0.0) - i18n_data (~> 0.13.0) - sixarm_ruby_unaccent (~> 1.1) - country_select (6.0.0) - countries (~> 4.0) - sort_alphabetical (~> 1.1) + countries (5.3.1) + unaccent (~> 0.3) + country_select (8.0.1) + countries (~> 5.0) crack (0.4.5) rexml crass (1.0.6) - daemons (1.4.0) - dalli (2.7.11) + daemons (1.4.1) + dalli (3.2.3) database_cleaner (2.0.1) database_cleaner-active_record (~> 2.0.0) database_cleaner-active_record (2.0.1) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) + date (3.3.3) debug_inspector (1.1.0) - deep_merge (1.2.1) - delayed_cron_job (0.7.4) - delayed_job (>= 4.1) - delayed_job (4.1.9) - activesupport (>= 3.0, < 6.2) - delayed_job_active_record (4.1.6) - activerecord (>= 3.0, < 6.2) + deep_merge (1.2.2) + delayed_cron_job (0.9.0) + fugit (>= 1.5) + delayed_job (4.1.11) + activesupport (>= 3.0, < 8.0) + delayed_job_active_record (4.1.7) + activerecord (>= 3.0, < 8.0) delayed_job (>= 3.0, < 5) - devise (4.8.0) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) docile (1.4.0) - dry-configurable (0.12.1) - concurrent-ruby (~> 1.0) - dry-core (~> 0.5, >= 0.5.0) - dry-container (0.7.2) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.6.0) + dry-configurable (1.0.1) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-core (1.0.0) concurrent-ruby (~> 1.0) - dry-equalizer (0.3.0) - dry-inflector (0.2.0) - dry-initializer (3.0.4) - dry-logic (1.2.0) + zeitwerk (~> 2.6) + dry-inflector (1.0.0) + dry-initializer (3.1.1) + dry-logic (1.5.0) concurrent-ruby (~> 1.0) - dry-core (~> 0.5, >= 0.5) - dry-schema (1.6.2) + dry-core (~> 1.0, < 2) + zeitwerk (~> 2.6) + dry-schema (1.13.0) concurrent-ruby (~> 1.0) - dry-configurable (~> 0.8, >= 0.8.3) - dry-core (~> 0.5, >= 0.5) + dry-configurable (~> 1.0, >= 1.0.1) + dry-core (~> 1.0, < 2) dry-initializer (~> 3.0) - dry-logic (~> 1.0) - dry-types (~> 1.5) - dry-types (1.5.1) + dry-logic (>= 1.5, < 2) + dry-types (>= 1.7, < 2) + zeitwerk (~> 2.6) + dry-types (1.7.0) concurrent-ruby (~> 1.0) - dry-container (~> 0.3) - dry-core (~> 0.5, >= 0.5) - dry-inflector (~> 0.1, >= 0.1.2) - dry-logic (~> 1.0, >= 1.0.2) - dry-validation (1.6.0) + dry-core (~> 1.0, < 2) + dry-inflector (~> 1.0, < 2) + dry-logic (>= 1.4, < 2) + zeitwerk (~> 2.6) + dry-validation (1.10.0) concurrent-ruby (~> 1.0) - dry-container (~> 0.7, >= 0.7.1) - dry-core (~> 0.4) - dry-equalizer (~> 0.2) + dry-core (~> 1.0, < 2) dry-initializer (~> 3.0) - dry-schema (~> 1.5, >= 1.5.2) - email_address (0.2.2) + dry-schema (>= 1.12, < 2) + zeitwerk (~> 2.6) + email_address (0.2.4) simpleidn - erubi (1.10.0) + erubi (1.12.0) + et-orbi (1.2.7) + tzinfo execjs (2.8.1) - fabrication (2.22.0) - faker (2.18.0) - i18n (>= 1.6, < 2) - faraday (1.5.1) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0.1) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) - faraday-patron (~> 1.0) - multipart-post (>= 1.2, < 3) + fabrication (2.30.0) + faker (3.1.1) + i18n (>= 1.8.11, < 2) + faraday (2.7.4) + faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-httpclient (1.0.1) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) + faraday-net_http (3.0.2) fast_jsonapi (1.5) activesupport (>= 4.2) ffi (1.15.5) - globalid (1.0.0) + fugit (1.8.1) + et-orbi (~> 1, >= 1.2.7) + raabro (~> 1.4) + globalid (1.1.0) activesupport (>= 5.0) - haml (5.2.1) - temple (>= 0.8.0) + haml (6.1.1) + temple (>= 0.8.2) + thor tilt haml-lint (0.999.999) haml_lint - haml_lint (0.37.1) - haml (>= 4.0, < 5.3) + haml_lint (0.45.0) + haml (>= 4.0, < 6.2) parallel (~> 1.10) rainbow rubocop (>= 0.50.0) sysexits (~> 1.1) hashdiff (1.0.1) - hashie (4.1.0) + hashie (5.0.0) headless (2.3.1) highrise (3.2.3) activeresource (>= 3.2.13) hpricot (0.8.6) htmlentities (4.3.4) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) - i18n_data (0.13.0) image_processing (1.12.2) mini_magick (>= 4.9.5, < 5) ruby-vips (>= 2.0.17, < 3) - jbuilder (2.11.2) + jbuilder (2.11.5) + actionview (>= 5.0.0) activesupport (>= 5.0.0) - jmespath (1.4.0) - jquery-rails (4.4.0) + jmespath (1.6.2) + jquery-rails (4.5.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-ui-rails (6.0.1) railties (>= 3.2.16) + json (2.6.3) json-jwt (1.13.0) activesupport (>= 4.2) aes_key_wrap bindata - jwt (2.2.3) - kaminari (1.2.1) + jwt (2.7.0) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) + kaminari-core (= 1.2.2) kaminari-bootstrap (3.0.1) kaminari (>= 0.13.0) rails - kaminari-core (1.2.1) - loofah (2.16.0) + kaminari-core (1.2.2) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.1) + mail (2.8.1) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) + matrix (0.4.2) method_source (1.0.0) - mini_magick (4.11.0) + mini_magick (4.12.0) mini_mime (1.1.2) - mini_portile2 (2.6.1) - minitest (5.15.0) - minitest-reporters (1.4.3) + mini_portile2 (2.8.1) + minitest (5.17.0) + minitest-reporters (1.5.0) ansi builder minitest (>= 5.0) ruby-progressbar - mocha (1.13.0) - msgpack (1.4.2) - multi_json (1.15.0) + mocha (2.0.2) + ruby2_keywords (>= 0.0.5) + msgpack (1.6.0) multi_xml (0.6.0) - multipart-post (2.1.1) nested_form_fields (0.8.4) coffee-rails (>= 3.2.1) jquery-rails rails (>= 3.2.0) - net-ldap (0.17.0) + net-imap (0.3.4) + date + net-protocol + net-ldap (0.17.1) + net-pop (0.1.2) + net-protocol + net-protocol (0.2.1) + timeout + net-smtp (0.3.3) + net-protocol nio4r (2.5.8) - nokogiri (1.12.5) - mini_portile2 (~> 2.6.1) + nokogiri (1.14.1) + mini_portile2 (~> 2.8.0) racc (~> 1.4) - oauth2 (1.4.7) - faraday (>= 0.8, < 2.0) + oauth2 (2.0.9) + faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) - multi_json (~> 1.3) multi_xml (~> 0.5) - rack (>= 1.2, < 3) - omniauth (2.0.4) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + omniauth (2.1.1) hashie (>= 3.4.6) - rack (>= 1.6.2, < 3) + rack (>= 2.2.3) rack-protection - omniauth-keycloak (1.3.0) + omniauth-keycloak (1.4.4) + faraday json-jwt (~> 1.13.0) - omniauth (~> 2.0.4) + omniauth (>= 2.0) omniauth-oauth2 (~> 1.7.1) - omniauth-oauth2 (1.7.1) - oauth2 (~> 1.4) + omniauth-oauth2 (1.7.3) + oauth2 (>= 1.4, < 3) omniauth (>= 1.9, < 3) - omniauth-rails_csrf_protection (1.0.0) + omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) - omniauth-saml (2.0.0) + omniauth-saml (2.1.0) omniauth (~> 2.0) - ruby-saml (~> 1.9) + ruby-saml (~> 1.12) orm_adapter (0.5.0) - paper_trail (12.0.0) - activerecord (>= 5.2) - request_store (~> 1.1) - parallel (1.20.1) - parser (3.0.2.0) + paper_trail (14.0.0) + activerecord (>= 6.0) + request_store (~> 1.4) + parallel (1.22.1) + parser (3.2.0.0) ast (~> 2.4.1) + pastel (0.8.0) + tty-color (~> 0.5) pdf-core (0.9.0) - pg (0.21.0) + pg (1.4.5) prawn (2.4.0) pdf-core (~> 0.9.0) ttfunk (~> 1.7) - prometheus_exporter (0.7.0) + prometheus_exporter (2.0.8) webrick protective (0.2.0) activerecord - pry (0.13.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) - pry-doc (1.1.0) + pry (>= 0.13, < 0.15) + pry-doc (1.4.0) pry (~> 0.11) yard (~> 0.9.11) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (4.0.6) - puma (5.6.4) + psych (3.3.4) + public_suffix (5.0.1) + puma (6.0.2) nio4r (~> 2.0) - racc (1.6.0) - rack (2.2.3) - rack-protection (2.1.0) + raabro (1.4.0) + racc (1.6.2) + rack (2.2.6.2) + rack-protection (3.0.5) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.7) - actioncable (= 5.2.7) - actionmailer (= 5.2.7) - actionpack (= 5.2.7) - actionview (= 5.2.7) - activejob (= 5.2.7) - activemodel (= 5.2.7) - activerecord (= 5.2.7) - activestorage (= 5.2.7) - activesupport (= 5.2.7) + rack-test (2.0.2) + 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 (= 5.2.7) + railties (= 6.0.6.1) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -409,77 +438,81 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-erd (1.6.1) + rails-erd (1.7.2) activerecord (>= 4.2) activesupport (>= 4.2) choice (~> 0.2.0) ruby-graphviz (~> 1.2) - rails-html-sanitizer (1.4.2) - loofah (~> 2.3) - rails-i18n (5.1.3) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) + rails-i18n (7.0.6) i18n (>= 0.7, < 2) - railties (>= 5.0, < 6) - rails_autolink (1.1.6) + railties (>= 6.0.0, < 8) + rails_autolink (1.1.7) rails (> 3.1) - railties (5.2.7) - actionpack (= 5.2.7) - activesupport (= 5.2.7) + railties (6.0.6.1) + actionpack (= 6.0.6.1) + activesupport (= 6.0.6.1) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rainbow (3.0.0) + thor (>= 0.20.3, < 2.0) + rainbow (3.1.1) rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) rb-readline (0.5.5) - rbtree3 (0.6.0) - rdoc (6.3.2) - regexp_parser (2.1.1) + rbtree3 (0.7.0) + rdoc (6.3.3) + regexp_parser (2.6.2) request_profiler (0.0.4) ruby-prof - request_store (1.5.0) + request_store (1.5.1) rack (>= 1.4) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + responders (3.1.0) + actionpack (>= 5.2) + railties (>= 5.2) rexml (3.2.5) - rqrcode (2.0.0) + rqrcode (2.1.2) chunky_png (~> 1.0) rqrcode_core (~> 1.0) - rqrcode_core (1.1.0) - rswag-ui (2.4.0) - actionpack (>= 3.1, < 7.0) - railties (>= 3.1, < 7.0) - rubocop (1.18.3) + rqrcode_core (1.2.0) + rswag-ui (2.8.0) + actionpack (>= 3.1, < 7.1) + railties (>= 3.1, < 7.1) + rubocop (1.44.1) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.7.0, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.24.1, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.7.0) - parser (>= 3.0.1.1) - rubocop-checkstyle_formatter (0.4.0) - rubocop (>= 0.35.1) - rubocop-minitest (0.14.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.24.1) + parser (>= 3.1.1.0) + rubocop-checkstyle_formatter (0.6.0) + rubocop (>= 1.14.0) + rubocop-minitest (0.27.0) rubocop (>= 0.90, < 2.0) - rubocop-performance (1.11.4) + rubocop-performance (1.16.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-rails (2.11.3) + rubocop-rails (2.17.4) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.7.0, < 2.0) + rubocop (>= 1.33.0, < 2.0) ruby-graphviz (1.2.5) rexml - ruby-prof (1.4.3) + ruby-prof (1.4.5) ruby-progressbar (1.11.0) - ruby-saml (1.12.2) - nokogiri (>= 1.10.5) + ruby-saml (1.15.0) + nokogiri (>= 1.13.10) rexml ruby-vips (2.1.4) ffi (~> 1.12) - ruby2_keywords (0.0.4) + ruby2_keywords (0.0.5) rubyzip (2.3.2) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) @@ -491,83 +524,91 @@ GEM sprockets (> 3.0) sprockets-rails tilt - sdoc (2.2.0) + sdoc (2.6.0) rdoc (>= 5.0) seed-fu (2.3.9) activerecord (>= 3.1) activesupport (>= 3.1) selectize-rails (0.12.6) - selenium-webdriver (3.142.7) - childprocess (>= 0.5, < 4.0) - rubyzip (>= 1.2.2) + selenium-webdriver (4.8.0) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) sentry-raven (3.1.2) faraday (>= 1.0) - simplecov (0.21.2) + simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) - simplecov_json_formatter (0.1.3) + simplecov_json_formatter (0.1.4) simpleidn (0.2.1) unf (~> 0.1.4) - sixarm_ruby_unaccent (1.2.0) - sort_alphabetical (1.1.0) - unicode_utils (>= 1.2.2) - spring (2.1.1) - sprockets (4.0.3) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) + spring (4.1.1) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) swagger-blocks (3.0.0) sysexits (1.2.0) - temple (0.8.2) + temple (0.10.0) thor (1.2.1) thread_safe (0.3.6) - tilt (2.0.10) - timeliness (0.4.4) + tilt (2.0.11) + timeliness (0.4.5) + timeout (0.3.1) ttfunk (1.7.0) + tty-color (0.6.0) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.9) + tzinfo (1.2.11) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) + unaccent (0.4.0) unf (0.1.4) unf_ext - unf_ext (0.0.8.1) - unicode-display_width (2.0.0) - unicode_utils (1.4.0) - uniform_notifier (1.14.2) - validates_by_schema (0.4.0) + unf_ext (0.0.8.2) + unicode-display_width (2.4.2) + uniform_notifier (1.16.0) + validates_by_schema (0.5.0) activerecord (>= 5.0.0) - validates_timeliness (5.0.0) + validates_timeliness (6.0.1) + activemodel (>= 6.0.0, < 7) timeliness (>= 0.3.10, < 1) + version_gem (1.1.1) warden (1.2.9) rack (>= 2.0.9) - web-console (3.7.0) - actionview (>= 5.0) - activemodel (>= 5.0) + web-console (4.2.0) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) bindex (>= 0.4.0) - railties (>= 5.0) - webdrivers (4.6.0) + railties (>= 6.0.0) + webdrivers (5.2.0) nokogiri (~> 1.6) rubyzip (>= 1.3.0) - selenium-webdriver (>= 3.0, < 4.0) - webmock (3.13.0) - addressable (>= 2.3.6) + selenium-webdriver (~> 4.0) + webmock (3.18.1) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webrick (1.7.0) + websocket (1.2.9) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.26) + yard (0.9.28) + webrick (~> 1.7.0) + zeitwerk (2.6.6) PLATFORMS ruby @@ -615,6 +656,7 @@ DEPENDENCIES jquery-ui-rails kaminari kaminari-bootstrap + listen (~> 3.8) minitest-reporters mocha nested_form_fields @@ -626,15 +668,16 @@ DEPENDENCIES omniauth-rails_csrf_protection omniauth-saml paper_trail - pg (~> 0.21.0) + pg prawn prometheus_exporter protective pry-byebug pry-doc pry-rails + psych (~> 3.0) puma - rails (~> 5.2.x) + rails (~> 6.0.6.1) rails-controller-testing rails-erd rails-i18n @@ -667,4 +710,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.3.9 + 2.4.6 diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index de2ce2ae2..25afb2d51 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -23,7 +23,7 @@ #= require waypoints/shortcuts/sticky #= require waypoints/shortcuts/inview #= require modernizr-custom -#= require Chart.bundle.min +#= require Chart.min #= require chartjs-plugin-annotation.min #= require_self #= require_tree ./modules diff --git a/config/application.rb b/config/application.rb index 50466d844..70d9a0a41 100644 --- a/config/application.rb +++ b/config/application.rb @@ -60,7 +60,7 @@ class Application < Rails::Application memcached_host = ENV['RAILS_MEMCACHED_HOST'] || 'localhost' memcached_port = ENV['RAILS_MEMCACHED_PORT'] || '11211' - config.cache_store = :dalli_store, "#{memcached_host}:#{memcached_port}" + config.cache_store = :mem_cache_store, "#{memcached_host}:#{memcached_port}" config.middleware.insert_before Rack::ETag, Rack::Deflater diff --git a/config/environments/development.rb b/config/environments/development.rb index d60823a3a..ca2e3b21d 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -97,25 +97,25 @@ Bullet.add_footer = false Bullet.stacktrace_includes = [] - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Ordertime", association: :employee - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Ordertime", association: :absence - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Absencetime", association: :work_item - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Planning", association: :work_item - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Planning", association: :employee - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :contacts - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :work_item - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :kind - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :department - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :status - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :responsible - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :targets - Bullet.add_whitelist type: :unused_eager_loading, class_name: "Order", association: :order_uncertainties - - Bullet.add_whitelist type: :n_plus_one_query, class_name: "Order", association: :order_team_members - Bullet.add_whitelist type: :n_plus_one_query, class_name: "Order", association: :team_members - Bullet.add_whitelist type: :n_plus_one_query, class_name: "Order", association: :order_contacts - Bullet.add_whitelist type: :n_plus_one_query, class_name: "WorkItem", association: :parent - Bullet.add_whitelist type: :n_plus_one_query, class_name: "BillingAddress", association: :client - Bullet.add_whitelist type: :n_plus_one_query, class_name: "BillingAddress", association: :contact + Bullet.add_safelist type: :unused_eager_loading, class_name: "Ordertime", association: :employee + Bullet.add_safelist type: :unused_eager_loading, class_name: "Ordertime", association: :absence + Bullet.add_safelist type: :unused_eager_loading, class_name: "Absencetime", association: :work_item + Bullet.add_safelist type: :unused_eager_loading, class_name: "Planning", association: :work_item + Bullet.add_safelist type: :unused_eager_loading, class_name: "Planning", association: :employee + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :contacts + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :work_item + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :kind + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :department + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :status + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :responsible + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :targets + Bullet.add_safelist type: :unused_eager_loading, class_name: "Order", association: :order_uncertainties + + Bullet.add_safelist type: :n_plus_one_query, class_name: "Order", association: :order_team_members + Bullet.add_safelist type: :n_plus_one_query, class_name: "Order", association: :team_members + Bullet.add_safelist type: :n_plus_one_query, class_name: "Order", association: :order_contacts + Bullet.add_safelist type: :n_plus_one_query, class_name: "WorkItem", association: :parent + Bullet.add_safelist type: :n_plus_one_query, class_name: "BillingAddress", association: :client + Bullet.add_safelist type: :n_plus_one_query, class_name: "BillingAddress", association: :contact end end diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb index 4fff26101..c4ea70687 100644 --- a/config/initializers/session_store.rb +++ b/config/initializers/session_store.rb @@ -1,27 +1,34 @@ # Be sure to restart your server when you modify this file. -def dalli_reachable? - Rails.cache.dalli.stats.values.any? +secure_cookies = !(Rails.env.development? || Rails.env.test?) +Rails.application.config.session_store( + ActionDispatch::Session::CacheStore, + expire_after: 12.hours, + same_site: :lax, + secure: secure_cookies +) + +def cache_reachable? + Rails.cache.stats.values.any? end def memcache_configured? if Rails.env.production? ENV['RAILS_MEMCACHED_HOST'].present? - elsif Rails.env.development? - true else - false + Rails.env.development? end end -secure_cookies = !(Rails.env.development? || Rails.env.test?) - -Rails.application.config.session_store ActionDispatch::Session::CacheStore, - expire_after: 12.hours, - same_site: :lax, - secure: secure_cookies +def skip_memcache_check + ENV['SKIP_MEMCACHE_CHECK'].present? +end -# We expect memcache to work in production. Prevents an error with the rails console on OpenShift -if memcache_configured? && !Rails.env.production? && !dalli_reachable? - fail "As CSRF tokens are read from cache, we require a memcache instance to start" +# We expect memcache to work in production. +# Prevents an error with the rails console on OpenShift +if !skip_memcache_check && + memcache_configured? && + !Rails.env.production? && + !cache_reachable? + raise 'As CSRF tokens are read from cache, we require a memcache instance to start' end From 2906895435910eb29ff5a1683fa23bce7d2626b3 Mon Sep 17 00:00:00 2001 From: Thomas Burkhalter Date: Mon, 6 Feb 2023 23:45:36 +0100 Subject: [PATCH 002/113] WIP: Fix javascript --- Gemfile | 3 +- app/assets/config/manifest.js | 20 + app/assets/javascripts/application.js.coffee | 23 +- .../modules/checkbox/toggler.js.coffee | 3 - app/controllers/api/jsonapi_controller.rb | 2 +- app/controllers/dry_crud/sortable.rb | 2 +- app/controllers/employees_controller.rb | 2 +- app/domain/evaluations/clients_eval.rb | 2 +- app/domain/evaluations/evaluation.rb | 14 +- app/domain/evaluations/sub_work_items_eval.rb | 2 +- app/domain/evaluations/work_items_eval.rb | 2 +- app/domain/order/controlling.rb | 4 +- app/domain/presenters/log_presenter.rb | 2 +- app/domain/reports/revenue/csv.rb | 4 +- .../reports/role_distribution_report.rb | 2 +- app/helpers/expenses_helper.rb | 2 +- app/helpers/i18n_helper.rb | 6 +- app/models/employee.rb | 2 +- app/models/order_chance.rb | 2 +- app/models/order_risk.rb | 2 +- app/models/order_uncertainty.rb | 2 +- app/models/working_condition.rb | 4 +- .../evaluator/_employee_absences.html.haml | 2 +- app/views/plannings/orders/update.js.haml | 2 +- bin/setup | 15 +- config/application.rb | 4 +- config/cable.yml | 2 +- config/environment.rb | 3 - config/environments/development.rb | 48 +- config/environments/production.rb | 86 +- config/environments/test.rb | 20 +- config/initializers/assets.rb | 7 +- .../initializers/content_security_policy.rb | 5 + .../new_framework_defaults_6_0.rb | 45 + config/locales/en.yml | 5 +- config/puma.rb | 12 +- config/routes.rb | 6 +- ..._attachments_for_blob_id.active_storage.rb | 10 + db/schema.rb | 12 +- node_modules/.yarn-integrity | 12 + ...fest-389d4ce5d8509d6d04d0b775519d90f1.json | 1 + ...1069ec1dff319afc0f8c0ba8ba84406e28d3ba.gif | Bin 0 -> 673 bytes ...289128fac47df4ce07ddc3bcc37059e5909dc34.js | 2452 ++ ...128fac47df4ce07ddc3bcc37059e5909dc34.js.gz | Bin 0 -> 15689 bytes ...36d0909a5ea9d39952bb0c8422c6a1fac09a204.js | 25673 ++++++++++++++++ ...0909a5ea9d39952bb0c8422c6a1fac09a204.js.gz | Bin 0 -> 268654 bytes ...e31830cd84b6fe6115a594ba8d06b2866c3d19.css | 16052 ++++++++++ ...830cd84b6fe6115a594ba8d06b2866c3d19.css.gz | Bin 0 -> 54822 bytes ...def6d553c805ce3784542f477ed63499287.coffee | 127 + ...6d553c805ce3784542f477ed63499287.coffee.gz | Bin 0 -> 1471 bytes ...7a8a20270c336948a8668df5cb89a8827299b.woff | Bin 0 -> 23424 bytes ...4990e4bfb6d2cfb00ca563ad4b553c240ddc33.eot | Bin 0 -> 20127 bytes ...0e4bfb6d2cfb00ca563ad4b553c240ddc33.eot.gz | Bin 0 -> 20056 bytes ...601061a32a46a9b9afd2dc7f457436f5f15f6e.svg | 288 + ...061a32a46a9b9afd2dc7f457436f5f15f6e.svg.gz | Bin 0 -> 26508 bytes ...2cea53642644b3a73f91c5a4ab46859af772.woff2 | Bin 0 -> 18028 bytes ...84e85ad14d6c107eb1b0ad60b542daf01ee1f0.ttf | Bin 0 -> 45404 bytes ...85ad14d6c107eb1b0ad60b542daf01ee1f0.ttf.gz | Bin 0 -> 23360 bytes ...15b3d2cc4a936b1182b1ba102ea9992d9c561c.gif | Bin 0 -> 127 bytes ...c0475cd5e7503242cd6adb1c34f5957538b202.png | Bin 0 -> 150 bytes ...ef5f8fc77693ae7c8c169788eda089c84d4441.svg | 12 + ...f8fc77693ae7c8c169788eda089c84d4441.svg.gz | Bin 0 -> 473 bytes ...b6c56ec5510e3b48a36d08e8814ba1693e2ddb.svg | 12 + ...56ec5510e3b48a36d08e8814ba1693e2ddb.svg.gz | Bin 0 -> 473 bytes ...461939b5962d6545f8760011508e5e498aec20.svg | 12 + ...939b5962d6545f8760011508e5e498aec20.svg.gz | Bin 0 -> 471 bytes ...f38ad9cffe3b61fe1c0a035a8d113073327c96.png | Bin 0 -> 490 bytes ...4f3c8c3f2ae8eb94c59d260ab4f107fc8f3f31.png | Bin 0 -> 1121 bytes ...9952c90b361a3f685804be08a5fa2ee6d6198b.png | Bin 0 -> 3756 bytes ...231f7e6edd10de024da40c190f9e0706c70276.png | Bin 0 -> 3756 bytes ...b638d08b96a568bfb173f0dce2c9eee4a441b3.png | Bin 0 -> 3756 bytes ...57884b418c8b3361019647559c835996ddaedb.png | Bin 0 -> 3756 bytes ...1c0b3e09d13a2f4ba4ebd638595bbad9d21c2d.png | Bin 0 -> 3756 bytes ...9b5af8d8dc60b91bfb414b4ca82779f7f9ffb6.png | Bin 0 -> 3756 bytes ...c1a8939ccc8db5f92ec6a00351b5d89e92c426.svg | 15 + ...8939ccc8db5f92ec6a00351b5d89e92c426.svg.gz | Bin 0 -> 497 bytes ...dd2b323ec7bb823c37fa5249cd5b6004bdfce6.gif | Bin 0 -> 94 bytes ...92ec813ad3abc1bb688bf3daa9eb134b0186f80.js | 23244 ++++++++++++++ ...c813ad3abc1bb688bf3daa9eb134b0186f80.js.gz | Bin 0 -> 253067 bytes ...b3c1361c0583026cdf35d6a2921bccaea835331.js | 3 + ...1361c0583026cdf35d6a2921bccaea835331.js.gz | Bin 0 -> 23 bytes ...0a2609abbae2654ab85b1f65fdfb55a76fe173.css | 111 + ...609abbae2654ab85b1f65fdfb55a76fe173.css.gz | Bin 0 -> 583 bytes ...3abc3dbea21463a0a0a1ee40bdf9a7fe99e34f.css | 9040 ++++++ ...c3dbea21463a0a0a1ee40bdf9a7fe99e34f.css.gz | Bin 0 -> 28064 bytes ...bc0b7dd5f348a427b3c12120fe15f61b7903cc.eot | Bin 0 -> 6364 bytes ...b7dd5f348a427b3c12120fe15f61b7903cc.eot.gz | Bin 0 -> 3969 bytes ...1b19283766200e3997f7a474d8d9692c1dddd.woff | Bin 0 -> 4504 bytes ...ba7c0de75acda38363a42c5831513a9a2b3d86.svg | 38 + ...c0de75acda38363a42c5831513a9a2b3d86.svg.gz | Bin 0 -> 4885 bytes ...ff59463333c45a93e17f5dda18854cc44076f2.ttf | Bin 0 -> 6188 bytes ...9463333c45a93e17f5dda18854cc44076f2.ttf.gz | Bin 0 -> 3923 bytes ...ad2df1ffbabb6c44489acc8b54f984d88d1854.gif | Bin 0 -> 43 bytes ...290de0a228ff1f074e64fda276e18c53b6885a.png | Bin 0 -> 180 bytes ...64ac59dc3e8258d1dc7d0d7fda47239669cad9.png | Bin 0 -> 107 bytes ...6c72dc7277107d3df71dc3baf4f77312473ae9.png | Bin 0 -> 4369 bytes ...916428fcad59d785b5f505af8cd3c8fbb43cb2.png | Bin 0 -> 4369 bytes ...133795033ae7d4e2b929b2daac08112ac1c3bd.png | Bin 0 -> 4369 bytes ...6a1abfecc8201d7adf92c594e386f8f10cf987.png | Bin 0 -> 4369 bytes ...d848bf023da59a7985bd51a451d47ee2cc434e.png | Bin 0 -> 8884 bytes ...3bcbe8d6d6bd4fe6011087a0c1e035bda32148.gif | Bin 0 -> 110 bytes .../absencetimes_controller_test.rb | 2 +- .../api/v1/employees_controller_test.rb | 8 +- .../employees/log_controller_test.rb | 10 +- .../controllers/ordertimes_controller_test.rb | 4 +- test/integration/invoice_form_test.rb | 2 + test/models/work_item_test.rb | 4 +- test/support/small_invoice_test_helper.rb | 4 +- test/tarantula/tarantula_test.rb_ | 2 +- test/test_helper.rb | 42 +- .../stylesheets/jquery-ui-1.10.0.custom.scss | 1696 +- 111 files changed, 78675 insertions(+), 582 deletions(-) create mode 100644 config/initializers/new_framework_defaults_6_0.rb create mode 100644 db/migrate/20230206101600_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb create mode 100644 node_modules/.yarn-integrity create mode 100644 public/assets/.sprockets-manifest-389d4ce5d8509d6d04d0b775519d90f1.json create mode 100644 public/assets/ajax-loader-0e899a4e4cea34f16947494fb21069ec1dff319afc0f8c0ba8ba84406e28d3ba.gif create mode 100644 public/assets/application-795779a25521261357be45bad289128fac47df4ce07ddc3bcc37059e5909dc34.js create mode 100644 public/assets/application-795779a25521261357be45bad289128fac47df4ce07ddc3bcc37059e5909dc34.js.gz create mode 100644 public/assets/application-b13e430fa55310b01e7be687036d0909a5ea9d39952bb0c8422c6a1fac09a204.js create mode 100644 public/assets/application-b13e430fa55310b01e7be687036d0909a5ea9d39952bb0c8422c6a1fac09a204.js.gz create mode 100644 public/assets/application-bd0c129a2e26937339c4fd5440e31830cd84b6fe6115a594ba8d06b2866c3d19.css create mode 100644 public/assets/application-bd0c129a2e26937339c4fd5440e31830cd84b6fe6115a594ba8d06b2866c3d19.css.gz create mode 100644 public/assets/application-d8f81a2184b7e0302aba9ec8b71a8def6d553c805ce3784542f477ed63499287.coffee create mode 100644 public/assets/application-d8f81a2184b7e0302aba9ec8b71a8def6d553c805ce3784542f477ed63499287.coffee.gz create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-0703369a358a012c0011843ae337a8a20270c336948a8668df5cb89a8827299b.woff create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-0805fb1fe24235f70a639f67514990e4bfb6d2cfb00ca563ad4b553c240ddc33.eot create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-0805fb1fe24235f70a639f67514990e4bfb6d2cfb00ca563ad4b553c240ddc33.eot.gz create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-22d0c88a49d7d0ebe45627143a601061a32a46a9b9afd2dc7f457436f5f15f6e.svg create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-22d0c88a49d7d0ebe45627143a601061a32a46a9b9afd2dc7f457436f5f15f6e.svg.gz create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-403acfcf0cbaebd1c28b404eec442cea53642644b3a73f91c5a4ab46859af772.woff2 create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-7c9caa5f4e16169b0129fdf93c84e85ad14d6c107eb1b0ad60b542daf01ee1f0.ttf create mode 100644 public/assets/bootstrap/glyphicons-halflings-regular-7c9caa5f4e16169b0129fdf93c84e85ad14d6c107eb1b0ad60b542daf01ee1f0.ttf.gz create mode 100644 public/assets/calendar-48d011f3b73eb282dc94666ed015b3d2cc4a936b1182b1ba102ea9992d9c561c.gif create mode 100644 public/assets/calendar-61bcc4c23aa409db2f353d136ec0475cd5e7503242cd6adb1c34f5957538b202.png create mode 100644 public/assets/day-marker-active-d99b32b60616df674b040de1ceef5f8fc77693ae7c8c169788eda089c84d4441.svg create mode 100644 public/assets/day-marker-active-d99b32b60616df674b040de1ceef5f8fc77693ae7c8c169788eda089c84d4441.svg.gz create mode 100644 public/assets/day-marker-holiday-8a281e6680508108fe59cf1c01b6c56ec5510e3b48a36d08e8814ba1693e2ddb.svg create mode 100644 public/assets/day-marker-holiday-8a281e6680508108fe59cf1c01b6c56ec5510e3b48a36d08e8814ba1693e2ddb.svg.gz create mode 100644 public/assets/day-marker-missing-44a616885a5627c4c6af6ba793461939b5962d6545f8760011508e5e498aec20.svg create mode 100644 public/assets/day-marker-missing-44a616885a5627c4c6af6ba793461939b5962d6545f8760011508e5e498aec20.svg.gz create mode 100644 public/assets/favicon-e7bb1f6b17d7f9dcab65221e7df38ad9cffe3b61fe1c0a035a8d113073327c96.png create mode 100644 public/assets/highrise-cdc00f1faa88687f254449a5b54f3c8c3f2ae8eb94c59d260ab4f107fc8f3f31.png create mode 100644 public/assets/jquery-ui/ui-icons_444444_256x240-f6d8c091e81dfb911fc0815e7c9952c90b361a3f685804be08a5fa2ee6d6198b.png create mode 100644 public/assets/jquery-ui/ui-icons_555555_256x240-c23f23416a84a359723ffe28c6231f7e6edd10de024da40c190f9e0706c70276.png create mode 100644 public/assets/jquery-ui/ui-icons_777620_256x240-0a3bb6e0c499ea585572cbda26b638d08b96a568bfb173f0dce2c9eee4a441b3.png create mode 100644 public/assets/jquery-ui/ui-icons_777777_256x240-ea4f5d5317b31eaaaf01e3db3357884b418c8b3361019647559c835996ddaedb.png create mode 100644 public/assets/jquery-ui/ui-icons_cc0000_256x240-c7cf3a680d1476856186d49a361c0b3e09d13a2f4ba4ebd638595bbad9d21c2d.png create mode 100644 public/assets/jquery-ui/ui-icons_ffffff_256x240-24221a00d39ccfd2da654907e99b5af8d8dc60b91bfb414b4ca82779f7f9ffb6.png create mode 100644 public/assets/logo-c9792e60e4d11c6511c7d6549ec1a8939ccc8db5f92ec6a00351b5d89e92c426.svg create mode 100644 public/assets/logo-c9792e60e4d11c6511c7d6549ec1a8939ccc8db5f92ec6a00351b5d89e92c426.svg.gz create mode 100644 public/assets/lupe-c774b159265725d0245e0cb4f5dd2b323ec7bb823c37fa5249cd5b6004bdfce6.gif create mode 100644 public/assets/manifest-6ad05901a908774949f62ed6b92ec813ad3abc1bb688bf3daa9eb134b0186f80.js create mode 100644 public/assets/manifest-6ad05901a908774949f62ed6b92ec813ad3abc1bb688bf3daa9eb134b0186f80.js.gz create mode 100644 public/assets/manifest-dad05bf766af0fe3d79dd746db3c1361c0583026cdf35d6a2921bccaea835331.js create mode 100644 public/assets/manifest-dad05bf766af0fe3d79dd746db3c1361c0583026cdf35d6a2921bccaea835331.js.gz create mode 100644 public/assets/phone-559c5ed1cdc3ac647348a0dd390a2609abbae2654ab85b1f65fdfb55a76fe173.css create mode 100644 public/assets/phone-559c5ed1cdc3ac647348a0dd390a2609abbae2654ab85b1f65fdfb55a76fe173.css.gz create mode 100644 public/assets/print-23f9a8c22460910734dee3bd913abc3dbea21463a0a0a1ee40bdf9a7fe99e34f.css create mode 100644 public/assets/print-23f9a8c22460910734dee3bd913abc3dbea21463a0a0a1ee40bdf9a7fe99e34f.css.gz create mode 100644 public/assets/puzzletime-2de41030a7af76acbd1f6ccb10bc0b7dd5f348a427b3c12120fe15f61b7903cc.eot create mode 100644 public/assets/puzzletime-2de41030a7af76acbd1f6ccb10bc0b7dd5f348a427b3c12120fe15f61b7903cc.eot.gz create mode 100644 public/assets/puzzletime-61a62a54f3b770abbbdc71254ea1b19283766200e3997f7a474d8d9692c1dddd.woff create mode 100644 public/assets/puzzletime-d547a1d48c348caf9d81ddc08eba7c0de75acda38363a42c5831513a9a2b3d86.svg create mode 100644 public/assets/puzzletime-d547a1d48c348caf9d81ddc08eba7c0de75acda38363a42c5831513a9a2b3d86.svg.gz create mode 100644 public/assets/puzzletime-e2ba8ea4540e897e42ea9182e7ff59463333c45a93e17f5dda18854cc44076f2.ttf create mode 100644 public/assets/puzzletime-e2ba8ea4540e897e42ea9182e7ff59463333c45a93e17f5dda18854cc44076f2.ttf.gz create mode 100644 public/assets/space-9a89381c23d3b40e675948d825ad2df1ffbabb6c44489acc8b54f984d88d1854.gif create mode 100644 public/assets/ui-bg_flat_0_aaaaaa_40x100-aa167a04c6c4e82e1fbe80ec8a290de0a228ff1f074e64fda276e18c53b6885a.png create mode 100644 public/assets/ui-bg_glass_75_ffffff_1x400-e6dec50d602c5c8829427ecd8164ac59dc3e8258d1dc7d0d7fda47239669cad9.png create mode 100644 public/assets/ui-icons_222222_256x240-3305696b28a8757b9b73e678cc6c72dc7277107d3df71dc3baf4f77312473ae9.png create mode 100644 public/assets/ui-icons_2e83ff_256x240-71ec8b5da0ab851bbef886db2d916428fcad59d785b5f505af8cd3c8fbb43cb2.png create mode 100644 public/assets/ui-icons_454545_256x240-989d471b55541d188455465047133795033ae7d4e2b929b2daac08112ac1c3bd.png create mode 100644 public/assets/ui-icons_888888_256x240-42393eae298d8afe2c78cd1caf6a1abfecc8201d7adf92c594e386f8f10cf987.png create mode 100644 public/assets/ui-icons_f6cf3b_256x240-fa649f3fa8d7d4f9343a1d0714d848bf023da59a7985bd51a451d47ee2cc434e.png create mode 100644 public/assets/whitebox-aa4dc20192f264f3b20f45ef8c3bcbe8d6d6bd4fe6011087a0c1e035bda32148.gif diff --git a/Gemfile b/Gemfile index 376f19572..cb42625ae 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' git_source(:github) { |name| "https://github.com/#{name}.git" } - gem 'rails', '~> 6.0.6.1' +gem 'rails', '~> 6.0.6.1' gem 'pg' #, '~> 0.21.0' gem 'activerecord-nulldb-adapter' @@ -79,6 +79,7 @@ group :development, :test do gem 'pry-rails' gem 'rb-readline' gem 'request_profiler' + gem 'pry-byebug' end group :development do diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index b625b75ea..02374e861 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -1,3 +1,23 @@ //= link_tree ../images +//= require jquery3 +//= require jquery_ujs +//= require jquery-ui/widgets/datepicker +//= require jquery-ui-datepicker-i18n +//= require jquery-ui/widgets/autocomplete +//= require jquery-ui/widgets/selectable +//= require selectize +//= require bootstrap/modal +//= require bootstrap/tooltip +//= require bootstrap/button +//= require bootstrap/alert +//= require bootstrap/collapse +//= require waypoints/jquery.waypoints +//= require waypoints/shortcuts/sticky +//= require waypoints/shortcuts/inview +//= require modernizr-custom +//= require Chart.min +//= require chartjs-plugin-annotation.min +//= link application.js.coffee +//= require turbolinks //= link application.js //= link application.css diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 25afb2d51..08db30aaa 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -7,27 +7,9 @@ # Place your application-specific JavaScript functions and classes here # This file is automatically included by javascript_include_tag :defaults # -#= require jquery3 -#= require jquery_ujs -#= require jquery-ui/widgets/datepicker -#= require jquery-ui-datepicker-i18n -#= require jquery-ui/widgets/autocomplete -#= require jquery-ui/widgets/selectable -#= require selectize -#= require bootstrap/modal -#= require bootstrap/tooltip -#= require bootstrap/button -#= require bootstrap/alert -#= require bootstrap/collapse -#= require waypoints/jquery.waypoints -#= require waypoints/shortcuts/sticky -#= require waypoints/shortcuts/inview -#= require modernizr-custom -#= require Chart.min -#= require chartjs-plugin-annotation.min #= require_self #= require_tree ./modules -# after self to disable links +#after self to disable links #= require nested_form_fields #= require modal_create #= require datepicker @@ -45,9 +27,8 @@ #= require expenses #= require expense_reviews #= require meal_compensations -#= require turbolinks - +debugger app = window.App ||= {} if typeof String.prototype.endsWith isnt 'function' diff --git a/app/assets/javascripts/modules/checkbox/toggler.js.coffee b/app/assets/javascripts/modules/checkbox/toggler.js.coffee index 80722be02..d06083723 100644 --- a/app/assets/javascripts/modules/checkbox/toggler.js.coffee +++ b/app/assets/javascripts/modules/checkbox/toggler.js.coffee @@ -24,6 +24,3 @@ class app.checkbox.Toggler selector = '[data-' + @data + ']' $(document).on('click', selector, (event) -> self.toggleChecked(this)) $(document).on('turbolinks:load', -> $(selector).each((i, e) -> self.toggleChecked(e))) - - - diff --git a/app/controllers/api/jsonapi_controller.rb b/app/controllers/api/jsonapi_controller.rb index 170b314fc..a09095532 100644 --- a/app/controllers/api/jsonapi_controller.rb +++ b/app/controllers/api/jsonapi_controller.rb @@ -82,7 +82,7 @@ def render_error(title, detail: nil, code: :error, status: 422, **opts) def set_pagination_headers response.headers.merge!( 'Pagination-Total-Count' => list_entries.total_count, - 'Pagination-Per-Page' => list_entries.current_per_page, + 'Pagination-Per-Page' => list_entries.limit_value, 'Pagination-Current-Page' => list_entries.current_page, 'Pagination-Total-Pages' => list_entries.total_pages ) diff --git a/app/controllers/dry_crud/sortable.rb b/app/controllers/dry_crud/sortable.rb index 719087441..6a3438bde 100644 --- a/app/controllers/dry_crud/sortable.rb +++ b/app/controllers/dry_crud/sortable.rb @@ -42,7 +42,7 @@ def list_entries sortable = sortable?(params[:sort]) if sortable || default_sort clause = [sortable ? sort_expression : nil, default_sort] - super.reorder(clause.compact.join(', ')) + super.reorder(Arel.sql(clause.compact.join(', '))) else super end diff --git a/app/controllers/employees_controller.rb b/app/controllers/employees_controller.rb index 07e946f76..ffca577ed 100644 --- a/app/controllers/employees_controller.rb +++ b/app/controllers/employees_controller.rb @@ -40,7 +40,7 @@ def update_settings @employee = @user attrs = params.require(:employee).permit(:worktimes_commit_reminder, eval_periods: []) attrs[:eval_periods] = [] if attrs[:eval_periods].blank? - if @employee.update_attributes(attrs) + if @employee.update(attrs) flash[:notice] = 'Die Benutzereinstellungen wurden aktualisiert' redirect_to root_path else diff --git a/app/domain/evaluations/clients_eval.rb b/app/domain/evaluations/clients_eval.rb index 85789020b..61dc04389 100644 --- a/app/domain/evaluations/clients_eval.rb +++ b/app/domain/evaluations/clients_eval.rb @@ -4,7 +4,7 @@ # https://github.com/puzzle/puzzletime. class ClientsEval < Evaluation - self.division_column = 'work_items.path_ids[1]' + self.division_column = Arel.sql('work_items.path_ids[1]') self.division_join = :work_item self.sub_evaluation = 'clientworkitems' self.label = 'Kunden' diff --git a/app/domain/evaluations/evaluation.rb b/app/domain/evaluations/evaluation.rb index 9042e0cbb..12943c53f 100644 --- a/app/domain/evaluations/evaluation.rb +++ b/app/domain/evaluations/evaluation.rb @@ -130,7 +130,7 @@ def sum_total_plannings(period = nil) def planning_query(receiver, division = nil) query = receiver.plannings. joins(:work_item). - joins('INNER JOIN accounting_posts ON accounting_posts.work_item_id = ANY (work_items.path_ids)'). + joins(Arel.sql('INNER JOIN accounting_posts ON accounting_posts.work_item_id = ANY (work_items.path_ids)')). definitive query = query.where("? = #{category_ref}", category_id) if division && category_ref query @@ -258,11 +258,11 @@ def query_grouped_time_sums(query, group_by_column) end def hours_and_billable_hours_columns - ['SUM(worktimes.hours) AS sum_hours', - 'SUM(CASE WHEN worktimes.billable = TRUE ' \ + [Arel.sql('SUM(worktimes.hours) AS sum_hours'), + Arel.sql('SUM(CASE WHEN worktimes.billable = TRUE ' \ 'THEN worktimes.hours ' \ 'ELSE 0 END) ' \ - 'AS sum_billable_hours'] + 'AS sum_billable_hours')] end def query_planning_sums(query, period) @@ -289,11 +289,11 @@ def query_grouped_planning_sums(query, period, group_by_column) end def plannings_and_billable_plannings_columns(must_hours) - ["SUM(plannings.percent / 100.0 * #{must_hours.to_f}) AS sum_hours", - 'SUM(CASE WHEN accounting_posts.billable = TRUE ' \ + [Arel.sql("SUM(plannings.percent / 100.0 * #{must_hours.to_f}) AS sum_hours"), + Arel.sql('SUM(CASE WHEN accounting_posts.billable = TRUE ' \ "THEN plannings.percent / 100.0 * #{must_hours.to_f} " \ 'ELSE 0 END) ' \ - 'AS sum_billable_hours'] + 'AS sum_billable_hours')] end def worktime_type diff --git a/app/domain/evaluations/sub_work_items_eval.rb b/app/domain/evaluations/sub_work_items_eval.rb index 4d5aa4525..1c0915ead 100644 --- a/app/domain/evaluations/sub_work_items_eval.rb +++ b/app/domain/evaluations/sub_work_items_eval.rb @@ -28,6 +28,6 @@ def division_label end def division_column - "work_items.path_ids[#{category.path_ids.size + 1}]" + Arel.sql("work_items.path_ids[#{category.path_ids.size + 1}]") end end diff --git a/app/domain/evaluations/work_items_eval.rb b/app/domain/evaluations/work_items_eval.rb index ae2e889f8..2dc906d4a 100644 --- a/app/domain/evaluations/work_items_eval.rb +++ b/app/domain/evaluations/work_items_eval.rb @@ -6,7 +6,7 @@ # abstract class for evaluation with work item divisions class WorkItemsEval < Evaluation self.division_method = :work_items - self.division_column = 'work_items.path_ids[1]' + self.division_column = Arel.sql('work_items.path_ids[1]') self.division_join = :work_item self.label = 'Positionen' self.sub_evaluation = 'workitememployees' diff --git a/app/domain/order/controlling.rb b/app/domain/order/controlling.rb index 4c761e2cf..79e791b8f 100644 --- a/app/domain/order/controlling.rb +++ b/app/domain/order/controlling.rb @@ -37,7 +37,7 @@ def grouped_worktimes load_worktimes .group('week, worktimes.billable') .order('week') - .pluck('DATE_TRUNC(\'week\', work_date) week, worktimes.billable, SUM(hours * offered_rate)') + .pluck(Arel.sql('DATE_TRUNC(\'week\', work_date) week, worktimes.billable, SUM(hours * offered_rate)')) end def grouped_plannings @@ -45,7 +45,7 @@ def grouped_plannings .in_period(Period.with(date, nil)) .group('week, offered_rate, definitive') .order('week') - .pluck('DATE_TRUNC(\'week\', date) week, offered_rate, definitive, SUM(percent)') + .pluck(Arel.sql('DATE_TRUNC(\'week\', date) week, offered_rate, definitive, SUM(percent)')) end def load_worktimes diff --git a/app/domain/presenters/log_presenter.rb b/app/domain/presenters/log_presenter.rb index 16d1d2587..15b46c435 100644 --- a/app/domain/presenters/log_presenter.rb +++ b/app/domain/presenters/log_presenter.rb @@ -68,7 +68,7 @@ def attribute_change(item_type, attr, changes) to = I18n.l(to, format: :month) if to end - I18n.t("version.attribute_change.#{key}", attribute_args(item_type, attr, from, to)) + I18n.t("version.attribute_change.#{key}", **attribute_args(item_type, attr, from, to)) end private diff --git a/app/domain/reports/revenue/csv.rb b/app/domain/reports/revenue/csv.rb index 1cd72bca8..cd248be95 100644 --- a/app/domain/reports/revenue/csv.rb +++ b/app/domain/reports/revenue/csv.rb @@ -132,8 +132,8 @@ def footer_future_months out end - def l(*args) - I18n.l(*args) + def l(...) + I18n.l(...) end def format_number(number, precision = nil) diff --git a/app/domain/reports/role_distribution_report.rb b/app/domain/reports/role_distribution_report.rb index a7985e0a4..98fc2877c 100644 --- a/app/domain/reports/role_distribution_report.rb +++ b/app/domain/reports/role_distribution_report.rb @@ -140,7 +140,7 @@ def category_percents .joins('INNER JOIN employment_roles er ON er.id = ere.employment_role_id') .joins('INNER JOIN employment_role_categories erc ON erc.id = er.employment_role_category_id') .group('employees.id', 'erc.id') - .pluck('employees.id, erc.id, SUM(COALESCE(ere.percent, 0)) AS percent') + .pluck(Arel.sql('employees.id, erc.id, SUM(COALESCE(ere.percent, 0)) AS percent')) .each_with_object({}) do |(employee_id, category_id, percent), o| o[employee_id] ||= {} o[employee_id][category_id] = percent diff --git a/app/helpers/expenses_helper.rb b/app/helpers/expenses_helper.rb index 4c9bb77e5..bab3c9787 100644 --- a/app/helpers/expenses_helper.rb +++ b/app/helpers/expenses_helper.rb @@ -121,7 +121,7 @@ def expenses_order_field(form, **options) def expenses_file_field(form, **options) safe_join( [ - file_field_with_warning(form, options), + file_field_with_warning(form, **options), form.labeled(' ', options) { t('expenses.attachment.hint') } ] ) diff --git a/app/helpers/i18n_helper.rb b/app/helpers/i18n_helper.rb index 47d884136..3301b1f07 100644 --- a/app/helpers/i18n_helper.rb +++ b/app/helpers/i18n_helper.rb @@ -20,7 +20,7 @@ def translate_inheritable(key, variables = {}) partial = defined?(@virtual_path) ? @virtual_path.gsub(%r(.*\/_?), '') : nil defaults = inheritable_translation_defaults(key, partial) variables[:default] ||= defaults - t(defaults.shift, variables) + t(defaults.shift, **variables) end alias ti translate_inheritable @@ -36,9 +36,9 @@ def translate_association(key, assoc = nil, variables = {}) if assoc && assoc.options[:polymorphic].nil? variables[:default] ||= [association_klass_key(assoc, key).to_sym, :"global.associations.#{key}"] - t(association_owner_key(assoc, key), variables) + t(association_owner_key(assoc, key), **variables) else - t("global.associations.#{key}", variables) + t("global.associations.#{key}", **variables) end end diff --git a/app/models/employee.rb b/app/models/employee.rb index e687fdd8c..6423f62ba 100644 --- a/app/models/employee.rb +++ b/app/models/employee.rb @@ -193,7 +193,7 @@ def check_passwd(pwd) end def update_passwd!(pwd) - update_attributes!(passwd: Employee.encode(pwd)) + update!(passwd: Employee.encode(pwd)) end # main work items this employee ever worked on diff --git a/app/models/order_chance.rb b/app/models/order_chance.rb index a64dc02cc..ac66829cd 100644 --- a/app/models/order_chance.rb +++ b/app/models/order_chance.rb @@ -28,7 +28,7 @@ def update_major_order_value def major_order_value order.order_chances .where(type: OrderChance.sti_name) - .pluck('MAX(probability * impact)') + .pluck(Arel.sql('MAX(probability * impact)')) .first end end diff --git a/app/models/order_risk.rb b/app/models/order_risk.rb index c59698a23..9bd73694a 100644 --- a/app/models/order_risk.rb +++ b/app/models/order_risk.rb @@ -27,7 +27,7 @@ def update_major_order_value def major_order_value order.order_risks - .pluck('MAX(probability * impact)') + .pluck(Arel.sql('MAX(probability * impact)')) .first end end diff --git a/app/models/order_uncertainty.rb b/app/models/order_uncertainty.rb index fd4af9ea8..f1a4936f0 100644 --- a/app/models/order_uncertainty.rb +++ b/app/models/order_uncertainty.rb @@ -43,7 +43,7 @@ class OrderUncertainty < ActiveRecord::Base after_save :update_major_order_value after_destroy :update_major_order_value - scope :list, -> { order('probability * impact DESC') } + scope :list, -> { order(Arel.sql('probability * impact DESC')) } class << self def risk(value) diff --git a/app/models/working_condition.rb b/app/models/working_condition.rb index 54355673a..dfcbd953b 100644 --- a/app/models/working_condition.rb +++ b/app/models/working_condition.rb @@ -28,7 +28,7 @@ class WorkingCondition < ActiveRecord::Base delegate :clear_cache, to: :class - scope :list, -> { order('(CASE WHEN valid_from IS NULL THEN 0 ELSE 1 END) DESC, valid_from DESC') } + scope :list, -> { order(Arel.sql('(CASE WHEN valid_from IS NULL THEN 0 ELSE 1 END) DESC, valid_from DESC')) } class << self def todays_value(attr) @@ -78,7 +78,7 @@ def cached # double cache for best performance RequestStore.store[model_name.route_key] ||= Rails.cache.fetch(model_name.route_key) do - order('(CASE WHEN valid_from IS NULL THEN 0 ELSE 1 END), valid_from').collect(&:attributes) + order(Arel.sql('(CASE WHEN valid_from IS NULL THEN 0 ELSE 1 END), valid_from')).collect(&:attributes) end end diff --git a/app/views/evaluator/_employee_absences.html.haml b/app/views/evaluator/_employee_absences.html.haml index f81832c7a..b5221e9c1 100644 --- a/app/views/evaluator/_employee_absences.html.haml +++ b/app/views/evaluator/_employee_absences.html.haml @@ -7,7 +7,7 @@ %section.employee-absences %h4 Absenzen - - evaluation = EmployeeAbsencesEval.new(params[:category_id] || @user.id, search_conditions) + - evaluation = EmployeeAbsencesEval.new(params[:category_id] || @user.id, **search_conditions) = render('category', evaluation: evaluation, times: @periods.collect { |p| evaluation.sum_times_grouped(p) }, diff --git a/app/views/plannings/orders/update.js.haml b/app/views/plannings/orders/update.js.haml index 11262ccf1..f22ddbeee 100644 --- a/app/views/plannings/orders/update.js.haml +++ b/app/views/plannings/orders/update.js.haml @@ -4,7 +4,7 @@ -# https://github.com/puzzle/puzzletime. -= render file: 'plannings/base/update' += render 'plannings/base/update' - @board.included_accounting_posts.each do |post| $('#group_header_times_#{dom_id(post)}').html('#{j(render('accounting_post_total', post: post))}'); \ No newline at end of file diff --git a/bin/setup b/bin/setup index b2293a35a..5853b5ea8 100755 --- a/bin/setup +++ b/bin/setup @@ -1,33 +1,32 @@ #!/usr/bin/env ruby -require 'pathname' require 'fileutils' -include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('..', __dir__) +APP_ROOT = File.expand_path('..', __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end -chdir APP_ROOT do - # This script is a starting point to setup your application. +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. # Add necessary setup steps to this file. puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') - # Install JavaScript dependencies if using Yarn + # Install JavaScript dependencies # system('bin/yarn') # puts "\n== Copying sample files ==" # unless File.exist?('config/database.yml') - # cp 'config/database.yml.sample', 'config/database.yml' + # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system! 'bin/rails db:setup' + system! 'bin/rails db:prepare' puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' diff --git a/config/application.rb b/config/application.rb index 70d9a0a41..cd6b7ebe4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,9 +1,9 @@ -# Copyright (c) 2006-2017, Puzzle ITC GmbH. This file is part of +# Copyright (c) 2006-2023, Puzzle ITC GmbH. This file is part of # PuzzleTime and licensed under the Affero General Public License version 3 # or later. See the COPYING file at the top-level directory or at # https://github.com/puzzle/puzzletime. -require File.expand_path('../boot', __FILE__) +require_relative 'boot' require 'rails/all' diff --git a/config/cable.yml b/config/cable.yml index 4400e072b..60726b3cc 100644 --- a/config/cable.yml +++ b/config/cable.yml @@ -2,7 +2,7 @@ development: adapter: async test: - adapter: async + adapter: test production: adapter: redis diff --git a/config/environment.rb b/config/environment.rb index e76ccaf86..426333bb4 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,8 +1,5 @@ # Load the Rails application. require_relative 'application' -# FIXME: ignoring deprecation warnings for now. -::ActiveSupport::Deprecation.silenced = true if Rails.env.test? - # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index ca2e3b21d..68ae3acb4 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,4 +1,4 @@ -# Copyright (c) 2006-2017, Puzzle ITC GmbH. This file is part of +# Copyright (c) 2006-2023, Puzzle ITC GmbH. This file is part of # PuzzleTime and licensed under the Affero General Public License version 3 # or later. See the COPYING file at the top-level directory or at # https://github.com/puzzle/puzzletime. @@ -14,13 +14,14 @@ # Do not eager load code on boot. config.eager_load = false - # Show full error reports and disable caching. + # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. # if Rails.root.join('tmp', 'caching-dev.txt').exist? # config.action_controller.perform_caching = true + # config.action_controller.enable_fragment_cache_logging = true # # config.cache_store = :memory_store # config.public_file_server.headers = { @@ -32,7 +33,7 @@ # config.cache_store = :null_store # end - # Store uploaded files on the local file system (see config/storage.yml for options) + # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = ENV.fetch('RAILS_STORAGE_SERVICE', 'local').to_sym # Perform caching as the session is stored there @@ -43,22 +44,6 @@ config.action_mailer.perform_caching = false - # Mail sender - config.action_mailer.delivery_method = (ENV['RAILS_MAIL_DELIVERY_METHOD'].presence || :smtp).to_sym - - if ENV['RAILS_MAIL_DELIVERY_CONFIG'].present? - case config.action_mailer.delivery_method.to_s - when 'smtp' - config.action_mailer.smtp_settings = - YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys - when 'sendmail' - config.action_mailer.sendmail_settings = - YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys - end - else - config.action_mailer.smtp_settings = { :address => '127.0.0.1', :port => 1025 } - end - # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log @@ -73,17 +58,34 @@ # number of complex assets. config.assets.debug = true - config.middleware.insert_before ActionDispatch::Cookies, Rack::RequestProfiler, printer: RubyProf::CallStackPrinter - # Suppress logger output for asset requests. config.assets.quiet = true - # Raises error for missing translations + # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. - # config.file_watcher = ActiveSupport::EventedFileUpdateChecker + config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + config.middleware.insert_before ActionDispatch::Cookies, Rack::RequestProfiler, printer: RubyProf::CallStackPrinter + + # Mail sender + config.action_mailer.delivery_method = (ENV['RAILS_MAIL_DELIVERY_METHOD'].presence || :smtp).to_sym + + if ENV['RAILS_MAIL_DELIVERY_CONFIG'].present? + case config.action_mailer.delivery_method.to_s + when 'smtp' + config.action_mailer.smtp_settings = + YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys + when 'sendmail' + config.action_mailer.sendmail_settings = + YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys + end + else + config.action_mailer.smtp_settings = { :address => '127.0.0.1', :port => 1025 } + end + # Raises error for missing translations # config.action_view.raise_on_missing_translations = true diff --git a/config/environments/production.rb b/config/environments/production.rb index 7b1ef82c9..2c6e60425 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,4 +1,4 @@ -# Copyright (c) 2006-2017, Puzzle ITC GmbH. This file is part of +# Copyright (c) 2006-2023, Puzzle ITC GmbH. This file is part of # PuzzleTime and licensed under the Affero General Public License version 3 # or later. See the COPYING file at the top-level directory or at # https://github.com/puzzle/puzzletime. @@ -28,7 +28,7 @@ # Apache or NGINX already handles this. config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? - # Compress JavaScripts and CSS. + # Compress CSS using a preprocessor. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass @@ -45,66 +45,45 @@ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX config.action_dispatch.x_sendfile_header = ENV['RAILS_X_SENDFILE_HEADER'] || 'X-Sendfile' - # Store uploaded files on the local file system (see config/storage.yml for options) + # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = ENV.fetch('RAILS_STORAGE_SERVICE', 'ocp4_s3').to_sym - # Mount Action Cable outside main process or domain + # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true ssl = %w[true yes 1].include?(ENV['RAILS_HOST_SSL']) config.force_ssl = ssl config.ssl_options = { redirect: { exclude: ->(request) { request.path =~ /health|readiness/ } } } - # 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 = [:request_id] - - # Use a different logger for distributed setups. - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) + config.log_tags = [ :request_id ] # Use a different cache store in production. # 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" - - # 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 ) - - # Use a real queuing backend for Active Job (and separate queues per environment) + # 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 = "puzzletime_#{Rails.env}" + # config.active_job.queue_name_prefix = "puzzletime_production" + config.action_mailer.perform_caching = false # 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. config.action_mailer.raise_delivery_errors = false - # Mail sender - config.action_mailer.delivery_method = (ENV['RAILS_MAIL_DELIVERY_METHOD'].presence || :smtp).to_sym - - if ENV['RAILS_MAIL_DELIVERY_CONFIG'].present? - case config.action_mailer.delivery_method - when :smtp - config.action_mailer.smtp_settings = - YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys - when :sendmail - config.action_mailer.sendmail_settings = - YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys - end - end - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). - config.i18n.fallbacks = [I18n.default_locale] + config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify @@ -116,12 +95,47 @@ # require 'syslog/logger' # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') - if ENV['RAILS_LOG_TO_STDOUT'].present? - logger = ActiveSupport::Logger.new($stdout) + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Inserts middleware to perform automatic connection switching. + # The `database_selector` hash is used to pass options to the DatabaseSelector + # middleware. The `delay` is used to determine how long to wait after a write + # to send a subsequent read to the primary. + # + # The `database_resolver` class is used by the middleware to determine which + # database is appropriate to use based on the time delay. + # + # The `database_resolver_context` class is used by the middleware to set + # timestamps for the last write to the primary. The resolver uses the context + # class timestamps to determine how long to wait before reading from the + # replica. + # + # By default Rails will store a last write timestamp in the session. The + # DatabaseSelector middleware is designed as such you can define your own + # strategy for connection switching and pass that into the middleware through + # these configuration options. + # config.active_record.database_selector = { delay: 2.seconds } + # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver + # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session + + # Mail sender + config.action_mailer.delivery_method = (ENV['RAILS_MAIL_DELIVERY_METHOD'].presence || :smtp).to_sym + + if ENV['RAILS_MAIL_DELIVERY_CONFIG'].present? + case config.action_mailer.delivery_method + when :smtp + config.action_mailer.smtp_settings = + YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys + when :sendmail + config.action_mailer.sendmail_settings = + YAML.load("{ #{ENV['RAILS_MAIL_DELIVERY_CONFIG']} }").symbolize_keys + end + end end diff --git a/config/environments/test.rb b/config/environments/test.rb index f54f986dd..397bcb0c0 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,15 +1,16 @@ -# Copyright (c) 2006-2017, Puzzle ITC GmbH. This file is part of +# Copyright (c) 2006-2023, Puzzle ITC GmbH. This file is part of # PuzzleTime and licensed under the Affero General Public License version 3 # or later. See the COPYING file at the top-level directory or at # https://github.com/puzzle/puzzletime. +# 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 +# and recreated between test runs. Don't rely on the data there! + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # 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 - # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Do not eager load code on boot. This avoids loading your whole application @@ -20,12 +21,13 @@ # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" + 'Cache-Control' => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false + config.cache_store = :memory_store # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false @@ -33,7 +35,7 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false - # Store uploaded files on the local file system in a temporary directory + # Store uploaded files on the local file system in a temporary directory. config.active_storage.service = ENV.fetch('RAILS_STORAGE_SERVICE', 'test').to_sym config.action_mailer.perform_caching = false @@ -46,8 +48,6 @@ # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr - # Raises error for missing translations + # Raises error for missing translations. # config.action_view.raise_on_missing_translations = true - - config.cache_store = :memory_store end diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 94db4b818..f4dc1ce0b 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -6,12 +6,13 @@ # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Add Yarn node_modules folder to the asset load path. -Rails.application.config.assets.paths << - Rails.root.join('app', 'assets', 'fonts') << +Rails.application.config.assets.paths += [ + Rails.root.join('app', 'assets', 'fonts'), Rails.root.join('node_modules') +] # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. -# Rails.application.config.assets.precompile += %w( search.js ) +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) Rails.application.config.assets.precompile += %w(print.css phone.css *.png *.gif *.jpg *.svg) diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index d3bcaa5ec..35d0f26fc 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -11,6 +11,8 @@ # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https +# # If you are using webpack-dev-server then specify webpack-dev-server host +# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development? # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" @@ -19,6 +21,9 @@ # If you are using UJS then enable automatic nonce generation # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } +# Set the nonce only to specific directives +# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) + # Report CSP violations to a specified URI # For further information see the following documentation: # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only diff --git a/config/initializers/new_framework_defaults_6_0.rb b/config/initializers/new_framework_defaults_6_0.rb new file mode 100644 index 000000000..38c836561 --- /dev/null +++ b/config/initializers/new_framework_defaults_6_0.rb @@ -0,0 +1,45 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 6.0 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Don't force requests from old versions of IE to be UTF-8 encoded. +Rails.application.config.action_view.default_enforce_utf8 = false + +# Embed purpose and expiry metadata inside signed and encrypted +# cookies for increased security. +# +# This option is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.0. +Rails.application.config.action_dispatch.use_cookies_with_metadata = true + +# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification. +Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false + +# Return false instead of self when enqueuing is aborted from a callback. +# Rails.application.config.active_job.return_false_on_aborted_enqueue = true + +# Send Active Storage analysis and purge jobs to dedicated queues. +# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis +# Rails.application.config.active_storage.queues.purge = :active_storage_purge + +# When assigning to a collection of attachments declared via `has_many_attached`, replace existing +# attachments instead of appending. Use #attach to add new attachments without replacing existing ones. +# Rails.application.config.active_storage.replace_on_assign_to_many = true + +# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail. +# +# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob), +# will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions. +# If you send mail in the background, job workers need to have a copy of +# MailDeliveryJob to ensure all delivery jobs are processed properly. +# Make sure your entire app is migrated and stable on 6.0 before using this setting. +# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob" + +# Enable the same cache key to be reused when the object being cached of type +# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count) +# of the relation's cache key into the cache version to support recycling cache key. +# Rails.application.config.active_record.collection_cache_versioning = true diff --git a/config/locales/en.yml b/config/locales/en.yml index 287d3a1d6..2c94fa98e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,9 +1,8 @@ -# Copyright (c) 2006-2017, Puzzle ITC GmbH. This file is part of +# Copyright (c) 2006-2023, Puzzle ITC GmbH. This file is part of # PuzzleTime and licensed under the Affero General Public License version 3 # or later. See the COPYING file at the top-level directory or at # https://github.com/puzzle/puzzletime. - # Files in the config/locales directory are used for internationalization # and are automatically loaded by Rails. If you want to use locales other # than English, add the necessary files in this directory. @@ -33,7 +32,7 @@ # 'true': 'foo' # # To learn more, please read the Rails Internationalization guide -# available at http://guides.rubyonrails.org/i18n.html. +# available at https://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" diff --git a/config/puma.rb b/config/puma.rb index 9888b0fef..9a9d420ec 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,4 +1,4 @@ -# Copyright (c) 2006-2017, Puzzle ITC GmbH. This file is part of +# Copyright (c) 2006-2023, Puzzle ITC GmbH. This file is part of # PuzzleTime and licensed under the Affero General Public License version 3 # or later. See the COPYING file at the top-level directory or at # https://github.com/puzzle/puzzletime. @@ -9,8 +9,9 @@ # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 20 } -threads threads_count, threads_count +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 20 } +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +threads min_threads_count, max_threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # @@ -20,8 +21,11 @@ # environment ENV.fetch("RAILS_ENV") { "development" } +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + # Specifies the number of `workers` to boot in clustered mode. -# Workers are forked webserver processes. If using threads and workers together +# Workers are forked web server processes. If using threads and workers together # the concurrency of the application would be max `threads` * `workers`. # Workers do not work on JRuby or Windows (both of which do not support # processes). diff --git a/config/routes.rb b/config/routes.rb index e728bca0d..c1ba66ab0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,17 +1,17 @@ -# Copyright (c) 2006-2017, Puzzle ITC GmbH. This file is part of +# Copyright (c) 2006-2023, Puzzle ITC GmbH. This file is part of # PuzzleTime and licensed under the Affero General Public License version 3 # or later. See the COPYING file at the top-level directory or at # https://github.com/puzzle/puzzletime. Rails.application.routes.draw do + # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html + devise_for :employees, controllers: { sessions: 'employees/sessions', omniauth_callbacks: 'employees/omniauth_callbacks' }, skip: [:registrations] as :employee do get 'employees/edit' => 'devise/registrations#edit', :as => 'edit_employee_registration' patch 'employees' => 'devise/registrations#update', :as => 'employee_registration' end - # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html - root to: 'worktimes#index' # mount DryCrudJsonapiSwagger::Engine => '/apidocs' diff --git a/db/migrate/20230206101600_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb b/db/migrate/20230206101600_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb new file mode 100644 index 000000000..ff5d72c7e --- /dev/null +++ b/db/migrate/20230206101600_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb @@ -0,0 +1,10 @@ +# This migration comes from active_storage (originally 20180723000244) +class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0] + def up + return if foreign_key_exists?(:active_storage_attachments, column: :blob_id) + + if table_exists?(:active_storage_blobs) + add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id + end + end +end diff --git a/db/schema.rb b/db/schema.rb index b75f9618b..8b84e87ed 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,15 +2,15 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# Note that this schema.rb definition is the authoritative source for your -# database schema. If you need to create the application database on another -# system, you should be using db:schema:load, not running all the migrations -# from scratch. The latter is a flawed and unsustainable approach (the more migrations -# you'll amass, the slower it'll run and the greater likelihood for issues). +# This file is the source Rails uses to define your schema when running `rails +# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# be faster and is potentially less error prone than running all of your +# migrations from scratch. Old migrations may fail to apply correctly if those +# migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2022_03_24_143608) do +ActiveRecord::Schema.define(version: 2023_02_06_101600) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 000000000..74953049e --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,12 @@ +{ + "systemParams": "linux-x64-83", + "modulesFolders": [ + "node_modules" + ], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [], + "lockfileEntries": {}, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/public/assets/.sprockets-manifest-389d4ce5d8509d6d04d0b775519d90f1.json b/public/assets/.sprockets-manifest-389d4ce5d8509d6d04d0b775519d90f1.json new file mode 100644 index 000000000..b3c23f23b --- /dev/null +++ b/public/assets/.sprockets-manifest-389d4ce5d8509d6d04d0b775519d90f1.json @@ -0,0 +1 @@ +{"files":{"manifest-dad05bf766af0fe3d79dd746db3c1361c0583026cdf35d6a2921bccaea835331.js":{"logical_path":"manifest.js","mtime":"2023-02-06T15:56:10+01:00","size":3,"digest":"6a3cf5192354f71615ac51034b3e97c20eda99643fcaf5bbe6d41ad59bd12167","integrity":"sha256-ajz1GSNU9xYVrFEDSz6Xwg7amWQ/yvW75tQa1ZvRIWc="},"ajax-loader-0e899a4e4cea34f16947494fb21069ec1dff319afc0f8c0ba8ba84406e28d3ba.gif":{"logical_path":"ajax-loader.gif","mtime":"2023-02-06T16:04:29+01:00","size":673,"digest":"43a526a07a078d736e5c9d67d8479dd54072b7e5c6ddd2cd466f86a086e49ef5","integrity":"sha256-Q6UmoHoHjXNuXJ1n2Eed1UByt+XG3dLNRm+GoIbknvU="},"calendar-48d011f3b73eb282dc94666ed015b3d2cc4a936b1182b1ba102ea9992d9c561c.gif":{"logical_path":"calendar.gif","mtime":"2023-02-06T16:04:29+01:00","size":127,"digest":"b65951581ff3b4219f3de2544ea69ec30c312dcb1a09b1c1aeadf2db6484dd81","integrity":"sha256-tllRWB/ztCGfPeJUTqaewwwxLcsaCbHBrq3y22SE3YE="},"calendar-61bcc4c23aa409db2f353d136ec0475cd5e7503242cd6adb1c34f5957538b202.png":{"logical_path":"calendar.png","mtime":"2023-02-06T16:04:29+01:00","size":150,"digest":"8184eacb118a0c9bf6891d2e114d91bfc8097933021d22f564f08efbfd25909f","integrity":"sha256-gYTqyxGKDJv2iR0uEU2Rv8gJeTMCHSL1ZPCO+/0lkJ8="},"day-marker-active-d99b32b60616df674b040de1ceef5f8fc77693ae7c8c169788eda089c84d4441.svg":{"logical_path":"day-marker-active.svg","mtime":"2023-02-06T16:04:29+01:00","size":894,"digest":"e74a96dd7d8d47e1dcdef9e39ad349f97eacbe692e56e094f881ffe13e03873f","integrity":"sha256-50qW3X2NR+Hc3vnjmtNJ+X6svmkuVuCU+IH/4T4Dhz8="},"day-marker-holiday-8a281e6680508108fe59cf1c01b6c56ec5510e3b48a36d08e8814ba1693e2ddb.svg":{"logical_path":"day-marker-holiday.svg","mtime":"2023-02-06T16:04:29+01:00","size":898,"digest":"b85d139fc4363666468fc8dd395fd7531ac6d4c5266f8327344dd42f9e55366e","integrity":"sha256-uF0Tn8Q2NmZGj8jdOV/XUxrG1MUmb4MnNE3UL55VNm4="},"day-marker-missing-44a616885a5627c4c6af6ba793461939b5962d6545f8760011508e5e498aec20.svg":{"logical_path":"day-marker-missing.svg","mtime":"2023-02-06T16:04:29+01:00","size":894,"digest":"d1e412d82ce50c05460746cf37d49194f6efb5b948ff0ee8e14e37f616712321","integrity":"sha256-0eQS2CzlDAVGB0bPN9SRlPbvtblI/w7o4U439hZxIyE="},"favicon-e7bb1f6b17d7f9dcab65221e7df38ad9cffe3b61fe1c0a035a8d113073327c96.png":{"logical_path":"favicon.png","mtime":"2023-02-06T16:04:29+01:00","size":490,"digest":"feadf43b00371109b481382aa70dd6535444960c62625b229af0b2b87b96084b","integrity":"sha256-/q30OwA3EQm0gTgqpw3WU1RElgxiYlsimvCyuHuWCEs="},"highrise-cdc00f1faa88687f254449a5b54f3c8c3f2ae8eb94c59d260ab4f107fc8f3f31.png":{"logical_path":"highrise.png","mtime":"2023-02-06T16:04:29+01:00","size":1121,"digest":"6442c3fdd7a632bd77daf86cc5d4c2cf687d00ddb5b6a239c6c82e2a470ae141","integrity":"sha256-ZELD/demMr132vhsxdTCz2h9AN21tqI5xsguKkcK4UE="},"logo-c9792e60e4d11c6511c7d6549ec1a8939ccc8db5f92ec6a00351b5d89e92c426.svg":{"logical_path":"logo.svg","mtime":"2023-02-06T16:04:29+01:00","size":1091,"digest":"8cf26a0e687dd17079efee1414dbfbea1e358c1e3c0e45f4adce44fb0b1e93e8","integrity":"sha256-jPJqDmh90XB57+4UFNv76h41jB48DkX0rc5E+wsek+g="},"lupe-c774b159265725d0245e0cb4f5dd2b323ec7bb823c37fa5249cd5b6004bdfce6.gif":{"logical_path":"lupe.gif","mtime":"2023-02-06T16:04:29+01:00","size":94,"digest":"9336ea2b8357244a75644f46ec6064cd44ff59c878481b830e9fbb3caf578d8f","integrity":"sha256-kzbqK4NXJEp1ZE9G7GBkzUT/Wch4SBuDDp+7PK9XjY8="},"space-9a89381c23d3b40e675948d825ad2df1ffbabb6c44489acc8b54f984d88d1854.gif":{"logical_path":"space.gif","mtime":"2023-02-06T16:04:29+01:00","size":43,"digest":"afe0dcfca292a0fae8bce08a48c14d3e59c9d82c6052ab6d48a22ecc6c48f277","integrity":"sha256-r+Dc/KKSoProvOCKSMFNPlnJ2CxgUqttSKIuzGxI8nc="},"whitebox-aa4dc20192f264f3b20f45ef8c3bcbe8d6d6bd4fe6011087a0c1e035bda32148.gif":{"logical_path":"whitebox.gif","mtime":"2023-02-06T16:04:29+01:00","size":110,"digest":"205a90ec6797eae903a00fea87c86b4b9ffee1599e7c913d537663ee5eca66fd","integrity":"sha256-IFqQ7GeX6ukDoA/qh8hrS5/+4VmefJE9U3Zj7l7KZv0="},"application-b13e430fa55310b01e7be687036d0909a5ea9d39952bb0c8422c6a1fac09a204.js":{"logical_path":"application.js","mtime":"2023-02-06T15:56:10+01:00","size":982710,"digest":"d7216e73ce50b4fe7f0b0b0f9af13a0f78424e378b86cd36759693beb3eb1fb6","integrity":"sha256-1yFuc85QtP5/CwsPmvE6D3hCTjeLhs02dZaTvrPrH7Y="},"application-bd0c129a2e26937339c4fd5440e31830cd84b6fe6115a594ba8d06b2866c3d19.css":{"logical_path":"application.css","mtime":"2023-02-06T16:04:29+01:00","size":522001,"digest":"499e194edfafe4086ed761101b8d8c155e2a87a4ebae1a71f37420f5cb45921c","integrity":"sha256-SZ4ZTt+v5Ahu12EQG42MFV4qh6Trrhpx83Qg9ctFkhw="},"ui-bg_glass_75_ffffff_1x400-e6dec50d602c5c8829427ecd8164ac59dc3e8258d1dc7d0d7fda47239669cad9.png":{"logical_path":"ui-bg_glass_75_ffffff_1x400.png","mtime":"2023-02-06T16:04:29+01:00","size":107,"digest":"2f5ecbbd2965ce36b5b47226f59485bd4fbdf038c460b082a2cdb6dcec01ff4d","integrity":"sha256-L17LvSllzja1tHIm9ZSFvU+98DjEYLCCos223OwB/00="},"ui-icons_222222_256x240-3305696b28a8757b9b73e678cc6c72dc7277107d3df71dc3baf4f77312473ae9.png":{"logical_path":"ui-icons_222222_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":4369,"digest":"a2ccfdc001858222885a9df39200840ac7a3f479ba889727d32a10398db7918a","integrity":"sha256-osz9wAGFgiKIWp3zkgCECsej9Hm6iJcn0yoQOY23kYo="},"ui-icons_888888_256x240-42393eae298d8afe2c78cd1caf6a1abfecc8201d7adf92c594e386f8f10cf987.png":{"logical_path":"ui-icons_888888_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":4369,"digest":"a42b23e21050a0f0f90c1f7a443b8087a409771611eae402861959a793be38e8","integrity":"sha256-pCsj4hBQoPD5DB96RDuAh6QJdxYR6uQChhlZp5O+OOg="},"ui-icons_454545_256x240-989d471b55541d188455465047133795033ae7d4e2b929b2daac08112ac1c3bd.png":{"logical_path":"ui-icons_454545_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":4369,"digest":"cb36e80beaf2a527d463da552a5c679a46c4ff8c881318a194bb0ccb61cb2d5c","integrity":"sha256-yzboC+rypSfUY9pVKlxnmkbE/4yIExihlLsMy2HLLVw="},"ui-icons_2e83ff_256x240-71ec8b5da0ab851bbef886db2d916428fcad59d785b5f505af8cd3c8fbb43cb2.png":{"logical_path":"ui-icons_2e83ff_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":4369,"digest":"4f907b912e024625d36b8af307f1043e6ebc97074e31216175d14bb74c370dc3","integrity":"sha256-T5B7kS4CRiXTa4rzB/EEPm68lwdOMSFhddFLt0w3DcM="},"ui-icons_f6cf3b_256x240-fa649f3fa8d7d4f9343a1d0714d848bf023da59a7985bd51a451d47ee2cc434e.png":{"logical_path":"ui-icons_f6cf3b_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":8884,"digest":"14f31a14a6be5471828aa900b541e125456013941d82b88fe0cb712c36563758","integrity":"sha256-FPMaFKa+VHGCiqkAtUHhJUVgE5QdgriP4MtxLDZWN1g="},"ui-bg_flat_0_aaaaaa_40x100-aa167a04c6c4e82e1fbe80ec8a290de0a228ff1f074e64fda276e18c53b6885a.png":{"logical_path":"ui-bg_flat_0_aaaaaa_40x100.png","mtime":"2023-02-06T16:04:29+01:00","size":180,"digest":"9a8492a580bf85d3e98ae8861fbd45567e5a1f83eeafcf9574da0399d5f602ab","integrity":"sha256-moSSpYC/hdPpiuiGH71FVn5aH4Pur8+VdNoDmdX2Aqs="},"jquery-ui/ui-icons_444444_256x240-f6d8c091e81dfb911fc0815e7c9952c90b361a3f685804be08a5fa2ee6d6198b.png":{"logical_path":"jquery-ui/ui-icons_444444_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":3756,"digest":"31d988765b4e6f56553c29588c500381dc3e6f0aa2980c8212202e5644aefd5d","integrity":"sha256-MdmIdltOb1ZVPClYjFADgdw+bwqimAyCEiAuVkSu/V0="},"jquery-ui/ui-icons_555555_256x240-c23f23416a84a359723ffe28c6231f7e6edd10de024da40c190f9e0706c70276.png":{"logical_path":"jquery-ui/ui-icons_555555_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":3756,"digest":"32175261daee76c82bb0edf0eea16a56421866fbc31e94f3c1d570aa114502f5","integrity":"sha256-MhdSYdrudsgrsO3w7qFqVkIYZvvDHpTzwdVwqhFFAvU="},"jquery-ui/ui-icons_ffffff_256x240-24221a00d39ccfd2da654907e99b5af8d8dc60b91bfb414b4ca82779f7f9ffb6.png":{"logical_path":"jquery-ui/ui-icons_ffffff_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":3756,"digest":"350df1b7131037de20e83c5c0f3a41a770d2ac48b5762ea772b3f4a8a7b9d47a","integrity":"sha256-NQ3xtxMQN94g6DxcDzpBp3DSrEi1di6ncrP0qKe51Ho="},"jquery-ui/ui-icons_777620_256x240-0a3bb6e0c499ea585572cbda26b638d08b96a568bfb173f0dce2c9eee4a441b3.png":{"logical_path":"jquery-ui/ui-icons_777620_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":3756,"digest":"0b020fc6e696d88d296e7bb1f61f1eb2ad827848e2c7382a4c3e0999e702dd9b","integrity":"sha256-CwIPxuaW2I0pbnux9h8esq2CeEjixzgqTD4JmecC3Zs="},"jquery-ui/ui-icons_cc0000_256x240-c7cf3a680d1476856186d49a361c0b3e09d13a2f4ba4ebd638595bbad9d21c2d.png":{"logical_path":"jquery-ui/ui-icons_cc0000_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":3756,"digest":"40985a64b4d5dd213fba27fcd862a1bd1b337a97674f6ff0b9ec20abcee4bc69","integrity":"sha256-QJhaZLTV3SE/uif82GKhvRszepdnT2/wuewgq87kvGk="},"jquery-ui/ui-icons_777777_256x240-ea4f5d5317b31eaaaf01e3db3357884b418c8b3361019647559c835996ddaedb.png":{"logical_path":"jquery-ui/ui-icons_777777_256x240.png","mtime":"2023-02-06T16:04:29+01:00","size":3756,"digest":"faf32007ae120c302213557626e660dd10e711c5dd4f1113d35f26dc05b78d2f","integrity":"sha256-+vMgB64SDDAiE1V2JuZg3RDnEcXdTxET018m3AW3jS8="},"bootstrap/glyphicons-halflings-regular-0805fb1fe24235f70a639f67514990e4bfb6d2cfb00ca563ad4b553c240ddc33.eot":{"logical_path":"bootstrap/glyphicons-halflings-regular.eot","mtime":"2023-02-06T16:04:29+01:00","size":20127,"digest":"13634da87d9e23f8c3ed9108ce1724d183a39ad072e73e1b3d8cbf646d2d0407","integrity":"sha256-E2NNqH2eI/jD7ZEIzhck0YOjmtBy5z4bPYy/ZG0tBAc="},"bootstrap/glyphicons-halflings-regular-403acfcf0cbaebd1c28b404eec442cea53642644b3a73f91c5a4ab46859af772.woff2":{"logical_path":"bootstrap/glyphicons-halflings-regular.woff2","mtime":"2023-02-06T16:04:29+01:00","size":18028,"digest":"fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c","integrity":"sha256-/hhdEaSWdokNR7t4MxKgzaWkTEA5IUCU55V7TAQO8Rw="},"bootstrap/glyphicons-halflings-regular-0703369a358a012c0011843ae337a8a20270c336948a8668df5cb89a8827299b.woff":{"logical_path":"bootstrap/glyphicons-halflings-regular.woff","mtime":"2023-02-06T16:04:29+01:00","size":23424,"digest":"a26394f7ede100ca118eff2eda08596275a9839b959c226e15439557a5a80742","integrity":"sha256-omOU9+3hAMoRjv8u2ghZYnWpg5uVnCJuFUOVV6WoB0I="},"bootstrap/glyphicons-halflings-regular-7c9caa5f4e16169b0129fdf93c84e85ad14d6c107eb1b0ad60b542daf01ee1f0.ttf":{"logical_path":"bootstrap/glyphicons-halflings-regular.ttf","mtime":"2023-02-06T16:04:29+01:00","size":45404,"digest":"e395044093757d82afcb138957d06a1ea9361bdcf0b442d06a18a8051af57456","integrity":"sha256-45UEQJN1fYKvyxOJV9BqHqk2G9zwtELQahioBRr1dFY="},"bootstrap/glyphicons-halflings-regular-22d0c88a49d7d0ebe45627143a601061a32a46a9b9afd2dc7f457436f5f15f6e.svg":{"logical_path":"bootstrap/glyphicons-halflings-regular.svg","mtime":"2023-02-06T16:04:29+01:00","size":108738,"digest":"42f60659d265c1a3c30f9fa42abcbb56bd4a53af4d83d316d6dd7a36903c43e5","integrity":"sha256-QvYGWdJlwaPDD5+kKry7Vr1KU69Ng9MW1t16NpA8Q+U="},"puzzletime-2de41030a7af76acbd1f6ccb10bc0b7dd5f348a427b3c12120fe15f61b7903cc.eot":{"logical_path":"puzzletime.eot","mtime":"2023-02-06T16:04:29+01:00","size":6364,"digest":"dd1884a392df8a234f429ee82fb4eb2f3060e2b805c98924022e458f7c272004","integrity":"sha256-3RiEo5LfiiNPQp7oL7TrLzBg4rgFyYkkAi5Fj3wnIAQ="},"puzzletime-61a62a54f3b770abbbdc71254ea1b19283766200e3997f7a474d8d9692c1dddd.woff":{"logical_path":"puzzletime.woff","mtime":"2023-02-06T16:04:29+01:00","size":4504,"digest":"cfa6889178018165190780b16c930e5498e8a6b0182c28fc522bfc023c528e89","integrity":"sha256-z6aIkXgBgWUZB4CxbJMOVJjoprAYLCj8Uiv8AjxSjok="},"puzzletime-e2ba8ea4540e897e42ea9182e7ff59463333c45a93e17f5dda18854cc44076f2.ttf":{"logical_path":"puzzletime.ttf","mtime":"2023-02-06T16:04:29+01:00","size":6188,"digest":"7db581c820b4305d0e6215543b445e124dc38ec414e315d6fde7d8cce139a933","integrity":"sha256-fbWByCC0MF0OYhVUO0ReEk3DjsQU4xXW/efYzOE5qTM="},"puzzletime-d547a1d48c348caf9d81ddc08eba7c0de75acda38363a42c5831513a9a2b3d86.svg":{"logical_path":"puzzletime.svg","mtime":"2023-02-06T16:04:29+01:00","size":12966,"digest":"ff75f7ae9883c9bb9cdc8ee607e608a60050ada9394e74d28974db936f222d94","integrity":"sha256-/3X3rpiDybuc3I7mB+YIpgBQrak5TnTSiXTbk28iLZQ="},"print-23f9a8c22460910734dee3bd913abc3dbea21463a0a0a1ee40bdf9a7fe99e34f.css":{"logical_path":"print.css","mtime":"2023-02-06T16:04:29+01:00","size":309417,"digest":"6941635d181b59ce568a7496b9329d84897dd5d641ee36dcfe9ffb5ee3b6d3ad","integrity":"sha256-aUFjXRgbWc5WinSWuTKdhIl91dZB7jbc/p/7XuO2060="},"phone-559c5ed1cdc3ac647348a0dd390a2609abbae2654ab85b1f65fdfb55a76fe173.css":{"logical_path":"phone.css","mtime":"2023-02-06T16:04:29+01:00","size":2013,"digest":"c646cb7e729fa19760e71e2552e56d0bf44f9a715998a826a8564cd0b3fb1f9e","integrity":"sha256-xkbLfnKfoZdg5x4lUuVtC/RPmnFZmKgmqFZM0LP7H54="},"manifest-6ad05901a908774949f62ed6b92ec813ad3abc1bb688bf3daa9eb134b0186f80.js":{"logical_path":"manifest.js","mtime":"2023-02-06T16:04:29+01:00","size":905457,"digest":"3dcbd6f4cb1ef9e30be2e630f79c89b3a89f58a4202fbc0e4e86e66b79d62683","integrity":"sha256-PcvW9Mse+eML4uYw95yJs6ifWKQgL7wOTobma3nWJoM="},"application-d8f81a2184b7e0302aba9ec8b71a8def6d553c805ce3784542f477ed63499287.coffee":{"logical_path":"application.coffee","mtime":"2023-02-06T16:04:29+01:00","size":3366,"digest":"e1bcaaf6f15096b2131b04a8d9525d9df66159a8a7d15e233450e4a18aa0c1a0","integrity":"sha256-4byq9vFQlrITGwSo2VJdnfZhWain0V4jNFDkoYqgwaA="},"application-795779a25521261357be45bad289128fac47df4ce07ddc3bcc37059e5909dc34.js":{"logical_path":"application.js","mtime":"2023-02-06T16:04:29+01:00","size":77276,"digest":"162013a8415290c8bf8e3e6a5e469bbdf03ac1e1716c725683f0aa53b8293eec","integrity":"sha256-FiATqEFSkMi/jj5qXkabvfA6weFxbHJWg/CqU7gpPuw="}},"assets":{"manifest.js":"manifest-6ad05901a908774949f62ed6b92ec813ad3abc1bb688bf3daa9eb134b0186f80.js","ajax-loader.gif":"ajax-loader-0e899a4e4cea34f16947494fb21069ec1dff319afc0f8c0ba8ba84406e28d3ba.gif","calendar.gif":"calendar-48d011f3b73eb282dc94666ed015b3d2cc4a936b1182b1ba102ea9992d9c561c.gif","calendar.png":"calendar-61bcc4c23aa409db2f353d136ec0475cd5e7503242cd6adb1c34f5957538b202.png","day-marker-active.svg":"day-marker-active-d99b32b60616df674b040de1ceef5f8fc77693ae7c8c169788eda089c84d4441.svg","day-marker-holiday.svg":"day-marker-holiday-8a281e6680508108fe59cf1c01b6c56ec5510e3b48a36d08e8814ba1693e2ddb.svg","day-marker-missing.svg":"day-marker-missing-44a616885a5627c4c6af6ba793461939b5962d6545f8760011508e5e498aec20.svg","favicon.png":"favicon-e7bb1f6b17d7f9dcab65221e7df38ad9cffe3b61fe1c0a035a8d113073327c96.png","highrise.png":"highrise-cdc00f1faa88687f254449a5b54f3c8c3f2ae8eb94c59d260ab4f107fc8f3f31.png","logo.svg":"logo-c9792e60e4d11c6511c7d6549ec1a8939ccc8db5f92ec6a00351b5d89e92c426.svg","lupe.gif":"lupe-c774b159265725d0245e0cb4f5dd2b323ec7bb823c37fa5249cd5b6004bdfce6.gif","space.gif":"space-9a89381c23d3b40e675948d825ad2df1ffbabb6c44489acc8b54f984d88d1854.gif","whitebox.gif":"whitebox-aa4dc20192f264f3b20f45ef8c3bcbe8d6d6bd4fe6011087a0c1e035bda32148.gif","application.js":"application-795779a25521261357be45bad289128fac47df4ce07ddc3bcc37059e5909dc34.js","application.css":"application-bd0c129a2e26937339c4fd5440e31830cd84b6fe6115a594ba8d06b2866c3d19.css","ui-bg_glass_75_ffffff_1x400.png":"ui-bg_glass_75_ffffff_1x400-e6dec50d602c5c8829427ecd8164ac59dc3e8258d1dc7d0d7fda47239669cad9.png","ui-icons_222222_256x240.png":"ui-icons_222222_256x240-3305696b28a8757b9b73e678cc6c72dc7277107d3df71dc3baf4f77312473ae9.png","ui-icons_888888_256x240.png":"ui-icons_888888_256x240-42393eae298d8afe2c78cd1caf6a1abfecc8201d7adf92c594e386f8f10cf987.png","ui-icons_454545_256x240.png":"ui-icons_454545_256x240-989d471b55541d188455465047133795033ae7d4e2b929b2daac08112ac1c3bd.png","ui-icons_2e83ff_256x240.png":"ui-icons_2e83ff_256x240-71ec8b5da0ab851bbef886db2d916428fcad59d785b5f505af8cd3c8fbb43cb2.png","ui-icons_f6cf3b_256x240.png":"ui-icons_f6cf3b_256x240-fa649f3fa8d7d4f9343a1d0714d848bf023da59a7985bd51a451d47ee2cc434e.png","ui-bg_flat_0_aaaaaa_40x100.png":"ui-bg_flat_0_aaaaaa_40x100-aa167a04c6c4e82e1fbe80ec8a290de0a228ff1f074e64fda276e18c53b6885a.png","jquery-ui/ui-icons_444444_256x240.png":"jquery-ui/ui-icons_444444_256x240-f6d8c091e81dfb911fc0815e7c9952c90b361a3f685804be08a5fa2ee6d6198b.png","jquery-ui/ui-icons_555555_256x240.png":"jquery-ui/ui-icons_555555_256x240-c23f23416a84a359723ffe28c6231f7e6edd10de024da40c190f9e0706c70276.png","jquery-ui/ui-icons_ffffff_256x240.png":"jquery-ui/ui-icons_ffffff_256x240-24221a00d39ccfd2da654907e99b5af8d8dc60b91bfb414b4ca82779f7f9ffb6.png","jquery-ui/ui-icons_777620_256x240.png":"jquery-ui/ui-icons_777620_256x240-0a3bb6e0c499ea585572cbda26b638d08b96a568bfb173f0dce2c9eee4a441b3.png","jquery-ui/ui-icons_cc0000_256x240.png":"jquery-ui/ui-icons_cc0000_256x240-c7cf3a680d1476856186d49a361c0b3e09d13a2f4ba4ebd638595bbad9d21c2d.png","jquery-ui/ui-icons_777777_256x240.png":"jquery-ui/ui-icons_777777_256x240-ea4f5d5317b31eaaaf01e3db3357884b418c8b3361019647559c835996ddaedb.png","bootstrap/glyphicons-halflings-regular.eot":"bootstrap/glyphicons-halflings-regular-0805fb1fe24235f70a639f67514990e4bfb6d2cfb00ca563ad4b553c240ddc33.eot","bootstrap/glyphicons-halflings-regular.woff2":"bootstrap/glyphicons-halflings-regular-403acfcf0cbaebd1c28b404eec442cea53642644b3a73f91c5a4ab46859af772.woff2","bootstrap/glyphicons-halflings-regular.woff":"bootstrap/glyphicons-halflings-regular-0703369a358a012c0011843ae337a8a20270c336948a8668df5cb89a8827299b.woff","bootstrap/glyphicons-halflings-regular.ttf":"bootstrap/glyphicons-halflings-regular-7c9caa5f4e16169b0129fdf93c84e85ad14d6c107eb1b0ad60b542daf01ee1f0.ttf","bootstrap/glyphicons-halflings-regular.svg":"bootstrap/glyphicons-halflings-regular-22d0c88a49d7d0ebe45627143a601061a32a46a9b9afd2dc7f457436f5f15f6e.svg","puzzletime.eot":"puzzletime-2de41030a7af76acbd1f6ccb10bc0b7dd5f348a427b3c12120fe15f61b7903cc.eot","puzzletime.woff":"puzzletime-61a62a54f3b770abbbdc71254ea1b19283766200e3997f7a474d8d9692c1dddd.woff","puzzletime.ttf":"puzzletime-e2ba8ea4540e897e42ea9182e7ff59463333c45a93e17f5dda18854cc44076f2.ttf","puzzletime.svg":"puzzletime-d547a1d48c348caf9d81ddc08eba7c0de75acda38363a42c5831513a9a2b3d86.svg","print.css":"print-23f9a8c22460910734dee3bd913abc3dbea21463a0a0a1ee40bdf9a7fe99e34f.css","phone.css":"phone-559c5ed1cdc3ac647348a0dd390a2609abbae2654ab85b1f65fdfb55a76fe173.css","application.coffee":"application-d8f81a2184b7e0302aba9ec8b71a8def6d553c805ce3784542f477ed63499287.coffee"}} \ No newline at end of file diff --git a/public/assets/ajax-loader-0e899a4e4cea34f16947494fb21069ec1dff319afc0f8c0ba8ba84406e28d3ba.gif b/public/assets/ajax-loader-0e899a4e4cea34f16947494fb21069ec1dff319afc0f8c0ba8ba84406e28d3ba.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0bce1542342e912da81a2c260562df172f30d73 GIT binary patch literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nnmm28Kh24mmkF0U1e2Nli^nlO|14{Lk&@8WQa67~pE8 zXTZz|lvDgC+Z`3#dv5h=E26FfcG1 zbL_hF&)}42ws10s6^G;;cE1^EoUR)U5A70}d2pLv!jVIT7j&Z~EblI3x0K*v_sV|m z0kj3v921Z^em#l`(k(o@H$3ZdDRc@9NidXDNbqrumReCGv$gd8+e8WW28HVqkJ_9i zH>s*<31KtHjANIPvi2#*6BEu%3Dak5O_t&NBI)H?V$TxT}#l{vOTn5naXTfF^&~Hhq+NX@#Ccc>y7T?;vjI&jdhsDsPJyAw*m0Qz>i}K7# zL9w50Ng{fT}A5JUe8lRK1h7_Y2;BWJDd=c6f&i?Wv5(5q?6|P zQw{>maxZP<537OA37Uk}7@%_$4o$EWe_Zl>&#id|lE-BpDC#+Fn|msJ%_2h{Hg1vP z#N8WAzfWasG}yq|xqE)DrWaOofX=z|?*pgc%{ig5vl!pqDlC|q&~Z0$&Rvsft&VO- z4MZj+%-+Vx%W}v;V76hyp=;+R;x+~t^Q%*xuFTQAF2})fSfTHDAs>sO!OBw`)&)o$ c0!CNZt))x~rAZP^^P&YOFfdqy5)K#u0POD40{{R3 literal 0 HcmV?d00001 diff --git a/public/assets/application-795779a25521261357be45bad289128fac47df4ce07ddc3bcc37059e5909dc34.js b/public/assets/application-795779a25521261357be45bad289128fac47df4ce07ddc3bcc37059e5909dc34.js new file mode 100644 index 000000000..210edaedc --- /dev/null +++ b/public/assets/application-795779a25521261357be45bad289128fac47df4ce07ddc3bcc37059e5909dc34.js @@ -0,0 +1,2452 @@ +(function() { + debugger; + var app; + + app = window.App || (window.App = {}); + + if (typeof String.prototype.endsWith !== 'function') { + String.prototype.endsWith = function(suffix) { + return this.indexOf(suffix, this.length - suffix.length) !== -1; + }; + } + + Object.defineProperty(Object.prototype, 'do', { + value: function(callback) { + callback.call(this, this); + return this; + } + }); + + if (typeof Object.assign !== 'function') { + Object.assign = function(target) { + 'use strict'; + var index, nextKey, output, source; + if (target == null) { + throw new TypeError('Cannot convert undefined or null to object'); + } + output = Object(target); + index = 1; + while (index < arguments.length) { + source = arguments[index]; + if (source !== void 0 && source !== null) { + for (nextKey in source) { + if (source.hasOwnProperty(nextKey)) { + output[nextKey] = source[nextKey]; + } + } + } + index++; + } + return output; + }; + } + + Selectize.define('required-fix', function(options) { + return this.refreshValidityState = (function(_this) { + return function() { + var invalid; + if (!_this.isRequired) { + return false; + } + invalid = !_this.items.length; + _this.isInvalid = invalid; + if (invalid) { + _this.$control_input.attr('required', ''); + return _this.$input.removeAttr('required'); + } else { + _this.$control_input.removeAttr('required'); + return _this.$input.attr('required'); + } + }; + })(this); + }); + + $(document).on('click', '[data-toggle]', function(event) { + var id; + id = $(this).data('toggle'); + if (id !== 'tooltip') { + $('#' + id).slideToggle(200); + return event.preventDefault(); + } + }); + + $(document).on('change', '[data-submit]', function(event) { + return $(this).closest('form').submit(); + }); + + $(document).tooltip({ + selector: '[data-toggle=tooltip]', + container: 'body', + placement: 'top', + html: true + }); + + $(document).on("fields_added.nested_form_fields", function(event, param) { + return $('select.searchable').selectize(); + }); + + $(document).on('ajax:error', function(event, xhr, status, error) { + return alert('Sorry, something went wrong\n(' + error + ')'); + }); + + $(document).on('turbolinks:load', function() { + $('select.searchable:not([multiple])').selectize({ + selectOnTab: true + }); + $('select[multiple].searchable').selectize({ + plugins: ['remove_button'], + selectOnTab: true + }); + $('[data-toggle=buttons]').button(); + $('body').on('click', 'a.disabled', function(event) { + event.preventDefault(); + event.stopImmediatePropagation(); + return event.stopPropagation(); + }); + $('.initial-focus, .initial-focus input').focus(); + return setTimeout(function() { + return $('.initial-focus.selectized').next('.selectize-control').find('input').focus(); + }); + }); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.Autocomplete = (function() { + function Autocomplete() {} + + Autocomplete.prototype.bind = function(input) { + return $(input).selectize({ + plugins: ['required-fix'], + valueField: 'id', + searchField: this.searchFields(), + selectOnTab: true, + openOnFocus: false, + render: { + option: this.renderOption.bind(this), + item: this.renderItem + }, + load: this.loadOptions(input), + onItemAdd: this.onItemAdd + }); + }; + + Autocomplete.prototype.searchFields = function() { + return ['name', 'path_shortnames', 'path_names']; + }; + + Autocomplete.prototype.onItemAdd = function() {}; + + Autocomplete.prototype.renderOption = function(item, escape) { + return "
" + ("
" + (escape(item.path_shortnames)) + "
") + ("
" + (escape(this.limitText(item.name, 70))) + "
") + "
"; + }; + + Autocomplete.prototype.renderItem = function(item, escape) { + return "
" + (escape(item.path_shortnames)) + ": " + (escape(item.name)) + "
"; + }; + + Autocomplete.prototype.loadOptions = function(input) { + return function(query, callback) { + if (query.length) { + return $.ajax({ + url: Autocomplete.prototype.buildUrl(input, query), + type: 'GET', + error: function() { + return callback(); + }, + success: function(res) { + return callback(res); + } + }); + } else { + return callback(); + } + }; + }; + + Autocomplete.prototype.buildUrl = function(input, query) { + var param, param_char, url; + url = $(input).data('url'); + param = encodeURIComponent(query); + param_char = url.indexOf('?') >= 0 ? '&' : '?'; + return "" + url + param_char + "q=" + param; + }; + + Autocomplete.prototype.limitText = function(string, max) { + if (!string) { + return ''; + } else if (string.length > max) { + return string.substr(0, max) + '…'; + } else { + return string; + } + }; + + return Autocomplete; + + })(); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.checkbox || (app.checkbox = {}); + + app.checkbox.Toggler = (function() { + function Toggler(data, action) { + this.data = data; + this.action = action; + this.toggleChecked = function(checkbox) { + var checked, selector; + selector = $(checkbox).data(this.data); + checked = $(checkbox).prop('checked'); + return new this.action(selector).toggle(checked); + }; + } + + Toggler.prototype.bind = function() { + var selector, self; + self = this; + selector = '[data-' + this.data + ']'; + $(document).on('click', selector, function(event) { + return self.toggleChecked(this); + }); + return $(document).on('turbolinks:load', function() { + return $(selector).each(function(i, e) { + return self.toggleChecked(e); + }); + }); + }; + + return Toggler; + + })(); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.checkbox || (app.checkbox = {}); + + app.checkbox.AllChecker = (function() { + function AllChecker(name) { + this.name = name; + } + + AllChecker.prototype.toggle = function(checked) { + return $('input[type=checkbox][name="' + this.name + '"]').prop('checked', checked); + }; + + return AllChecker; + + })(); + + new app.checkbox.Toggler('check', app.checkbox.AllChecker).bind(); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.checkbox || (app.checkbox = {}); + + app.checkbox.ElementHider = (function() { + function ElementHider(selector) { + this.selector = selector; + } + + ElementHider.prototype.toggle = function(hide) { + return $(this.selector).toggle(!hide); + }; + + return ElementHider; + + })(); + + new app.checkbox.Toggler('hide', app.checkbox.ElementHider).bind(); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.checkbox || (app.checkbox = {}); + + app.checkbox.InputEnabler = (function() { + function InputEnabler(selector) { + this.selector = selector; + this.inputs = function() { + return $('input' + this.selector + ', select' + this.selector + ', textarea' + this.selector); + }; + this.affected = function() { + return $(this.selector); + }; + } + + InputEnabler.prototype.toggle = function(enabled) { + if (enabled) { + return this.enable(); + } else { + return this.disable(); + } + }; + + InputEnabler.prototype.enable = function() { + this.inputs().prop('disabled', false); + this.affected().removeClass('disabled'); + return $.each(this.affected(), function(i, e) { + if (e.selectize) { + return e.selectize.enable(); + } + }); + }; + + InputEnabler.prototype.disable = function() { + this.inputs().prop('disabled', true); + this.affected().addClass('disabled'); + return $.each(this.affected(), function(i, e) { + if (e.selectize) { + return e.selectize.disable(); + } + }); + }; + + return InputEnabler; + + })(); + + new app.checkbox.Toggler('enable', app.checkbox.InputEnabler).bind(); + +}).call(this); +(function() { + var ClearInput; + + ClearInput = (function() { + function ClearInput() {} + + ClearInput.prototype.clear = function(cross) { + console.log('click'); + this._input(cross).val('').trigger('change'); + return this._input(cross).parents('form').submit(); + }; + + ClearInput.prototype.toggleHide = function(input) { + var group; + group = input.parents('.has-clear'); + if (input.val() === '') { + return group.addClass('has-empty-value'); + } else { + return group.removeClass('has-empty-value'); + } + }; + + ClearInput.prototype._input = function(cross) { + return cross.parents('.has-clear').find('input[type=search]'); + }; + + ClearInput.prototype.bind = function() { + var self; + self = this; + $(document).on('click', '[data-clear]', function() { + return self.clear($(this)); + }); + return $(document).on('change', '.has-clear input[type=search]', function() { + return self.toggleHide($(this)); + }); + }; + + return ClearInput; + + })(); + + new ClearInput().bind(); + + $(document).on('turbolinks:load', function() { + return $('.has-clear input[type=search]').each(function(i, e) { + return new ClearInput().toggleHide($(e)); + }); + }); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.DynamicParams = (function() { + function DynamicParams(element, request1) { + this.element = element; + this.request = request1; + this.url = function() { + return this.request.url + this.joint() + this.urlParams().join('&'); + }; + this.urlParams = function() { + var i, len, p, ref, results, value; + ref = this.dynamicParams(); + results = []; + for (i = 0, len = ref.length; i < len; i++) { + p = ref[i]; + value = $('#' + p.replace('[', '_').replace(']', '')).val() || ''; + results.push(encodeURIComponent(p) + "=" + value); + } + return results; + }; + this.dynamicParams = function() { + return $(this.element).data('dynamic-params').split(','); + }; + this.joint = function() { + if (this.request.url.indexOf('?') === -1) { + return '?'; + } else { + return '&'; + } + }; + } + + DynamicParams.prototype.append = function() { + return this.request.url = this.url(); + }; + + return DynamicParams; + + })(); + + $(document).on('ajax:beforeSend', '[data-dynamic-params]', function(event, xhr, request) { + return new app.DynamicParams(this, request).append(); + }); + +}).call(this); +(function() { + var app, + slice = [].slice; + + app = window.App || (window.App = {}); + + app.FormUpdater = (function() { + function FormUpdater() { + var event, formSelector, url, watchSelectors; + url = arguments[0], event = arguments[1], formSelector = arguments[2], watchSelectors = 4 <= arguments.length ? slice.call(arguments, 3) : []; + this.url = url; + this.event = event; + this.form = $(formSelector); + this.watchedElements = watchSelectors.join(', '); + this._bind(); + } + + FormUpdater.prototype.updateForm = function() { + return this._getUrl(this.url); + }; + + FormUpdater.prototype._params = function() { + return this.form.serialize(); + }; + + FormUpdater.prototype._getUrl = function() { + return $.getScript(this.url + "?" + (this._params())); + }; + + FormUpdater.prototype._bind = function() { + return $(document).on(this.event, this.watchedElements, (function(_this) { + return function(event) { + return _this.updateForm(); + }; + })(this)); + }; + + return FormUpdater; + + })(); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.LinkedTableRow = (function() { + function LinkedTableRow(cell) { + this.row = $(cell).closest('tr'); + this.url = function() { + return this.urlTemplate().replace('/:id/', '/' + this.rowId() + '/'); + }; + this.urlTemplate = function() { + return this.row.closest('[data-row-link]').data('row-link'); + }; + this.rowId = function() { + return this.row.get(0).id.match(/\w+_(\d+)/)[1]; + }; + } + + LinkedTableRow.prototype.openLink = function() { + return window.location = this.url(); + }; + + return LinkedTableRow; + + })(); + + $(document).on('click', '[data-row-link] tbody tr:not([data-no-link=true]) td:not(.no-link)', function(event) { + return new app.LinkedTableRow(this).openLink(); + }); + +}).call(this); +(function() { + var app, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + app = window.App || (window.App = {}); + + app.OrderAutocomplete = (function(superClass) { + extend(OrderAutocomplete, superClass); + + function OrderAutocomplete() { + return OrderAutocomplete.__super__.constructor.apply(this, arguments); + } + + OrderAutocomplete.prototype.onItemAdd = function(value, item) { + if (value) { + return window.location = window.location.toString().replace(/orders\/\d+/, 'orders/' + value); + } + }; + + return OrderAutocomplete; + + })(app.Autocomplete); + + $(document).on('turbolinks:load', function() { + return $('[data-autocomplete=order]').each(function(i, element) { + return new app.OrderAutocomplete().bind(element); + }); + }); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.SelectizeRefresher = (function() { + function SelectizeRefresher(master) { + this.master = master; + this.url = function() { + return this.master.data('url'); + }; + this.params = function() { + return this.master.serialize(); + }; + this.selectize = function() { + return $(this.master.data('update'))[0].selectize; + }; + } + + SelectizeRefresher.prototype.load = function() { + return $.getJSON(this.url(), this.params(), (function(_this) { + return function(data) { + return _this.refresh(data); + }; + })(this)); + }; + + SelectizeRefresher.prototype.refresh = function(data) { + var selectize; + selectize = this.selectize(); + selectize.clear(); + selectize.clearOptions(); + data.forEach(function(e) { + return selectize.addOption({ + value: e.id, + text: e.label + }); + }); + return selectize.refreshOptions(false); + }; + + return SelectizeRefresher; + + })(); + + $(document).on('change', '[data-update][data-url]', function(event) { + return new app.SelectizeRefresher($(this)).load(); + }); + +}).call(this); +(function() { + var app; + + app = window.App || (window.App = {}); + + app.Spinner = (function() { + function Spinner() {} + + Spinner.prototype.show = function(button) { + button.prop('disable', true).addClass('disabled'); + button.siblings('.spinner').show(); + return button.find('.spinner').show(); + }; + + Spinner.prototype.hide = function(button) { + button.prop('disable', false).removeClass('disabled'); + button.siblings('.spinner').hide(); + return button.find('.spinner').hide(); + }; + + Spinner.prototype.bind = function() { + var self; + self = this; + $(document).on('ajax:beforeSend', '[data-spin]', function() { + return self.show($(this)); + }); + return $(document).on('ajax:complete', '[data-spin]', function() { + return self.hide($(this)); + }); + }; + + return Spinner; + + })(); + + new app.Spinner().bind(); + +}).call(this); +(function() { + var app, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + app = window.App || (window.App = {}); + + app.WorkItemAutocomplete = (function(superClass) { + extend(WorkItemAutocomplete, superClass); + + function WorkItemAutocomplete() { + return WorkItemAutocomplete.__super__.constructor.apply(this, arguments); + } + + WorkItemAutocomplete.prototype.onItemAdd = function(value, item) { + var billable, meal_compensation; + billable = item.attr('data-billable') === 'true'; + meal_compensation = item.attr('data-meal_compensation') === 'true'; + $('#ordertime_billable').prop('checked', billable); + return $('#ordertime_meal_compensation').prop('checked', meal_compensation); + }; + + WorkItemAutocomplete.prototype.renderOption = function(item, escape) { + return "
" + ("
" + (escape(item.path_shortnames)) + "
") + ("
" + (escape(this.limitText(item.name, 70))) + "
") + ("
" + (escape(this.limitText(item.description || '', 120))) + "
") + "
"; + }; + + WorkItemAutocomplete.prototype.renderItem = function(item, escape) { + return ("
") + ((escape(item.path_shortnames)) + ": " + (escape(item.name)) + "
"); + }; + + return WorkItemAutocomplete; + + })(app.Autocomplete); + + $(document).on('turbolinks:load', function() { + return $('[data-autocomplete=work_item]').each(function(i, element) { + return new app.WorkItemAutocomplete().bind(element); + }); + }); + +}).call(this); +(function() { + window.nested_form_fields || (window.nested_form_fields = {}); + + nested_form_fields.bind_nested_forms_links = function() { + $('body').off("click", '.add_nested_fields_link'); + $('body').on('click', '.add_nested_fields_link', function(event, additional_data) { + var $child_templates, $link, $parsed_template, $template, added_index, association_path, index_placeholder, object_class, target, template_html; + $link = $(this); + object_class = $link.data('object-class'); + association_path = $link.data('association-path'); + added_index = $(".nested_" + association_path).length; + $.event.trigger("fields_adding.nested_form_fields", { + object_class: object_class, + added_index: added_index, + association_path: association_path, + additional_data: additional_data + }); + if ($link.data('scope')) { + $template = $(($link.data('scope')) + " #" + association_path + "_template"); + } else { + $template = $("#" + association_path + "_template"); + } + target = $link.data('insert-into'); + template_html = $template.html(); + index_placeholder = "__" + association_path + "_index__"; + template_html = template_html.replace(new RegExp(index_placeholder, "g"), added_index); + template_html = template_html.replace(new RegExp("__nested_field_for_replace_with_index__", "g"), added_index); + $parsed_template = $(template_html); + $child_templates = $parsed_template.closestChild('.form_template'); + $child_templates.each(function() { + var $child; + $child = $(this); + return $child.replaceWith($("