From 09fb080313f2250843534035c7363220783096bd Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 5 Jul 2018 15:17:02 +0200 Subject: [PATCH 01/36] Locate Save button on logical side It feels odd when saving a new link. The Save button should be on the right side of the form: this fixes that. --- app/views/links/new.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/links/new.html.erb b/app/views/links/new.html.erb index 0694190..f34a690 100644 --- a/app/views/links/new.html.erb +++ b/app/views/links/new.html.erb @@ -58,8 +58,8 @@ <%= l.text_area :description, class: "form-control" %> A short description of your link that might be helpful to others. Totally optional. - <%= l.submit 'Save', class: "btn btn-primary" %> - <%= link_to 'Back to All Links', links_path, class: "btn btn-default pull-right" %> + <%= l.submit 'Save', class: "btn btn-primary pull-right" %> + <%= link_to 'Back to All Links', links_path, class: "btn btn-default" %> <% if @relevant_links.present? %>
From 561359c3c50e7aa534207593e41a46e08cec2f80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 23:09:27 +0000 Subject: [PATCH 02/36] Bump sprockets from 3.7.1 to 3.7.2 Bumps [sprockets](http://getsprockets.org/) from 3.7.1 to 3.7.2. Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b2701f..9292aee 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -59,7 +59,7 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.0.5) + concurrent-ruby (1.1.5) crass (1.0.3) diff-lcs (1.3) erubis (2.7.0) @@ -93,7 +93,7 @@ GEM nokogiri (1.8.1) mini_portile2 (~> 2.3.0) public_suffix (3.0.1) - rack (2.0.3) + rack (2.0.7) rack-cors (1.0.2) rack-test (0.6.3) rack (>= 1.0) @@ -154,7 +154,7 @@ GEM rdoc (~> 4.0) spring (2.0.2) activesupport (>= 4.2) - sprockets (3.7.1) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.1) From be2f108019c3b9ab7a12deb61682fee9d718a324 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 23:09:28 +0000 Subject: [PATCH 03/36] Bump nokogiri from 1.8.1 to 1.10.4 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.8.1 to 1.10.4. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.8.1...v1.10.4) Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b2701f..a3cba3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -86,12 +86,12 @@ GEM mini_mime (>= 0.1.1) method_source (0.9.0) mini_mime (1.0.0) - mini_portile2 (2.3.0) + mini_portile2 (2.4.0) minitest (5.11.1) multi_json (1.13.1) nio4r (2.2.0) - nokogiri (1.8.1) - mini_portile2 (~> 2.3.0) + nokogiri (1.10.4) + mini_portile2 (~> 2.4.0) public_suffix (3.0.1) rack (2.0.3) rack-cors (1.0.2) From 13cfc487b54fd30af39e770fe4a3afcb09f1177f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 23:09:30 +0000 Subject: [PATCH 04/36] Bump bootstrap-sass from 3.3.7 to 3.4.1 Bumps [bootstrap-sass](https://github.com/twbs/bootstrap-sass) from 3.3.7 to 3.4.1. - [Release notes](https://github.com/twbs/bootstrap-sass/releases) - [Changelog](https://github.com/twbs/bootstrap-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/twbs/bootstrap-sass/compare/v3.3.7...v3.4.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b2701f..6822eb6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,9 +47,9 @@ GEM autoprefixer-rails (7.2.5) execjs bindex (0.5.0) - bootstrap-sass (3.3.7) + bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) - sass (>= 3.3.4) + sassc (>= 2.0.0) builder (3.2.3) byebug (9.1.0) coffee-rails (4.2.2) @@ -64,7 +64,7 @@ GEM diff-lcs (1.3) erubis (2.7.0) execjs (2.7.0) - ffi (1.9.18) + ffi (1.11.1) globalid (0.4.1) activesupport (>= 4.2.0) i18n (0.9.3) @@ -121,9 +121,9 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (12.3.0) - rb-fsevent (0.10.2) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) rdoc (4.3.0) rspec (3.7.0) rspec-core (~> 3.7.0) @@ -138,7 +138,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.7.0) rspec-support (3.7.0) - sass (3.5.5) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -149,6 +149,8 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) + sassc (2.1.0) + ffi (~> 1.9) sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) From a85e7686119cf87eadfc635abbb2b44cab647b63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 23:09:30 +0000 Subject: [PATCH 05/36] Bump rack from 2.0.3 to 2.0.7 Bumps [rack](https://github.com/rack/rack) from 2.0.3 to 2.0.7. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/2.0.3...2.0.7) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b2701f..ee05b37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -93,7 +93,7 @@ GEM nokogiri (1.8.1) mini_portile2 (~> 2.3.0) public_suffix (3.0.1) - rack (2.0.3) + rack (2.0.7) rack-cors (1.0.2) rack-test (0.6.3) rack (>= 1.0) From 802757072c1d45add9147471c164b79ccf93bf81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 23:09:31 +0000 Subject: [PATCH 06/36] Bump ffi from 1.9.18 to 1.11.1 Bumps [ffi](https://github.com/ffi/ffi) from 1.9.18 to 1.11.1. - [Release notes](https://github.com/ffi/ffi/releases) - [Changelog](https://github.com/ffi/ffi/blob/master/CHANGELOG.md) - [Commits](https://github.com/ffi/ffi/compare/1.9.18...1.11.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b2701f..02470d6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,7 +64,7 @@ GEM diff-lcs (1.3) erubis (2.7.0) execjs (2.7.0) - ffi (1.9.18) + ffi (1.11.1) globalid (0.4.1) activesupport (>= 4.2.0) i18n (0.9.3) From 0a092fc6adc79f49ea70b1f1d9369281b6ae20df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 23:17:52 +0000 Subject: [PATCH 07/36] Bump loofah from 2.1.1 to 2.2.3 Bumps [loofah](https://github.com/flavorjones/loofah) from 2.1.1 to 2.2.3. - [Release notes](https://github.com/flavorjones/loofah/releases) - [Changelog](https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md) - [Commits](https://github.com/flavorjones/loofah/compare/v2.1.1...v2.2.3) Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ec0ec99..434734d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM execjs coffee-script-source (1.12.2) concurrent-ruby (1.1.5) - crass (1.0.3) + crass (1.0.4) diff-lcs (1.3) erubis (2.7.0) execjs (2.7.0) @@ -79,7 +79,7 @@ GEM json (1.8.6) levenshtein-ffi (1.1.0) ffi (~> 1.9) - loofah (2.1.1) + loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) From bca7cf5d4c797b4e7f1be1e6060d512c146e208b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2019 23:17:56 +0000 Subject: [PATCH 08/36] Bump rails-html-sanitizer from 1.0.3 to 1.2.0 Bumps [rails-html-sanitizer](https://github.com/rails/rails-html-sanitizer) from 1.0.3 to 1.2.0. - [Release notes](https://github.com/rails/rails-html-sanitizer/releases) - [Changelog](https://github.com/rails/rails-html-sanitizer/blob/master/CHANGELOG.md) - [Commits](https://github.com/rails/rails-html-sanitizer/compare/v1.0.3...v1.2.0) Signed-off-by: dependabot[bot] --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ec0ec99..b2e558c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM execjs coffee-script-source (1.12.2) concurrent-ruby (1.1.5) - crass (1.0.3) + crass (1.0.4) diff-lcs (1.3) erubis (2.7.0) execjs (2.7.0) @@ -79,7 +79,7 @@ GEM json (1.8.6) levenshtein-ffi (1.1.0) ffi (~> 1.9) - loofah (2.1.1) + loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) @@ -112,8 +112,8 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.3) - loofah (~> 2.0) + rails-html-sanitizer (1.2.0) + loofah (~> 2.2, >= 2.2.2) railties (5.0.6) actionpack (= 5.0.6) activesupport (= 5.0.6) From e348fd0d752de83869dff155dc9a70b8a1f575a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2019 14:06:44 +0000 Subject: [PATCH 09/36] Bump loofah from 2.2.3 to 2.3.1 Bumps [loofah](https://github.com/flavorjones/loofah) from 2.2.3 to 2.3.1. - [Release notes](https://github.com/flavorjones/loofah/releases) - [Changelog](https://github.com/flavorjones/loofah/blob/master/CHANGELOG.md) - [Commits](https://github.com/flavorjones/loofah/compare/v2.2.3...v2.3.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fc0cc38..46dfd00 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM execjs coffee-script-source (1.12.2) concurrent-ruby (1.1.5) - crass (1.0.4) + crass (1.0.5) diff-lcs (1.3) erubis (2.7.0) execjs (2.7.0) @@ -79,7 +79,7 @@ GEM json (1.8.6) levenshtein-ffi (1.1.0) ffi (~> 1.9) - loofah (2.2.3) + loofah (2.3.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) @@ -90,7 +90,7 @@ GEM minitest (5.11.1) multi_json (1.13.1) nio4r (2.2.0) - nokogiri (1.10.4) + nokogiri (1.10.5) mini_portile2 (~> 2.4.0) public_suffix (3.0.1) rack (2.0.7) From 2a635ab43ce245423489b77e5b997c25b7f86b2e Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Sat, 9 Nov 2019 19:00:40 -0800 Subject: [PATCH 10/36] Upgrade to rails 5.0.7.2 --- Gemfile | 4 +- Gemfile.lock | 168 +++++++++--------- bin/rails | 6 +- bin/rake | 4 - bin/setup | 29 +-- bin/spring | 16 +- bin/update | 29 +++ config/application.rb | 16 +- config/boot.rb | 2 +- config/cable.yml | 9 + config/environment.rb | 2 +- config/environments/development.rb | 35 ++-- config/environments/production.rb | 41 +++-- config/environments/test.rb | 12 +- .../application_controller_renderer.rb | 8 + config/initializers/cookies_serializer.rb | 2 + config/initializers/new_framework_defaults.rb | 25 +++ config/initializers/wrap_parameters.rb | 4 +- config/puma.rb | 47 +++++ config/secrets.yml | 6 +- config/spring.rb | 6 + 21 files changed, 302 insertions(+), 169 deletions(-) create mode 100755 bin/update create mode 100644 config/cable.yml create mode 100644 config/initializers/application_controller_renderer.rb create mode 100644 config/initializers/new_framework_defaults.rb create mode 100644 config/puma.rb create mode 100644 config/spring.rb diff --git a/Gemfile b/Gemfile index f9b0fff..7eec61d 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.0.3' # Use sqlite3 as the database for Active Record -gem 'sqlite3' +gem 'sqlite3', '~> 1.3.13' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets @@ -35,6 +35,8 @@ gem 'will_paginate' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' +gem 'puma' + # Use Unicorn as the app server # gem 'unicorn' diff --git a/Gemfile.lock b/Gemfile.lock index 46dfd00..0f3ec0b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,57 +1,55 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.0.6) - actionpack (= 5.0.6) + actioncable (5.0.7.2) + actionpack (= 5.0.7.2) nio4r (>= 1.2, < 3.0) websocket-driver (~> 0.6.1) - actionmailer (5.0.6) - actionpack (= 5.0.6) - actionview (= 5.0.6) - activejob (= 5.0.6) + actionmailer (5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.6) - actionview (= 5.0.6) - activesupport (= 5.0.6) + actionpack (5.0.7.2) + actionview (= 5.0.7.2) + activesupport (= 5.0.7.2) rack (~> 2.0) rack-test (~> 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.0.6) - activesupport (= 5.0.6) + actionview (5.0.7.2) + activesupport (= 5.0.7.2) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.0.6) - activesupport (= 5.0.6) + activejob (5.0.7.2) + activesupport (= 5.0.7.2) globalid (>= 0.3.6) - activemodel (5.0.6) - activesupport (= 5.0.6) - activerecord (5.0.6) - activemodel (= 5.0.6) - activesupport (= 5.0.6) + activemodel (5.0.7.2) + activesupport (= 5.0.7.2) + activerecord (5.0.7.2) + activemodel (= 5.0.7.2) + activesupport (= 5.0.7.2) arel (~> 7.0) - activesupport (5.0.6) + activesupport (5.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (~> 0.7) + i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) - annotate (2.7.2) - activerecord (>= 3.2, < 6.0) - rake (>= 10.4, < 13.0) + annotate (3.0.3) + activerecord (>= 3.2, < 7.0) + rake (>= 10.4, < 14.0) arel (7.1.4) - autoprefixer-rails (7.2.5) + autoprefixer-rails (9.7.1) execjs - bindex (0.5.0) + bindex (0.8.1) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) builder (3.2.3) - byebug (9.1.0) + byebug (11.0.1) coffee-rails (4.2.2) coffee-script (>= 2.2.0) railties (>= 4.0.0) @@ -65,14 +63,13 @@ GEM erubis (2.7.0) execjs (2.7.0) ffi (1.11.1) - globalid (0.4.1) + globalid (0.4.2) activesupport (>= 4.2.0) - i18n (0.9.3) + i18n (1.7.0) concurrent-ruby (~> 1.0) - jbuilder (2.7.0) + jbuilder (2.9.1) activesupport (>= 4.2.0) - multi_json (>= 1.2) - jquery-rails (4.3.1) + jquery-rails (4.3.5) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) @@ -82,62 +79,63 @@ GEM loofah (2.3.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.7.0) + mail (2.7.1) mini_mime (>= 0.1.1) - method_source (0.9.0) - mini_mime (1.0.0) + method_source (0.9.2) + mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.11.1) - multi_json (1.13.1) - nio4r (2.2.0) + minitest (5.13.0) + nio4r (2.5.2) nokogiri (1.10.5) mini_portile2 (~> 2.4.0) - public_suffix (3.0.1) + public_suffix (4.0.1) + puma (4.3.0) + nio4r (~> 2.0) rack (2.0.7) - rack-cors (1.0.2) + rack-cors (1.0.3) rack-test (0.6.3) rack (>= 1.0) - rails (5.0.6) - actioncable (= 5.0.6) - actionmailer (= 5.0.6) - actionpack (= 5.0.6) - actionview (= 5.0.6) - activejob (= 5.0.6) - activemodel (= 5.0.6) - activerecord (= 5.0.6) - activesupport (= 5.0.6) + rails (5.0.7.2) + actioncable (= 5.0.7.2) + actionmailer (= 5.0.7.2) + actionpack (= 5.0.7.2) + actionview (= 5.0.7.2) + activejob (= 5.0.7.2) + activemodel (= 5.0.7.2) + activerecord (= 5.0.7.2) + activesupport (= 5.0.7.2) bundler (>= 1.3.0) - railties (= 5.0.6) + railties (= 5.0.7.2) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.2.0) - loofah (~> 2.2, >= 2.2.2) - railties (5.0.6) - actionpack (= 5.0.6) - activesupport (= 5.0.6) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (5.0.7.2) + actionpack (= 5.0.7.2) + activesupport (= 5.0.7.2) method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.3.0) + rake (13.0.0) rb-fsevent (0.10.3) rb-inotify (0.10.0) ffi (~> 1.0) rdoc (4.3.0) - rspec (3.7.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-core (3.7.1) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.0) + rspec-support (~> 3.9.0) + rspec-expectations (3.9.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-mocks (3.7.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.0) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -149,13 +147,12 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.1.0) + sassc (2.2.1) ffi (~> 1.9) sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - spring (2.0.2) - activesupport (>= 4.2) + spring (2.1.0) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -164,28 +161,28 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.13) - thor (0.20.0) + thor (0.20.3) thread_safe (0.3.6) - tilt (2.0.8) - turbolinks (5.1.0) - turbolinks-source (~> 5.1) - turbolinks-source (5.1.0) - tzinfo (1.2.4) + tilt (2.0.10) + turbolinks (5.2.1) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.4) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) - validate_url (1.0.2) + validate_url (1.0.8) activemodel (>= 3.0.0) - addressable - web-console (3.5.1) + public_suffix + web-console (3.7.0) actionview (>= 5.0) activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) - will_paginate (3.1.6) + websocket-extensions (0.1.4) + will_paginate (3.2.1) PLATFORMS ruby @@ -199,13 +196,14 @@ DEPENDENCIES jbuilder (~> 2.0) jquery-rails levenshtein-ffi + puma rack-cors rails (~> 5.0.3) rspec sass-rails (~> 5.0) sdoc (~> 0.4.0) spring - sqlite3 + sqlite3 (~> 1.3.13) turbolinks uglifier (>= 1.3.0) validate_url @@ -213,4 +211,4 @@ DEPENDENCIES will_paginate BUNDLED WITH - 1.15.4 + 1.17.3 diff --git a/bin/rails b/bin/rails index 4d608ed..0739660 100755 --- a/bin/rails +++ b/bin/rails @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end -APP_PATH = File.expand_path('../../config/application', __FILE__) +APP_PATH = File.expand_path('../config/application', __dir__) require_relative '../config/boot' require 'rails/commands' diff --git a/bin/rake b/bin/rake index 8017a02..1724048 100755 --- a/bin/rake +++ b/bin/rake @@ -1,8 +1,4 @@ #!/usr/bin/env ruby -begin - load File.expand_path("../spring", __FILE__) -rescue LoadError -end require_relative '../config/boot' require 'rake' Rake.application.run diff --git a/bin/setup b/bin/setup index acdb2c1..e620b4d 100755 --- a/bin/setup +++ b/bin/setup @@ -1,29 +1,34 @@ #!/usr/bin/env ruby require 'pathname' +require 'fileutils' +include FileUtils # path to your application root. -APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) -Dir.chdir APP_ROOT do +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. - # Add necessary setup steps to this file: + # Add necessary setup steps to this file. - puts "== Installing dependencies ==" - system "gem install bundler --conservative" - system "bundle check || bundle install" + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # system "cp config/database.yml.sample config/database.yml" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' # end puts "\n== Preparing database ==" - system "bin/rake db:setup" + system! 'bin/rails db:setup' puts "\n== Removing old logs and tempfiles ==" - system "rm -f log/*" - system "rm -rf tmp/cache" + system! 'bin/rails log:clear tmp:clear' puts "\n== Restarting application server ==" - system "touch tmp/restart.txt" + system! 'bin/rails restart' end diff --git a/bin/spring b/bin/spring index 7b45d37..d89ee49 100755 --- a/bin/spring +++ b/bin/spring @@ -1,15 +1,17 @@ #!/usr/bin/env ruby -# This file loads spring without using Bundler, in order to be fast. +# This file loads Spring without using Bundler, in order to be fast. # It gets overwritten when you run the `spring binstub` command. unless defined?(Spring) - require "rubygems" - require "bundler" + require 'rubygems' + require 'bundler' - if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m) - Gem.paths = { "GEM_PATH" => [Bundler.bundle_path.to_s, *Gem.path].uniq } - gem "spring", match[1] - require "spring/binstub" + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + spring = lockfile.specs.detect { |spec| spec.name == 'spring' } + if spring + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version + require 'spring/binstub' end end diff --git a/bin/update b/bin/update new file mode 100755 index 0000000..a8e4462 --- /dev/null +++ b/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/config/application.rb b/config/application.rb index 986b771..e687285 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('../boot', __FILE__) +require_relative 'boot' require 'rails/all' @@ -12,23 +12,11 @@ class Application < Rails::Application # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. - # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. - # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. - # config.time_zone = 'Central Time (US & Canada)' - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - - # Do not swallow errors in after_commit/after_rollback callbacks. - config.active_record.raise_in_transactional_callbacks = true - config.middleware.insert_before 0, Rack::Cors do allow do origins '*' - resource '*', :headers => :any, :methods => [:get, :post, :options] + resource '*', headers: :any, methods: [:get, :post, :options] end end - end end diff --git a/config/boot.rb b/config/boot.rb index 6b750f0..30f5120 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,3 +1,3 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/config/cable.yml b/config/cable.yml new file mode 100644 index 0000000..0bbde6f --- /dev/null +++ b/config/cable.yml @@ -0,0 +1,9 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 diff --git a/config/environment.rb b/config/environment.rb index ee8d90d..426333b 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require File.expand_path('../application', __FILE__) +require_relative 'application' # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index b55e214..e64889c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -9,13 +9,28 @@ # Do not eager load code on boot. config.eager_load = false - # Show full error reports and disable caching. - config.consider_all_requests_local = true - config.action_controller.perform_caching = false + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => 'public, max-age=172800' + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + config.action_mailer.perform_caching = false + # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log @@ -27,15 +42,13 @@ # number of complex assets. config.assets.debug = true - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - - # Adds additional error checking when serving assets at runtime. - # Checks for improperly declared sprockets dependencies. - # Raises helpful error messages. - config.assets.raise_runtime_errors = true + # Suppress logger output for asset requests. + config.assets.quiet = true # 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 end diff --git a/config/environments/production.rb b/config/environments/production.rb index 5c1b32e..e7cec22 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -14,15 +14,9 @@ config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Enable Rack::Cache to put a simple HTTP cache in front of your application - # Add `rack-cache` to your Gemfile before enabling this. - # For large-scale production use, consider using a caching reverse proxy like - # NGINX, varnish or squid. - # config.action_dispatch.rack_cache = true - # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier @@ -31,16 +25,20 @@ # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false - # Asset digests allow you to set far-future HTTP expiration dates on all assets, - # yet still be able to expire them through the digest params. - config.assets.digest = true - # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # 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 @@ -49,16 +47,15 @@ config.log_level = :debug # Prepend all log lines with the following tags. - # config.log_tags = [ :subdomain, :uuid ] - - # 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' + # 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 = "linkhack_#{Rails.env}" + 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. @@ -74,6 +71,16 @@ # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new + # Use a different logger for distributed setups. + # 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) + 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 end diff --git a/config/environments/test.rb b/config/environments/test.rb index 1c19f08..30587ef 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -12,9 +12,11 @@ # preloads Rails for running tests, you may have to set it to true. config.eager_load = false - # Configure static file server for tests with Cache-Control for performance. - config.serve_static_files = true - config.static_cache_control = 'public, max-age=3600' + # 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=3600' + } # Show full error reports and disable caching. config.consider_all_requests_local = true @@ -25,15 +27,13 @@ # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test - # Randomize the order test cases are executed. - config.active_support.test_order = :random - # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb new file mode 100644 index 0000000..89d2efa --- /dev/null +++ b/config/initializers/application_controller_renderer.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# ActiveSupport::Reloader.to_prepare do +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) +# end diff --git a/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb index 7f70458..5a6a32d 100644 --- a/config/initializers/cookies_serializer.rb +++ b/config/initializers/cookies_serializer.rb @@ -1,3 +1,5 @@ # Be sure to restart your server when you modify this file. +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb new file mode 100644 index 0000000..cbf423a --- /dev/null +++ b/config/initializers/new_framework_defaults.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 5.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. + +Rails.application.config.action_controller.raise_on_unfiltered_parameters = true + +# Enable per-form CSRF tokens. Previous versions had false. +Rails.application.config.action_controller.per_form_csrf_tokens = false + +# Enable origin-checking CSRF mitigation. Previous versions had false. +Rails.application.config.action_controller.forgery_protection_origin_check = false + +# Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. +# Previous versions had false. +ActiveSupport.to_time_preserves_timezone = false + +# Require `belongs_to` associations by default. Previous versions had false. +Rails.application.config.active_record.belongs_to_required_by_default = false + +# Do not halt callback chains when a callback returns false. Previous versions had true. +ActiveSupport.halt_callback_chains_on_return_false = true diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb index 33725e9..bbfc396 100644 --- a/config/initializers/wrap_parameters.rb +++ b/config/initializers/wrap_parameters.rb @@ -5,10 +5,10 @@ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] if respond_to?(:wrap_parameters) + wrap_parameters format: [:json] end # To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do -# self.include_root_in_json = true +# self.include_root_in_json = true # end diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 0000000..c7f311f --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,47 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# 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") { 5 }.to_i +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests, default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver 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). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted this block will be run, if you are using `preload_app!` +# option you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/config/secrets.yml b/config/secrets.yml index b7958c8..67c89f4 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -5,16 +5,16 @@ # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -# You can use `rake secret` to generate a secure secret key. +# You can use `rails secret` to generate a secure secret key. # Make sure the secrets in this file are kept private # if you're sharing your code publicly. development: - secret_key_base: 6a8f29f40414bede134fa13fe80b58f3196aa7aae7efde4ddf1cb68baa502018b9297368b2ca56e09cbf07e5abb267ea78b67f42a45761d7669032300a0ab61e + secret_key_base: 8fa4d2b7796a0a7813fddca407ee37bbb66d58d57380a9a0335a8ef6ed9ae45ad260e3478a9777c071cabde4ffe113649245ca911d39f98b7eb0189bae84b44a test: - secret_key_base: 8152fc65dfd5af400c33a45c95348f8504f77881ff5a6c126fd02b1e27d22a84baa7a046e113ae0997ec73da7d6a54e9065ce302134639efadb17478e1012d59 + secret_key_base: bac879163d01f5f20b6db103bebf736fd0615fc91f1c0d0e8b3ec998625c99a172b07ec26368734cbb94bdb6102b365e982bbab5b08c94f0b38ac27daef7e17c # Do not keep production secrets in the repository, # instead read values from the environment. diff --git a/config/spring.rb b/config/spring.rb new file mode 100644 index 0000000..c9119b4 --- /dev/null +++ b/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } From 0368bf2362a1c4887256a1155566a8ee55aef7f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2019 22:52:28 +0000 Subject: [PATCH 11/36] Bump rack-cors from 1.0.3 to 1.0.5 Bumps [rack-cors](https://github.com/cyu/rack-cors) from 1.0.3 to 1.0.5. - [Release notes](https://github.com/cyu/rack-cors/releases) - [Changelog](https://github.com/cyu/rack-cors/blob/master/CHANGELOG.md) - [Commits](https://github.com/cyu/rack-cors/compare/v1.0.3...v1.0.5) Signed-off-by: dependabot[bot] --- Gemfile.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0f3ec0b..ee4916a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,7 +92,8 @@ GEM puma (4.3.0) nio4r (~> 2.0) rack (2.0.7) - rack-cors (1.0.3) + rack-cors (1.0.5) + rack (>= 1.6.0) rack-test (0.6.3) rack (>= 1.0) rails (5.0.7.2) From e641f26acb300452f82a041fc1cf2afbe94d55fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2019 02:06:13 +0000 Subject: [PATCH 12/36] Bump rack from 2.0.7 to 2.0.8 Bumps [rack](https://github.com/rack/rack) from 2.0.7 to 2.0.8. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/2.0.7...2.0.8) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ee4916a..c4e25ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,7 +91,7 @@ GEM public_suffix (4.0.1) puma (4.3.0) nio4r (~> 2.0) - rack (2.0.7) + rack (2.0.8) rack-cors (1.0.5) rack (>= 1.6.0) rack-test (0.6.3) From 5e71f04ad9aefe81c3cd0405c1ef034b6154cbab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2019 03:00:48 +0000 Subject: [PATCH 13/36] Bump puma from 4.3.0 to 4.3.1 Bumps [puma](https://github.com/puma/puma) from 4.3.0 to 4.3.1. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v4.3.0...v4.3.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c4e25ac..d00f363 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,7 +89,7 @@ GEM nokogiri (1.10.5) mini_portile2 (~> 2.4.0) public_suffix (4.0.1) - puma (4.3.0) + puma (4.3.1) nio4r (~> 2.0) rack (2.0.8) rack-cors (1.0.5) From c832273eba8c8865e076e34dbcb4ce88b9470c18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2020 01:23:47 +0000 Subject: [PATCH 14/36] Bump nokogiri from 1.10.5 to 1.10.8 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.5 to 1.10.8. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.5...v1.10.8) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d00f363..e6768a6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -86,7 +86,7 @@ GEM mini_portile2 (2.4.0) minitest (5.13.0) nio4r (2.5.2) - nokogiri (1.10.5) + nokogiri (1.10.8) mini_portile2 (~> 2.4.0) public_suffix (4.0.1) puma (4.3.1) From 36d927336a9d268c738490801ff69a00a0283ca3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2020 21:18:52 +0000 Subject: [PATCH 15/36] Bump puma from 4.3.1 to 4.3.3 Bumps [puma](https://github.com/puma/puma) from 4.3.1 to 4.3.3. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v4.3.1...v4.3.3) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e6768a6..60c8153 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,7 +89,7 @@ GEM nokogiri (1.10.8) mini_portile2 (~> 2.4.0) public_suffix (4.0.1) - puma (4.3.1) + puma (4.3.3) nio4r (~> 2.0) rack (2.0.8) rack-cors (1.0.5) From c4d283418ae5d4b72645c919cbe84a1f7a2d5f34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 May 2020 16:17:08 +0000 Subject: [PATCH 16/36] Bump puma from 4.3.3 to 4.3.5 Bumps [puma](https://github.com/puma/puma) from 4.3.3 to 4.3.5. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/commits) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 60c8153..5b46e3f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -89,7 +89,7 @@ GEM nokogiri (1.10.8) mini_portile2 (~> 2.4.0) public_suffix (4.0.1) - puma (4.3.3) + puma (4.3.5) nio4r (~> 2.0) rack (2.0.8) rack-cors (1.0.5) From d06345e0833575525306a7083176265818bfc5ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 Jun 2020 03:17:30 +0000 Subject: [PATCH 17/36] Bump websocket-extensions from 0.1.4 to 0.1.5 Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-ruby) from 0.1.4 to 0.1.5. - [Release notes](https://github.com/faye/websocket-extensions-ruby/releases) - [Changelog](https://github.com/faye/websocket-extensions-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-ruby/compare/0.1.4...0.1.5) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5b46e3f..b838336 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -182,7 +182,7 @@ GEM railties (>= 5.0) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) + websocket-extensions (0.1.5) will_paginate (3.2.1) PLATFORMS From 4f26332ff31e937c3352648f9eac0b41e066801c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 Jun 2020 07:36:03 +0000 Subject: [PATCH 18/36] Bump rack from 2.0.8 to 2.2.3 Bumps [rack](https://github.com/rack/rack) from 2.0.8 to 2.2.3. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/2.0.8...2.2.3) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b838336..a715a5d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,7 +91,7 @@ GEM public_suffix (4.0.1) puma (4.3.5) nio4r (~> 2.0) - rack (2.0.8) + rack (2.2.3) rack-cors (1.0.5) rack (>= 1.6.0) rack-test (0.6.3) From 088c0b0106f591956f828225181c0367d35c42a9 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 11 Mar 2021 15:46:53 +0100 Subject: [PATCH 19/36] Update bundled version --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a715a5d..f4f10a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -212,4 +212,4 @@ DEPENDENCIES will_paginate BUNDLED WITH - 1.17.3 + 2.2.2 From ef0646d67b83b599e189fe996588ba9a0968cedf Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 11 Mar 2021 15:50:41 +0100 Subject: [PATCH 20/36] Update Rails --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 7eec61d..01de917 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.0.3' +gem 'rails', '~> 5.0.7.2' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.3.13' # Use SCSS for stylesheets diff --git a/Gemfile.lock b/Gemfile.lock index f4f10a9..4add646 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -199,7 +199,7 @@ DEPENDENCIES levenshtein-ffi puma rack-cors - rails (~> 5.0.3) + rails (~> 5.0.7.2) rspec sass-rails (~> 5.0) sdoc (~> 0.4.0) From 7a907866d95cc03a0379116fd4200c98533d6965 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 11 Mar 2021 16:02:44 +0100 Subject: [PATCH 21/36] Update to Rails 5.2.4.5 --- Gemfile | 3 +- Gemfile.lock | 199 ++++++++++-------- config/initializers/new_framework_defaults.rb | 5 - 3 files changed, 108 insertions(+), 99 deletions(-) diff --git a/Gemfile b/Gemfile index 01de917..d3f1fef 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.0.7.2' +gem 'rails', '= 5.2.4.5' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.3.13' # Use SCSS for stylesheets @@ -31,6 +31,7 @@ gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc gem 'bootstrap-sass' gem 'autoprefixer-rails' +gem 'mini_racer' gem 'will_paginate' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' diff --git a/Gemfile.lock b/Gemfile.lock index 4add646..5479a39 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,178 +1,189 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.0.7.2) - actionpack (= 5.0.7.2) - nio4r (>= 1.2, < 3.0) - websocket-driver (~> 0.6.1) - actionmailer (5.0.7.2) - actionpack (= 5.0.7.2) - actionview (= 5.0.7.2) - activejob (= 5.0.7.2) + actioncable (5.2.4.5) + actionpack (= 5.2.4.5) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.4.5) + actionpack (= 5.2.4.5) + actionview (= 5.2.4.5) + activejob (= 5.2.4.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.0.7.2) - actionview (= 5.0.7.2) - activesupport (= 5.0.7.2) - rack (~> 2.0) - rack-test (~> 0.6.3) + actionpack (5.2.4.5) + actionview (= 5.2.4.5) + activesupport (= 5.2.4.5) + 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.0.7.2) - activesupport (= 5.0.7.2) + actionview (5.2.4.5) + activesupport (= 5.2.4.5) builder (~> 3.1) - erubis (~> 2.7.0) + erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.0.7.2) - activesupport (= 5.0.7.2) + activejob (5.2.4.5) + activesupport (= 5.2.4.5) globalid (>= 0.3.6) - activemodel (5.0.7.2) - activesupport (= 5.0.7.2) - activerecord (5.0.7.2) - activemodel (= 5.0.7.2) - activesupport (= 5.0.7.2) - arel (~> 7.0) - activesupport (5.0.7.2) + activemodel (5.2.4.5) + activesupport (= 5.2.4.5) + activerecord (5.2.4.5) + activemodel (= 5.2.4.5) + activesupport (= 5.2.4.5) + arel (>= 9.0) + activestorage (5.2.4.5) + actionpack (= 5.2.4.5) + activerecord (= 5.2.4.5) + marcel (~> 0.3.1) + activesupport (5.2.4.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - annotate (3.0.3) + annotate (3.1.1) activerecord (>= 3.2, < 7.0) rake (>= 10.4, < 14.0) - arel (7.1.4) - autoprefixer-rails (9.7.1) + arel (9.0.0) + autoprefixer-rails (10.2.4.0) execjs bindex (0.8.1) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) - builder (3.2.3) - byebug (11.0.1) - coffee-rails (4.2.2) + builder (3.2.4) + byebug (11.1.3) + coffee-rails (5.0.0) coffee-script (>= 2.2.0) - railties (>= 4.0.0) + railties (>= 5.2.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.5) - crass (1.0.5) - diff-lcs (1.3) - erubis (2.7.0) + concurrent-ruby (1.1.8) + crass (1.0.6) + diff-lcs (1.4.4) + erubi (1.10.0) execjs (2.7.0) - ffi (1.11.1) + ffi (1.15.0) globalid (0.4.2) activesupport (>= 4.2.0) - i18n (1.7.0) + i18n (1.8.9) concurrent-ruby (~> 1.0) - jbuilder (2.9.1) - activesupport (>= 4.2.0) - jquery-rails (4.3.5) + jbuilder (2.11.2) + activesupport (>= 5.0.0) + jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) json (1.8.6) levenshtein-ffi (1.1.0) ffi (~> 1.9) - loofah (2.3.1) + libv8 (8.4.255.0-x86_64-darwin-19) + loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - method_source (0.9.2) + marcel (0.3.3) + mimemagic (~> 0.3.2) + method_source (1.0.0) + mimemagic (0.3.5) mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.13.0) - nio4r (2.5.2) - nokogiri (1.10.8) - mini_portile2 (~> 2.4.0) - public_suffix (4.0.1) - puma (4.3.5) + mini_racer (0.3.1) + libv8 (~> 8.4.255) + minitest (5.14.4) + nio4r (2.5.7) + nokogiri (1.11.1-x86_64-darwin) + racc (~> 1.4) + public_suffix (4.0.6) + puma (5.2.2) nio4r (~> 2.0) + racc (1.5.2) rack (2.2.3) - rack-cors (1.0.5) - rack (>= 1.6.0) - rack-test (0.6.3) - rack (>= 1.0) - rails (5.0.7.2) - actioncable (= 5.0.7.2) - actionmailer (= 5.0.7.2) - actionpack (= 5.0.7.2) - actionview (= 5.0.7.2) - activejob (= 5.0.7.2) - activemodel (= 5.0.7.2) - activerecord (= 5.0.7.2) - activesupport (= 5.0.7.2) + rack-cors (1.1.1) + rack (>= 2.0.0) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (5.2.4.5) + actioncable (= 5.2.4.5) + actionmailer (= 5.2.4.5) + actionpack (= 5.2.4.5) + actionview (= 5.2.4.5) + activejob (= 5.2.4.5) + activemodel (= 5.2.4.5) + activerecord (= 5.2.4.5) + activestorage (= 5.2.4.5) + activesupport (= 5.2.4.5) bundler (>= 1.3.0) - railties (= 5.0.7.2) + railties (= 5.2.4.5) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (5.0.7.2) - actionpack (= 5.0.7.2) - activesupport (= 5.0.7.2) + railties (5.2.4.5) + actionpack (= 5.2.4.5) + activesupport (= 5.2.4.5) method_source rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (13.0.0) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + thor (>= 0.19.0, < 2.0) + rake (13.0.3) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) ffi (~> 1.0) rdoc (4.3.0) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.0) - rspec-support (~> 3.9.0) - rspec-expectations (3.9.0) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.1) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.0) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.0) + rspec-support (~> 3.10.0) + rspec-support (3.10.2) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) + sass-rails (5.1.0) + railties (>= 5.2.0) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - sassc (2.2.1) + sassc (2.4.0) ffi (~> 1.9) sdoc (0.4.2) json (~> 1.7, >= 1.7.7) rdoc (~> 4.0) - spring (2.1.0) + spring (2.1.1) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.13) - thor (0.20.3) + thor (1.1.0) thread_safe (0.3.6) tilt (2.0.10) turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.5) + tzinfo (1.2.9) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - validate_url (1.0.8) + validate_url (1.0.13) activemodel (>= 3.0.0) public_suffix web-console (3.7.0) @@ -180,13 +191,14 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - websocket-driver (0.6.5) + websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - will_paginate (3.2.1) + will_paginate (3.3.0) PLATFORMS ruby + x86_64-darwin-19 DEPENDENCIES annotate @@ -197,9 +209,10 @@ DEPENDENCIES jbuilder (~> 2.0) jquery-rails levenshtein-ffi + mini_racer puma rack-cors - rails (~> 5.0.7.2) + rails (= 5.2.4.5) rspec sass-rails (~> 5.0) sdoc (~> 0.4.0) diff --git a/config/initializers/new_framework_defaults.rb b/config/initializers/new_framework_defaults.rb index cbf423a..a2bfed3 100644 --- a/config/initializers/new_framework_defaults.rb +++ b/config/initializers/new_framework_defaults.rb @@ -6,8 +6,6 @@ # # Read the Guide for Upgrading Ruby on Rails for more info on each option. -Rails.application.config.action_controller.raise_on_unfiltered_parameters = true - # Enable per-form CSRF tokens. Previous versions had false. Rails.application.config.action_controller.per_form_csrf_tokens = false @@ -20,6 +18,3 @@ # Require `belongs_to` associations by default. Previous versions had false. Rails.application.config.active_record.belongs_to_required_by_default = false - -# Do not halt callback chains when a callback returns false. Previous versions had true. -ActiveSupport.halt_callback_chains_on_return_false = true From 6756c2fae9fe6c326acaff933d4cd00a91350261 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 15 Mar 2021 11:28:42 +0100 Subject: [PATCH 22/36] Support libv8 on linux --- Gemfile.lock | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5479a39..c81ad27 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,6 +81,7 @@ GEM levenshtein-ffi (1.1.0) ffi (~> 1.9) libv8 (8.4.255.0-x86_64-darwin-19) + libv8 (8.4.255.0-x86_64-linux) loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -95,7 +96,9 @@ GEM libv8 (~> 8.4.255) minitest (5.14.4) nio4r (2.5.7) - nokogiri (1.11.1-x86_64-darwin) + nokogiri (1.11.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.11.2-x86_64-linux) racc (~> 1.4) public_suffix (4.0.6) puma (5.2.2) @@ -197,8 +200,8 @@ GEM will_paginate (3.3.0) PLATFORMS - ruby x86_64-darwin-19 + x86_64-linux DEPENDENCIES annotate From e1daf94d7afa7894f48f0985de48d14c69d5c9cd Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 15 Mar 2021 11:28:57 +0100 Subject: [PATCH 23/36] Check for link parameter --- app/controllers/links_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/links_controller.rb b/app/controllers/links_controller.rb index fcda4e2..78c5496 100644 --- a/app/controllers/links_controller.rb +++ b/app/controllers/links_controller.rb @@ -13,7 +13,7 @@ def show end def new - return unless params.member? :link + return unless params.key? :link @relevant_links = Link .levenshtein_distances(link_params[:shortlink]) From 04c83b27338f448a0b6e42c9374f8a027de08920 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 15 Mar 2021 11:32:09 +0100 Subject: [PATCH 24/36] Ignore files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 65e6478..02770c6 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ .idea/.generators .DS_Store *.pem +public/assets/* +vendor/bundle/* From 11a3167aa5e85bcdb995c4569d5a1a56a1adef84 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 15 Mar 2021 12:50:04 +0100 Subject: [PATCH 25/36] Serve digest version of assets --- config/initializers/assets.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 01ef3e6..cbdb65b 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -3,6 +3,9 @@ # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0' +# Serve digest version of assets +Rails.application.config.assets.digest = true + # Add additional assets to the asset load path # Rails.application.config.assets.paths << Emoji.images_path From eccfbcd1755b3f83cdea14490205c9db9ededc2f Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 15 Mar 2021 12:51:07 +0100 Subject: [PATCH 26/36] Update .gitignore --- .gitignore | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 02770c6..7fecfae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,24 @@ -# See https://help.github.com/articles/ignoring-files for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile '~/.gitignore_global' - -# Ignore bundler config. -/.bundle - -# Ignore the default SQLite database. -/db/*.sqlite3 -/db/*.sqlite3-journal - -# Ignore all logfiles and tempfiles. -/log/* -!/log/.keep -/tmp -/.idea/* -.idea/.generators -.DS_Store +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-journal + +# Ignore all logfiles and tempfiles. +/log/* +!/log/.keep +/tmp +/.idea/* +.idea/.generators +.DS_Store *.pem -public/assets/* -vendor/bundle/* +public/assets/* +vendor/bundle/* +linkhack.pid From 4c5304ca88364605299ebe03c2f4b37ddf3808ba Mon Sep 17 00:00:00 2001 From: Alexandra Khegay Date: Wed, 5 May 2021 14:21:01 +0200 Subject: [PATCH 27/36] update mimemagic gem --- Gemfile.lock | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c81ad27..f1ba816 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,6 +81,7 @@ GEM levenshtein-ffi (1.1.0) ffi (~> 1.9) libv8 (8.4.255.0-x86_64-darwin-19) + libv8 (8.4.255.0-x86_64-darwin-20) libv8 (8.4.255.0-x86_64-linux) loofah (2.9.0) crass (~> 1.0.2) @@ -90,7 +91,9 @@ GEM marcel (0.3.3) mimemagic (~> 0.3.2) method_source (1.0.0) - mimemagic (0.3.5) + mimemagic (0.3.10) + nokogiri (~> 1) + rake mini_mime (1.0.2) mini_racer (0.3.1) libv8 (~> 8.4.255) @@ -201,6 +204,7 @@ GEM PLATFORMS x86_64-darwin-19 + x86_64-darwin-20 x86_64-linux DEPENDENCIES @@ -228,4 +232,4 @@ DEPENDENCIES will_paginate BUNDLED WITH - 2.2.2 + 2.2.15 From a69c707a8834bd7dd26b7c80f04f5fa7cb33e28f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 May 2021 01:52:37 +0000 Subject: [PATCH 28/36] Bump puma from 5.2.2 to 5.3.1 Bumps [puma](https://github.com/puma/puma) from 5.2.2 to 5.3.1. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v5.2.2...v5.3.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index f1ba816..76bbc0d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -104,7 +104,7 @@ GEM nokogiri (1.11.2-x86_64-linux) racc (~> 1.4) public_suffix (4.0.6) - puma (5.2.2) + puma (5.3.1) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) From d3c4dc6f11bcd53bd0db040093cf60ab0817e1d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Mar 2022 21:58:47 +0000 Subject: [PATCH 29/36] Bump puma from 5.3.1 to 5.6.4 Bumps [puma](https://github.com/puma/puma) from 5.3.1 to 5.6.4. - [Release notes](https://github.com/puma/puma/releases) - [Changelog](https://github.com/puma/puma/blob/master/History.md) - [Commits](https://github.com/puma/puma/compare/v5.3.1...v5.6.4) --- updated-dependencies: - dependency-name: puma dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 76bbc0d..80f7e0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,13 +98,13 @@ GEM mini_racer (0.3.1) libv8 (~> 8.4.255) minitest (5.14.4) - nio4r (2.5.7) + nio4r (2.5.8) nokogiri (1.11.2-x86_64-darwin) racc (~> 1.4) nokogiri (1.11.2-x86_64-linux) racc (~> 1.4) public_suffix (4.0.6) - puma (5.3.1) + puma (5.6.4) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) From acb5e7391c3fb44bd7bbc0976fa3dd21a184903d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 16:59:14 +0000 Subject: [PATCH 30/36] Bump rack from 2.2.3 to 2.2.3.1 Bumps [rack](https://github.com/rack/rack) from 2.2.3 to 2.2.3.1. - [Release notes](https://github.com/rack/rack/releases) - [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md) - [Commits](https://github.com/rack/rack/compare/2.2.3...2.2.3.1) --- updated-dependencies: - dependency-name: rack dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 76bbc0d..456c1ba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,7 +107,7 @@ GEM puma (5.3.1) nio4r (~> 2.0) racc (1.5.2) - rack (2.2.3) + rack (2.2.3.1) rack-cors (1.1.1) rack (>= 2.0.0) rack-test (1.1.0) From d1013fede664b270cf3459e4c0b9308901eaf26d Mon Sep 17 00:00:00 2001 From: Carlo Mencarelli Date: Thu, 16 Feb 2023 15:11:23 -0700 Subject: [PATCH 31/36] Initial ruby upgrade --- .browserslistrc | 1 + .gitignore | 7 + .ruby-version | 1 + Gemfile | 17 +- Gemfile.lock | 249 ++++++++++-------- app/javascript/packs/application.js | 18 ++ app/models/link.rb | 1 - app/views/layouts/application.html.erb | 4 +- app/views/links/edit.html.erb | 2 +- app/views/links/new.html.erb | 5 +- babel.config.js | 82 ++++++ bin/rails | 4 +- bin/rake | 4 +- bin/setup | 15 +- bin/spring | 17 -- bin/webpack | 18 ++ bin/webpack-dev-server | 18 ++ config.ru | 1 + config/application.rb | 22 +- config/boot.rb | 2 +- config/cable.yml | 5 +- config/environment.rb | 2 +- config/environments/development.rb | 19 +- config/environments/production.rb | 60 ++++- config/environments/test.rb | 31 ++- config/initializers/assets.rb | 10 +- config/initializers/backtrace_silencers.rb | 7 +- .../initializers/content_security_policy.rb | 28 ++ .../initializers/filter_parameter_logging.rb | 4 +- .../new_framework_defaults_6_1.rb | 67 +++++ config/initializers/permissions_policy.rb | 11 + config/locales/en.yml | 12 +- config/puma.rb | 38 ++- config/storage.yml | 34 +++ config/webpack/development.js | 5 + config/webpack/environment.js | 3 + config/webpack/production.js | 5 + config/webpack/test.js | 5 + config/webpacker.yml | 92 +++++++ ..._to_active_storage_blobs.active_storage.rb | 22 ++ ..._storage_variant_records.active_storage.rb | 27 ++ db/schema.rb | 26 +- postcss.config.js | 12 + 43 files changed, 784 insertions(+), 229 deletions(-) create mode 100644 .browserslistrc create mode 100644 .ruby-version create mode 100644 app/javascript/packs/application.js create mode 100644 babel.config.js delete mode 100755 bin/spring create mode 100755 bin/webpack create mode 100755 bin/webpack-dev-server create mode 100644 config/initializers/content_security_policy.rb create mode 100644 config/initializers/new_framework_defaults_6_1.rb create mode 100644 config/initializers/permissions_policy.rb create mode 100644 config/storage.yml create mode 100644 config/webpack/development.js create mode 100644 config/webpack/environment.js create mode 100644 config/webpack/production.js create mode 100644 config/webpack/test.js create mode 100644 config/webpacker.yml create mode 100644 db/migrate/20230216012537_add_service_name_to_active_storage_blobs.active_storage.rb create mode 100644 db/migrate/20230216012538_create_active_storage_variant_records.active_storage.rb create mode 100644 postcss.config.js diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..e94f814 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1 @@ +defaults diff --git a/.gitignore b/.gitignore index 7fecfae..1af0556 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,10 @@ public/assets/* vendor/bundle/* linkhack.pid + +/public/packs +/public/packs-test +/node_modules +/yarn-error.log +yarn-debug.log* +.yarn-integrity diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..a4f52a5 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.0 \ No newline at end of file diff --git a/Gemfile b/Gemfile index d3f1fef..803692d 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,9 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '= 5.2.4.5' +gem 'rails', '~> 6.0' # Use sqlite3 as the database for Active Record -gem 'sqlite3', '~> 1.3.13' +gem 'sqlite3', '~> 1.6' # Use SCSS for stylesheets gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets @@ -14,29 +14,28 @@ gem 'coffee-rails' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', platforms: :ruby -gem 'levenshtein-ffi', :require => 'levenshtein' - # Add URL validation gem 'validate_url' +gem "webpacker" + gem 'rack-cors', :require => 'rack/cors' # Use jquery as the JavaScript library gem 'jquery-rails' -# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks -gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates the API under doc/api. -gem 'sdoc', '~> 0.4.0', group: :doc +gem 'sdoc', '~> 2.6', group: :doc gem 'bootstrap-sass' gem 'autoprefixer-rails' -gem 'mini_racer' +gem 'mini_racer', '~> 0.6.3' gem 'will_paginate' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' -gem 'puma' +gem 'puma', '~> 6.1' +gem 'listen', '~> 3.8' # Use Unicorn as the app server # gem 'unicorn' diff --git a/Gemfile.lock b/Gemfile.lock index 6a61bb1..1a90ff9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,51 +1,68 @@ GEM remote: https://rubygems.org/ specs: - actioncable (5.2.4.5) - actionpack (= 5.2.4.5) + actioncable (6.1.7.2) + actionpack (= 6.1.7.2) + activesupport (= 6.1.7.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.4.5) - actionpack (= 5.2.4.5) - actionview (= 5.2.4.5) - activejob (= 5.2.4.5) + actionmailbox (6.1.7.2) + actionpack (= 6.1.7.2) + activejob (= 6.1.7.2) + activerecord (= 6.1.7.2) + activestorage (= 6.1.7.2) + activesupport (= 6.1.7.2) + mail (>= 2.7.1) + actionmailer (6.1.7.2) + actionpack (= 6.1.7.2) + actionview (= 6.1.7.2) + activejob (= 6.1.7.2) + activesupport (= 6.1.7.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.4.5) - actionview (= 5.2.4.5) - activesupport (= 5.2.4.5) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.7.2) + actionview (= 6.1.7.2) + activesupport (= 6.1.7.2) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.5) - activesupport (= 5.2.4.5) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.7.2) + actionpack (= 6.1.7.2) + activerecord (= 6.1.7.2) + activestorage (= 6.1.7.2) + activesupport (= 6.1.7.2) + nokogiri (>= 1.8.5) + actionview (6.1.7.2) + activesupport (= 6.1.7.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.4.5) - activesupport (= 5.2.4.5) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.7.2) + activesupport (= 6.1.7.2) globalid (>= 0.3.6) - activemodel (5.2.4.5) - activesupport (= 5.2.4.5) - activerecord (5.2.4.5) - activemodel (= 5.2.4.5) - activesupport (= 5.2.4.5) - arel (>= 9.0) - activestorage (5.2.4.5) - actionpack (= 5.2.4.5) - activerecord (= 5.2.4.5) - marcel (~> 0.3.1) - activesupport (5.2.4.5) + activemodel (6.1.7.2) + activesupport (= 6.1.7.2) + activerecord (6.1.7.2) + activemodel (= 6.1.7.2) + activesupport (= 6.1.7.2) + activestorage (6.1.7.2) + actionpack (= 6.1.7.2) + activejob (= 6.1.7.2) + activerecord (= 6.1.7.2) + activesupport (= 6.1.7.2) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) annotate (3.1.1) activerecord (>= 3.2, < 7.0) rake (>= 10.4, < 14.0) - arel (9.0.0) autoprefixer-rails (10.2.4.0) execjs bindex (0.8.1) @@ -61,15 +78,16 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.2.0) crass (1.0.6) + date (3.3.3) diff-lcs (1.4.4) - erubi (1.10.0) + erubi (1.12.0) execjs (2.7.0) ffi (1.15.0) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.8.9) + globalid (1.1.0) + activesupport (>= 5.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) jbuilder (2.11.2) activesupport (>= 5.0.0) @@ -77,70 +95,88 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.6) - levenshtein-ffi (1.1.0) - ffi (~> 1.9) - libv8 (8.4.255.0-x86_64-darwin-19) - libv8 (8.4.255.0-x86_64-darwin-20) - libv8 (8.4.255.0-x86_64-linux) - loofah (2.9.0) + libv8-node (16.10.0.0-arm64-darwin) + libv8-node (16.10.0.0-x86_64-darwin) + libv8-node (16.10.0.0-x86_64-darwin-19) + libv8-node (16.10.0.0-x86_64-linux) + 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) - marcel (0.3.3) - mimemagic (~> 0.3.2) + net-imap + net-pop + net-smtp + marcel (1.0.2) method_source (1.0.0) - mimemagic (0.3.10) - nokogiri (~> 1) - rake - mini_mime (1.0.2) - mini_racer (0.3.1) - libv8 (~> 8.4.255) - minitest (5.14.4) + mini_mime (1.1.2) + mini_racer (0.6.3) + libv8-node (~> 16.10.0.0) + minitest (5.17.0) + net-imap (0.3.4) + date + net-protocol + 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.11.2-x86_64-darwin) + nokogiri (1.14.2-arm64-darwin) racc (~> 1.4) - nokogiri (1.11.2-x86_64-linux) + nokogiri (1.14.2-x86_64-darwin) racc (~> 1.4) + nokogiri (1.14.2-x86_64-linux) + racc (~> 1.4) + psych (5.1.0) + stringio public_suffix (4.0.6) - puma (5.6.4) + puma (6.1.0) nio4r (~> 2.0) - racc (1.5.2) - rack (2.2.3.1) + racc (1.6.2) + rack (2.2.6.2) rack-cors (1.1.1) rack (>= 2.0.0) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.4.5) - actioncable (= 5.2.4.5) - actionmailer (= 5.2.4.5) - actionpack (= 5.2.4.5) - actionview (= 5.2.4.5) - activejob (= 5.2.4.5) - activemodel (= 5.2.4.5) - activerecord (= 5.2.4.5) - activestorage (= 5.2.4.5) - activesupport (= 5.2.4.5) - bundler (>= 1.3.0) - railties (= 5.2.4.5) + rack-proxy (0.7.6) + rack + rack-test (2.0.2) + rack (>= 1.3) + rails (6.1.7.2) + actioncable (= 6.1.7.2) + actionmailbox (= 6.1.7.2) + actionmailer (= 6.1.7.2) + actionpack (= 6.1.7.2) + actiontext (= 6.1.7.2) + actionview (= 6.1.7.2) + activejob (= 6.1.7.2) + activemodel (= 6.1.7.2) + activerecord (= 6.1.7.2) + activestorage (= 6.1.7.2) + activesupport (= 6.1.7.2) + bundler (>= 1.15.0) + railties (= 6.1.7.2) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) - railties (5.2.4.5) - actionpack (= 5.2.4.5) - activesupport (= 5.2.4.5) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) + railties (6.1.7.2) + actionpack (= 6.1.7.2) + activesupport (= 6.1.7.2) method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rake (13.0.3) + rake (>= 12.2) + thor (~> 1.0) + rake (13.0.6) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - rdoc (4.3.0) + rdoc (6.5.0) + psych (>= 4.0.0) rspec (3.10.0) rspec-core (~> 3.10.0) rspec-expectations (~> 3.10.0) @@ -167,26 +203,26 @@ GEM tilt (>= 1.1, < 3) sassc (2.4.0) ffi (~> 1.9) - sdoc (0.4.2) - json (~> 1.7, >= 1.7.7) - rdoc (~> 4.0) + sdoc (2.6.1) + rdoc (>= 5.0) + semantic_range (3.0.0) spring (2.1.1) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.3.13) - thor (1.1.0) - thread_safe (0.3.6) + sqlite3 (1.6.0-arm64-darwin) + sqlite3 (1.6.0-x86_64-darwin) + sqlite3 (1.6.0-x86_64-linux) + stringio (3.0.5) + thor (1.2.1) tilt (2.0.10) - turbolinks (5.2.1) - turbolinks-source (~> 5.2) - turbolinks-source (5.2.0) - tzinfo (1.2.9) - thread_safe (~> 0.1) + timeout (0.3.1) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) validate_url (1.0.13) @@ -197,12 +233,19 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - websocket-driver (0.7.3) + webpacker (5.4.4) + activesupport (>= 5.2) + rack-proxy (>= 0.6.1) + railties (>= 5.2) + semantic_range (>= 2.3.0) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) will_paginate (3.3.0) + zeitwerk (2.6.7) PLATFORMS + arm64-darwin-22 x86_64-darwin-19 x86_64-darwin-20 x86_64-linux @@ -215,20 +258,20 @@ DEPENDENCIES coffee-rails jbuilder (~> 2.0) jquery-rails - levenshtein-ffi - mini_racer - puma + listen (~> 3.8) + mini_racer (~> 0.6.3) + puma (~> 6.1) rack-cors - rails (= 5.2.4.5) + rails (~> 6.0) rspec sass-rails (~> 5.0) - sdoc (~> 0.4.0) + sdoc (~> 2.6) spring - sqlite3 (~> 1.3.13) - turbolinks + sqlite3 (~> 1.6) uglifier (>= 1.3.0) validate_url web-console + webpacker will_paginate BUNDLED WITH diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js new file mode 100644 index 0000000..7c3021d --- /dev/null +++ b/app/javascript/packs/application.js @@ -0,0 +1,18 @@ +/* eslint no-console:0 */ +// This file is automatically compiled by Webpack, along with any other files +// present in this directory. You're encouraged to place your actual application logic in +// a relevant structure within app/javascript and only use these pack files to reference +// that code so it'll be compiled. +// +// To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate +// layout file, like app/views/layouts/application.html.erb + + +// Uncomment to copy all static images under ../images to the output folder and reference +// them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) +// or the `imagePath` JavaScript helper below. +// +// const images = require.context('../images', true) +// const imagePath = (name) => images(name, true) + +console.log('Hello World from Webpacker') diff --git a/app/models/link.rb b/app/models/link.rb index 2a43e7a..2330c34 100644 --- a/app/models/link.rb +++ b/app/models/link.rb @@ -1,5 +1,4 @@ require 'uri' -require 'levenshtein' class Link < ActiveRecord::Base validates :shortlink, presence: true, uniqueness: true diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 20a167e..c537e79 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -2,8 +2,8 @@ Linkhack - <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> - <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> + <%= stylesheet_link_tag 'application', media: 'all' %> + <%= javascript_include_tag 'application' %> <%= csrf_meta_tags %> diff --git a/app/views/links/edit.html.erb b/app/views/links/edit.html.erb index 4bdfc69..5f5303d 100644 --- a/app/views/links/edit.html.erb +++ b/app/views/links/edit.html.erb @@ -8,7 +8,7 @@ <% end %>
- <%= form_for :link, url: link_path(@link), method: :patch do |l| %> + <%= form_with :link, url: link_path(@link), method: :patch do |l| %>
<% if @link.type %>Yes<% else %>No<% end %> diff --git a/app/views/links/new.html.erb b/app/views/links/new.html.erb index f34a690..c0b34c0 100644 --- a/app/views/links/new.html.erb +++ b/app/views/links/new.html.erb @@ -1,4 +1,5 @@

Create a new ShortLink!

+<%= debug @link %> <% if @link && @link.errors.any? %>

@@ -37,7 +38,7 @@