From 7d2fc891b1810111688cbed3ce6d7cda406e3ed2 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 30 Dec 2013 08:41:18 -0700 Subject: [PATCH 01/90] Updated gems --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c8cc0411b..a6b282644 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM thread_safe (~> 0.1) tzinfo (~> 0.3.37) atomic (1.1.14) - backports (3.3.5) + backports (3.4.0) bcrypt-ruby (3.1.2) builder (3.1.4) byebug (2.5.0) @@ -86,7 +86,7 @@ GEM coderay (~> 1.0) method_source (~> 0.8) slop (~> 3.4) - pry-byebug (1.2.0) + pry-byebug (1.2.1) byebug (~> 2.2) pry (~> 0.9.12) rack (1.5.2) From 111a8d1602f5820d6eccb43c6aec297fcce3cd6d Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 30 Dec 2013 09:07:13 -0700 Subject: [PATCH 02/90] Switch from unicorn to puma --- Gemfile | 2 +- Gemfile.lock | 10 +++------- Procfile | 2 +- config/puma.rb | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 config/puma.rb diff --git a/Gemfile b/Gemfile index ad432f1ee..4b13d0157 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" group :production do gem "pg", "~> 0.17.1" - gem "unicorn", "~> 4.7" + gem "puma", "~> 2.7", ">= 2.7.1" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index a6b282644..12b5badc0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,7 +72,6 @@ GEM hpricot (0.8.6) i18n (0.6.9) jsmin (1.0.1) - kgio (2.8.1) method_source (0.8.2) mime-types (2.0) mini_portile (0.5.2) @@ -89,6 +88,8 @@ GEM pry-byebug (1.2.1) byebug (~> 2.2) pry (~> 0.9.12) + puma (2.7.1) + rack (>= 1.1, < 2.0) rack (1.5.2) rack-protection (1.5.1) rack @@ -97,7 +98,6 @@ GEM racksh (1.0.0) rack (>= 1.0) rack-test (>= 0.5) - raindrops (0.12.0) rake (10.1.1) rendezvous (0.0.2) rest-client (1.6.7) @@ -154,10 +154,6 @@ GEM tilt (1.4.1) tins (0.13.1) tzinfo (0.3.38) - unicorn (4.7.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) will_paginate (3.0.5) PLATFORMS @@ -183,6 +179,7 @@ DEPENDENCIES nokogiri (~> 1.6) pg (~> 0.17.1) pry-byebug (~> 1.2) + puma (~> 2.7, >= 2.7.1) rack-test (~> 0.6.2) racksh (~> 1.0) rake (~> 10.1, >= 10.1.1) @@ -197,5 +194,4 @@ DEPENDENCIES sinatra-flash (~> 0.3.0) sqlite3 (~> 1.3, >= 1.3.8) thread (~> 0.1.3) - unicorn (~> 4.7) will_paginate (~> 3.0, >= 3.0.5) diff --git a/Procfile b/Procfile index dfa2ae6e9..17a0dbe2c 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb +web: bundle exec puma -C ./config/puma.rb console: bundle exec racksh diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..18cb952df --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,18 @@ +@delayed_job_pid=nil +environment=ENV['RACK_ENV'] || 'development' +db_pool=(ENV['DB_POOL']||4).to_i +threads 1,db_pool +bind "tcp://0.0.0.0:#{ENV['PORT']||9292}" + +on_restart do + # the following is highly recommended for Rails + "preload_app true" + # as there's no need for the master process to hold a connection + defined?(ActiveRecord::Base) and + ActiveRecord::Base.connection.disconnect! + + @delayed_job_pid ||= spawn("bundle exec rake work_jobs") + + sleep 1 +end + + From 8ad38f114df208fe8367b61f4724b2d7c53cdd87 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 30 Dec 2013 08:41:18 -0700 Subject: [PATCH 03/90] Updated gems --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index c8cc0411b..a6b282644 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,7 +31,7 @@ GEM thread_safe (~> 0.1) tzinfo (~> 0.3.37) atomic (1.1.14) - backports (3.3.5) + backports (3.4.0) bcrypt-ruby (3.1.2) builder (3.1.4) byebug (2.5.0) @@ -86,7 +86,7 @@ GEM coderay (~> 1.0) method_source (~> 0.8) slop (~> 3.4) - pry-byebug (1.2.0) + pry-byebug (1.2.1) byebug (~> 2.2) pry (~> 0.9.12) rack (1.5.2) From 62fc03e2be0f561214e0caf3aa96afb5db143175 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 30 Dec 2013 09:07:13 -0700 Subject: [PATCH 04/90] Switch from unicorn to puma --- Gemfile | 2 +- Gemfile.lock | 10 +++------- Procfile | 2 +- config/puma.rb | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 config/puma.rb diff --git a/Gemfile b/Gemfile index 0b219450c..28b5249fe 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" group :production do gem "pg", "~> 0.17.1" - gem "unicorn", "~> 4.7" + gem "puma", "~> 2.7", ">= 2.7.1" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index a6b282644..12b5badc0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,7 +72,6 @@ GEM hpricot (0.8.6) i18n (0.6.9) jsmin (1.0.1) - kgio (2.8.1) method_source (0.8.2) mime-types (2.0) mini_portile (0.5.2) @@ -89,6 +88,8 @@ GEM pry-byebug (1.2.1) byebug (~> 2.2) pry (~> 0.9.12) + puma (2.7.1) + rack (>= 1.1, < 2.0) rack (1.5.2) rack-protection (1.5.1) rack @@ -97,7 +98,6 @@ GEM racksh (1.0.0) rack (>= 1.0) rack-test (>= 0.5) - raindrops (0.12.0) rake (10.1.1) rendezvous (0.0.2) rest-client (1.6.7) @@ -154,10 +154,6 @@ GEM tilt (1.4.1) tins (0.13.1) tzinfo (0.3.38) - unicorn (4.7.0) - kgio (~> 2.6) - rack - raindrops (~> 0.7) will_paginate (3.0.5) PLATFORMS @@ -183,6 +179,7 @@ DEPENDENCIES nokogiri (~> 1.6) pg (~> 0.17.1) pry-byebug (~> 1.2) + puma (~> 2.7, >= 2.7.1) rack-test (~> 0.6.2) racksh (~> 1.0) rake (~> 10.1, >= 10.1.1) @@ -197,5 +194,4 @@ DEPENDENCIES sinatra-flash (~> 0.3.0) sqlite3 (~> 1.3, >= 1.3.8) thread (~> 0.1.3) - unicorn (~> 4.7) will_paginate (~> 3.0, >= 3.0.5) diff --git a/Procfile b/Procfile index dfa2ae6e9..17a0dbe2c 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,2 @@ -web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb +web: bundle exec puma -C ./config/puma.rb console: bundle exec racksh diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..18cb952df --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,18 @@ +@delayed_job_pid=nil +environment=ENV['RACK_ENV'] || 'development' +db_pool=(ENV['DB_POOL']||4).to_i +threads 1,db_pool +bind "tcp://0.0.0.0:#{ENV['PORT']||9292}" + +on_restart do + # the following is highly recommended for Rails + "preload_app true" + # as there's no need for the master process to hold a connection + defined?(ActiveRecord::Base) and + ActiveRecord::Base.connection.disconnect! + + @delayed_job_pid ||= spawn("bundle exec rake work_jobs") + + sleep 1 +end + + From 8186c80db5dd5af50ec2d00e6be2ef0116f4ee2f Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 2 Jan 2014 22:25:06 -0700 Subject: [PATCH 05/90] New Gems --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 28b5249fe..4b13d0157 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "2.0.0" +ruby "2.1.0" source "https://rubygems.org" group :production do From a65402caf6e58ea1bf8d597f428e94c1a3776ddd Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 6 Jan 2014 11:30:18 -0700 Subject: [PATCH 06/90] Added delayed job worker to procfile --- Procfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Procfile b/Procfile index 17a0dbe2c..eec73ab6c 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,3 @@ web: bundle exec puma -C ./config/puma.rb +worker: bundle exec rake jobs:work console: bundle exec racksh From 3aa976f821c4c111129cd41ae42797bb963f0630 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 7 Jan 2014 23:12:41 -0700 Subject: [PATCH 07/90] Upgrade feedzirra to 0.7.0 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 4b13d0157..01dfe654f 100644 --- a/Gemfile +++ b/Gemfile @@ -35,7 +35,7 @@ gem "bcrypt-ruby", "~> 3.1.2" gem "delayed_job", "~> 4.0" gem "delayed_job_active_record", "~> 4.0" gem "feedbag", "~> 0.9.2" -gem "feedzirra", "~> 0.6.0" +gem "feedzirra", "~> 0.7.0" gem "highline", "~> 1.6", ">= 1.6.20", require: false gem "i18n", "~> 0.6.9" gem "loofah", github: "swanson/loofah" diff --git a/Gemfile.lock b/Gemfile.lock index 12b5badc0..f6ec91ee0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -60,7 +60,7 @@ GEM i18n (~> 0.5) feedbag (0.9.2) hpricot (>= 0.6) - feedzirra (0.6.0) + feedzirra (0.7.0) curb (~> 0.8.1) loofah (~> 1.2.1) sax-machine (~> 0.2.1) @@ -169,7 +169,7 @@ DEPENDENCIES excon (~> 0.31.0) faker (~> 1.2) feedbag (~> 0.9.2) - feedzirra (~> 0.6.0) + feedzirra (~> 0.7.0) foreman (~> 0.63.0) formatador (~> 0.2.4) highline (~> 1.6, >= 1.6.20) From 1fbc45c065776640cd27c3becf6b43ccd47f60a7 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 4 May 2014 13:28:11 -0600 Subject: [PATCH 08/90] Update dependencies --- Gemfile | 2 +- Gemfile.lock | 108 ++++++++++++++++++++++++++------------------------- 2 files changed, 56 insertions(+), 54 deletions(-) diff --git a/Gemfile b/Gemfile index 6e1a3cd7d..203854ead 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "2.1.0" +ruby "2.1.1" source "https://rubygems.org" group :production do diff --git a/Gemfile.lock b/Gemfile.lock index 113654c72..f9f18b2f0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: git://github.com/rails/arel.git - revision: 454a25f18c95cdfba5520a6fc5bdb6d476e20a85 + revision: e6285641b11e0dd060b6d8880a5be1c369b89658 branch: 4-0-stable specs: - arel (4.0.1.20131022201058) + arel (4.0.2.20140205180311) GIT remote: git://github.com/swanson/loofah.git @@ -15,30 +15,31 @@ GIT GEM remote: https://rubygems.org/ specs: - activemodel (4.0.2) - activesupport (= 4.0.2) + activemodel (4.0.4) + activesupport (= 4.0.4) builder (~> 3.1.0) - activerecord (4.0.2) - activemodel (= 4.0.2) + activerecord (4.0.4) + activemodel (= 4.0.4) activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.2) + activesupport (= 4.0.4) arel (~> 4.0.0) activerecord-deprecated_finders (1.0.3) - activesupport (4.0.2) - i18n (~> 0.6, >= 0.6.4) + activesupport (4.0.4) + i18n (~> 0.6, >= 0.6.9) minitest (~> 4.2) multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - atomic (1.1.14) - backports (3.4.0) - bcrypt-ruby (3.1.2) + backports (3.6.0) + bcrypt (3.1.7) + bcrypt-ruby (3.1.5) + bcrypt (>= 3.1.3) builder (3.1.4) - byebug (2.5.0) - columnize (~> 0.3.6) - debugger-linecache (~> 1.2.0) + byebug (2.7.0) + columnize (~> 0.3) + debugger-linecache (~> 1.2) coderay (1.1.0) - columnize (0.3.6) + columnize (0.8.9) coveralls (0.7.0) multi_json (~> 1.3) rest-client @@ -47,16 +48,18 @@ GEM thor curb (0.8.5) debugger-linecache (1.2.0) - delayed_job (4.0.0) - activesupport (>= 3.0, < 4.1) - delayed_job_active_record (4.0.0) - activerecord (>= 3.0, < 4.1) + delayed_job (4.0.1) + activesupport (>= 3.0, < 4.2) + delayed_job_active_record (4.0.1) + activerecord (>= 3.0, < 4.2) delayed_job (>= 3.0, < 4.1) diff-lcs (1.2.5) - docile (1.1.1) - dotenv (0.9.0) + docile (1.1.3) + dotenv (0.11.1) + dotenv-deployment (~> 0.0.2) + dotenv-deployment (0.0.2) excon (0.31.0) - faker (1.2.0) + faker (1.3.0) i18n (~> 0.5) feedbag (0.9.2) hpricot (>= 0.6) @@ -68,37 +71,37 @@ GEM dotenv (>= 0.7) thor (>= 0.13.6) formatador (0.2.4) - highline (1.6.20) + highline (1.6.21) hpricot (0.8.6) i18n (0.6.9) jsmin (1.0.1) method_source (0.8.2) - mime-types (2.0) - mini_portile (0.5.2) + mime-types (2.2) + mini_portile (0.5.3) minitest (4.7.5) - multi_json (1.8.2) + multi_json (1.9.3) netrc (0.7.7) nokogiri (1.6.1) mini_portile (~> 0.5.0) pg (0.17.1) - pry (0.9.12.4) + pry (0.9.12.6) coderay (~> 1.0) method_source (~> 0.8) slop (~> 3.4) - pry-byebug (1.2.1) - byebug (~> 2.2) + pry-byebug (1.3.2) + byebug (~> 2.7) pry (~> 0.9.12) - puma (2.7.1) + puma (2.8.2) rack (>= 1.1, < 2.0) rack (1.5.2) - rack-protection (1.5.1) + rack-protection (1.5.3) rack rack-test (0.6.2) rack (>= 1.0) racksh (1.0.0) rack (>= 1.0) rack-test (>= 0.5) - rake (10.1.1) + rake (10.3.1) rendezvous (0.0.2) rest-client (1.6.7) mime-types (>= 1.16) @@ -106,13 +109,13 @@ GEM rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) - rspec-core (2.14.7) - rspec-expectations (2.14.4) + rspec-core (2.14.8) + rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) - rspec-html-matchers (0.4.3) - nokogiri (>= 1.4.4) - rspec (>= 2.0.0) - rspec-mocks (2.14.4) + rspec-html-matchers (0.4.4) + nokogiri (~> 1) + rspec (~> 2, >= 2.11.0) + rspec-mocks (2.14.6) sax-machine (0.2.1) nokogiri (~> 1.6.0) shotgun (0.9) @@ -122,18 +125,18 @@ GEM multi_json simplecov-html (~> 0.8.0) simplecov-html (0.8.0) - sinatra (1.4.4) + sinatra (1.4.5) rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) - sinatra-activerecord (1.2.3) + sinatra-activerecord (1.7.0) activerecord (>= 3.0) sinatra (~> 1.0) - sinatra-assetpack (0.3.1) + sinatra-assetpack (0.3.3) jsmin rack-test sinatra - tilt (>= 1.3.0) + tilt (>= 1.3.0, < 2.0) sinatra-contrib (1.4.2) backports (>= 2.0) multi_json @@ -143,17 +146,16 @@ GEM tilt (~> 1.3) sinatra-flash (0.3.0) sinatra (>= 1.0.0) - slop (3.4.7) - sqlite3 (1.3.8) - term-ansicolor (1.2.2) - tins (~> 0.8) - thor (0.18.1) - thread (0.1.3) - thread_safe (0.1.3) - atomic + slop (3.5.0) + sqlite3 (1.3.9) + term-ansicolor (1.3.0) + tins (~> 1.0) + thor (0.19.1) + thread (0.1.4) + thread_safe (0.3.3) tilt (1.4.1) - tins (0.13.1) - tzinfo (0.3.38) + tins (1.1.0) + tzinfo (0.3.39) will_paginate (3.0.5) PLATFORMS From 40424c526d64411a084a3255cc968b280aff97ce Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 4 May 2014 13:44:55 -0600 Subject: [PATCH 09/90] Latest and greatest gems --- Gemfile | 39 ++++++++++----------- Gemfile.lock | 98 ++++++++++++++++++++++++---------------------------- 2 files changed, 64 insertions(+), 73 deletions(-) diff --git a/Gemfile b/Gemfile index 203854ead..286327dd3 100644 --- a/Gemfile +++ b/Gemfile @@ -3,49 +3,48 @@ source "https://rubygems.org" group :production do gem "pg", "~> 0.17.1" - gem "puma", "~> 2.7", ">= 2.7.1" + gem "puma", "~> 2.8", ">= 2.8.2" end group :development do - gem "sqlite3", "~> 1.3", ">= 1.3.8" + gem "sqlite3", ">= 1.3", ">= 1.3.9" end group :development, :test do gem "coveralls", "~> 0.7", require: false - gem "faker", "~> 1.2" - gem "foreman", "~> 0.63.0" - gem "pry-byebug", "~> 1.2" + gem "faker", "~> 1.3" + gem "foreman", "~> 0.67.0" + gem "pry-byebug", "~> 1.3", ">= 1.3.2" gem "rack-test", "~> 0.6.2" - gem "rspec", "~> 2.14", ">= 2.14.1" - gem "rspec-html-matchers", "~> 0.4.3" - gem "shotgun", "~> 0.9.0" + gem "rspec", ">= 2.14", ">= 2.14.1" + gem "rspec-html-matchers", "~> 0.5" + gem "shotgun", "~> 0.9" end group :heroku do - gem "excon", "~> 0.31.0" + gem "excon", "~> 0.33" gem "formatador", "~> 0.2.4" gem "netrc", "~> 0.7.7" gem "rendezvous", "~> 0.0.2" end -gem "activerecord", "~> 4.0" -# need to work around bug in 4.0.1 https://github.com/rails/arel/pull/216 -gem 'arel', git: 'git://github.com/rails/arel.git', branch: '4-0-stable' -gem "bcrypt-ruby", "~> 3.1.2" +gem "activerecord", "~> 4.1" +gem "arel", "~> 5.0.1" +gem "bcrypt-ruby", "~> 3.1.5" gem "delayed_job", "~> 4.0" gem "delayed_job_active_record", "~> 4.0" gem "feedbag", "~> 0.9.2" gem "feedjira", "~> 1.2.0" -gem "highline", "~> 1.6", ">= 1.6.20", require: false +gem "highline", ">= 1.6", ">= 1.6.21", require: false gem "i18n", "~> 0.6.9" gem "loofah", github: "swanson/loofah" gem "nokogiri", "~> 1.6" gem "racksh", "~> 1.0" -gem "rake", "~> 10.1", ">= 10.1.1" -gem "sinatra", "~> 1.4", ">= 1.4.4" -gem "sinatra-assetpack", "~> 0.3.1", require: "sinatra/assetpack" -gem "sinatra-activerecord", "~> 1.2", ">= 1.2.3" -gem "sinatra-contrib", ">= 1.4.2" +gem "rake", "~> 10.3", ">= 10.3.1" +gem "sinatra", "~> 1.4", ">= 1.4.5" +gem "sinatra-assetpack", "~> 0.3.3", require: "sinatra/assetpack" +gem "sinatra-activerecord", "~> 2.0", ">= 2.0.1" +gem "sinatra-contrib", "~> 1.4.2" gem "sinatra-flash", "~> 0.3.0" -gem "thread", "~> 0.1.3" +gem "thread", "~> 0.1.4" gem "will_paginate", "~> 3.0", ">= 3.0.5" diff --git a/Gemfile.lock b/Gemfile.lock index f9f18b2f0..18b73ca68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,3 @@ -GIT - remote: git://github.com/rails/arel.git - revision: e6285641b11e0dd060b6d8880a5be1c369b89658 - branch: 4-0-stable - specs: - arel (4.0.2.20140205180311) - GIT remote: git://github.com/swanson/loofah.git revision: 825d715e6f1281501882d886cf34e82aebabb356 @@ -15,26 +8,25 @@ GIT GEM remote: https://rubygems.org/ specs: - activemodel (4.0.4) - activesupport (= 4.0.4) - builder (~> 3.1.0) - activerecord (4.0.4) - activemodel (= 4.0.4) - activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.4) - arel (~> 4.0.0) - activerecord-deprecated_finders (1.0.3) - activesupport (4.0.4) + activemodel (4.1.0) + activesupport (= 4.1.0) + builder (~> 3.1) + activerecord (4.1.0) + activemodel (= 4.1.0) + activesupport (= 4.1.0) + arel (~> 5.0.0) + activesupport (4.1.0) i18n (~> 0.6, >= 0.6.9) - minitest (~> 4.2) - multi_json (~> 1.3) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) thread_safe (~> 0.1) - tzinfo (~> 0.3.37) + tzinfo (~> 1.1) + arel (5.0.1.20140414130214) backports (3.6.0) bcrypt (3.1.7) bcrypt-ruby (3.1.5) bcrypt (>= 3.1.3) - builder (3.1.4) + builder (3.2.2) byebug (2.7.0) columnize (~> 0.3) debugger-linecache (~> 1.2) @@ -55,10 +47,8 @@ GEM delayed_job (>= 3.0, < 4.1) diff-lcs (1.2.5) docile (1.1.3) - dotenv (0.11.1) - dotenv-deployment (~> 0.0.2) - dotenv-deployment (0.0.2) - excon (0.31.0) + dotenv (0.7.0) + excon (0.33.0) faker (1.3.0) i18n (~> 0.5) feedbag (0.9.2) @@ -67,18 +57,19 @@ GEM curb (~> 0.8.1) loofah (~> 1.2.1) sax-machine (~> 0.2.1) - foreman (0.63.0) - dotenv (>= 0.7) - thor (>= 0.13.6) + foreman (0.67.0) + dotenv (~> 0.7.0) + thor (~> 0.17.0) formatador (0.2.4) highline (1.6.21) hpricot (0.8.6) i18n (0.6.9) jsmin (1.0.1) + json (1.8.1) method_source (0.8.2) mime-types (2.2) mini_portile (0.5.3) - minitest (4.7.5) + minitest (5.3.3) multi_json (1.9.3) netrc (0.7.7) nokogiri (1.6.1) @@ -112,7 +103,7 @@ GEM rspec-core (2.14.8) rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) - rspec-html-matchers (0.4.4) + rspec-html-matchers (0.5.0) nokogiri (~> 1) rspec (~> 2, >= 2.11.0) rspec-mocks (2.14.6) @@ -129,8 +120,8 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) - sinatra-activerecord (1.7.0) - activerecord (>= 3.0) + sinatra-activerecord (2.0.1) + activerecord (>= 3.2) sinatra (~> 1.0) sinatra-assetpack (0.3.3) jsmin @@ -150,50 +141,51 @@ GEM sqlite3 (1.3.9) term-ansicolor (1.3.0) tins (~> 1.0) - thor (0.19.1) + thor (0.17.0) thread (0.1.4) thread_safe (0.3.3) tilt (1.4.1) tins (1.1.0) - tzinfo (0.3.39) + tzinfo (1.1.0) + thread_safe (~> 0.1) will_paginate (3.0.5) PLATFORMS ruby DEPENDENCIES - activerecord (~> 4.0) - arel! - bcrypt-ruby (~> 3.1.2) + activerecord (~> 4.1) + arel (~> 5.0.1) + bcrypt-ruby (~> 3.1.5) coveralls (~> 0.7) delayed_job (~> 4.0) delayed_job_active_record (~> 4.0) - excon (~> 0.31.0) - faker (~> 1.2) + excon (~> 0.33) + faker (~> 1.3) feedbag (~> 0.9.2) feedjira (~> 1.2.0) - foreman (~> 0.63.0) + foreman (~> 0.67.0) formatador (~> 0.2.4) - highline (~> 1.6, >= 1.6.20) + highline (>= 1.6.21, >= 1.6) i18n (~> 0.6.9) loofah! netrc (~> 0.7.7) nokogiri (~> 1.6) pg (~> 0.17.1) - pry-byebug (~> 1.2) - puma (~> 2.7, >= 2.7.1) + pry-byebug (~> 1.3, >= 1.3.2) + puma (~> 2.8, >= 2.8.2) rack-test (~> 0.6.2) racksh (~> 1.0) - rake (~> 10.1, >= 10.1.1) + rake (~> 10.3, >= 10.3.1) rendezvous (~> 0.0.2) - rspec (~> 2.14, >= 2.14.1) - rspec-html-matchers (~> 0.4.3) - shotgun (~> 0.9.0) - sinatra (~> 1.4, >= 1.4.4) - sinatra-activerecord (~> 1.2, >= 1.2.3) - sinatra-assetpack (~> 0.3.1) - sinatra-contrib (>= 1.4.2) + rspec (>= 2.14.1, >= 2.14) + rspec-html-matchers (~> 0.5) + shotgun (~> 0.9) + sinatra (~> 1.4, >= 1.4.5) + sinatra-activerecord (~> 2.0, >= 2.0.1) + sinatra-assetpack (~> 0.3.3) + sinatra-contrib (~> 1.4.2) sinatra-flash (~> 0.3.0) - sqlite3 (~> 1.3, >= 1.3.8) - thread (~> 0.1.3) + sqlite3 (>= 1.3.9, >= 1.3) + thread (~> 0.1.4) will_paginate (~> 3.0, >= 3.0.5) From d16ae4174a8e3b5428eb8f3ac0ca580f1fbed824 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 4 May 2014 13:51:32 -0600 Subject: [PATCH 10/90] think this makes heroku use latest bundler --- Gemfile | 1 + Gemfile.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 286327dd3..582562116 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,6 @@ ruby "2.1.1" source "https://rubygems.org" +gem "bundler", ">= 1.6.2" group :production do gem "pg", "~> 0.17.1" diff --git a/Gemfile.lock b/Gemfile.lock index 18b73ca68..df4bac5b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -157,6 +157,7 @@ DEPENDENCIES activerecord (~> 4.1) arel (~> 5.0.1) bcrypt-ruby (~> 3.1.5) + bundler (>= 1.6.2) coveralls (~> 0.7) delayed_job (~> 4.0) delayed_job_active_record (~> 4.0) From bdbdd014ea8c9879721592c132aa3e214defa7df Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 4 May 2014 13:55:39 -0600 Subject: [PATCH 11/90] oops, bundler bug --- Gemfile | 7 +++---- Gemfile.lock | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index 582562116..ff1ef0c9e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,5 @@ ruby "2.1.1" source "https://rubygems.org" -gem "bundler", ">= 1.6.2" group :production do gem "pg", "~> 0.17.1" @@ -8,7 +7,7 @@ group :production do end group :development do - gem "sqlite3", ">= 1.3", ">= 1.3.9" + gem "sqlite3", "~> 1.3", ">= 1.3.9" end group :development, :test do @@ -17,7 +16,7 @@ group :development, :test do gem "foreman", "~> 0.67.0" gem "pry-byebug", "~> 1.3", ">= 1.3.2" gem "rack-test", "~> 0.6.2" - gem "rspec", ">= 2.14", ">= 2.14.1" + gem "rspec", "~> 2.14", ">= 2.14.1" gem "rspec-html-matchers", "~> 0.5" gem "shotgun", "~> 0.9" end @@ -36,7 +35,7 @@ gem "delayed_job", "~> 4.0" gem "delayed_job_active_record", "~> 4.0" gem "feedbag", "~> 0.9.2" gem "feedjira", "~> 1.2.0" -gem "highline", ">= 1.6", ">= 1.6.21", require: false +gem "highline", "~> 1.6", ">= 1.6.21", require: false gem "i18n", "~> 0.6.9" gem "loofah", github: "swanson/loofah" gem "nokogiri", "~> 1.6" diff --git a/Gemfile.lock b/Gemfile.lock index df4bac5b6..f60d82bd0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -157,7 +157,6 @@ DEPENDENCIES activerecord (~> 4.1) arel (~> 5.0.1) bcrypt-ruby (~> 3.1.5) - bundler (>= 1.6.2) coveralls (~> 0.7) delayed_job (~> 4.0) delayed_job_active_record (~> 4.0) @@ -167,7 +166,7 @@ DEPENDENCIES feedjira (~> 1.2.0) foreman (~> 0.67.0) formatador (~> 0.2.4) - highline (>= 1.6.21, >= 1.6) + highline (~> 1.6, >= 1.6.21) i18n (~> 0.6.9) loofah! netrc (~> 0.7.7) @@ -179,7 +178,7 @@ DEPENDENCIES racksh (~> 1.0) rake (~> 10.3, >= 10.3.1) rendezvous (~> 0.0.2) - rspec (>= 2.14.1, >= 2.14) + rspec (~> 2.14, >= 2.14.1) rspec-html-matchers (~> 0.5) shotgun (~> 0.9) sinatra (~> 1.4, >= 1.4.5) @@ -187,6 +186,6 @@ DEPENDENCIES sinatra-assetpack (~> 0.3.3) sinatra-contrib (~> 1.4.2) sinatra-flash (~> 0.3.0) - sqlite3 (>= 1.3.9, >= 1.3) + sqlite3 (~> 1.3, >= 1.3.9) thread (~> 0.1.4) will_paginate (~> 3.0, >= 3.0.5) From 898896f89307c7826ab8a359d6591bfbf25f673f Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 4 May 2014 14:02:39 -0600 Subject: [PATCH 12/90] change title --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 0b56de2ae..c8b0ccd59 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -63,7 +63,7 @@ en: import: Import logout: Logout support: Support - title: stringer | your rss buddy + title: AlkaliNews partials: action_bar: add_feed: Add a feed From c60cdd5ade32f15520dac55909f0642b11ae68c7 Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 19 Jun 2014 00:19:35 -0400 Subject: [PATCH 13/90] Update gemfile to include SSL enforcer --- Gemfile | 1 + Gemfile.lock | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++ config.ru | 3 + 3 files changed, 192 insertions(+) create mode 100644 Gemfile.lock diff --git a/Gemfile b/Gemfile index 7e84ed3c7..649c05eae 100644 --- a/Gemfile +++ b/Gemfile @@ -4,6 +4,7 @@ source "https://rubygems.org" group :production do gem "pg", "~> 0.17.1" gem "puma", "~> 2.8", ">= 2.8.2" + gem "rack-ssl-enforcer" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..aef5c6adc --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,188 @@ +GEM + remote: https://rubygems.org/ + specs: + activemodel (4.1.1) + activesupport (= 4.1.1) + builder (~> 3.1) + activerecord (4.1.1) + activemodel (= 4.1.1) + activesupport (= 4.1.1) + arel (~> 5.0.0) + activesupport (4.1.1) + i18n (~> 0.6, >= 0.6.9) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.1) + tzinfo (~> 1.1) + arel (5.0.1.20140414130214) + backports (3.6.0) + bcrypt (3.1.7) + bcrypt-ruby (3.1.5) + bcrypt (>= 3.1.3) + builder (3.2.2) + byebug (2.7.0) + columnize (~> 0.3) + debugger-linecache (~> 1.2) + coderay (1.1.0) + columnize (0.8.9) + coveralls (0.7.0) + multi_json (~> 1.3) + rest-client + simplecov (>= 0.7) + term-ansicolor + thor + curb (0.8.5) + debugger-linecache (1.2.0) + delayed_job (4.0.1) + activesupport (>= 3.0, < 4.2) + delayed_job_active_record (4.0.1) + activerecord (>= 3.0, < 4.2) + delayed_job (>= 3.0, < 4.1) + diff-lcs (1.2.5) + docile (1.1.5) + dotenv (0.7.0) + excon (0.37.0) + faker (1.3.0) + i18n (~> 0.5) + feedbag (0.9.2) + hpricot (>= 0.6) + feedjira (1.3.0) + curb (~> 0.8.1) + loofah (~> 2.0.0) + sax-machine (~> 0.2.1) + foreman (0.67.0) + dotenv (~> 0.7.0) + thor (~> 0.17.0) + formatador (0.2.5) + highline (1.6.21) + hpricot (0.8.6) + i18n (0.6.9) + jsmin (1.0.1) + json (1.8.1) + loofah (2.0.0) + nokogiri (>= 1.5.9) + method_source (0.8.2) + mime-types (2.3) + mini_portile (0.6.0) + minitest (5.3.5) + multi_json (1.10.1) + netrc (0.7.7) + nokogiri (1.6.2.1) + mini_portile (= 0.6.0) + pg (0.17.1) + pry (0.9.12.6) + coderay (~> 1.0) + method_source (~> 0.8) + slop (~> 3.4) + pry-byebug (1.3.2) + byebug (~> 2.7) + pry (~> 0.9.12) + puma (2.8.2) + rack (>= 1.1, < 2.0) + rack (1.5.2) + rack-protection (1.5.3) + rack + rack-ssl-enforcer (0.2.7) + rack-test (0.6.2) + rack (>= 1.0) + racksh (1.0.0) + rack (>= 1.0) + rack-test (>= 0.5) + rake (10.3.2) + rendezvous (0.0.2) + rest-client (1.6.7) + mime-types (>= 1.16) + rspec (2.99.0) + rspec-core (~> 2.99.0) + rspec-expectations (~> 2.99.0) + rspec-mocks (~> 2.99.0) + rspec-core (2.99.0) + rspec-expectations (2.99.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-html-matchers (0.5.0) + nokogiri (~> 1) + rspec (~> 2, >= 2.11.0) + rspec-mocks (2.99.1) + sax-machine (0.2.1) + nokogiri (~> 1.6.0) + shotgun (0.9) + rack (>= 1.0) + simplecov (0.8.2) + docile (~> 1.1.0) + multi_json + simplecov-html (~> 0.8.0) + simplecov-html (0.8.0) + sinatra (1.4.5) + rack (~> 1.4) + rack-protection (~> 1.4) + tilt (~> 1.3, >= 1.3.4) + sinatra-activerecord (2.0.2) + activerecord (>= 3.2) + sinatra (~> 1.0) + sinatra-assetpack (0.3.3) + jsmin + rack-test + sinatra + tilt (>= 1.3.0, < 2.0) + sinatra-contrib (1.4.2) + backports (>= 2.0) + multi_json + rack-protection + rack-test + sinatra (~> 1.4.0) + tilt (~> 1.3) + sinatra-flash (0.3.0) + sinatra (>= 1.0.0) + slop (3.5.0) + sqlite3 (1.3.9) + term-ansicolor (1.3.0) + tins (~> 1.0) + thor (0.17.0) + thread (0.1.4) + thread_safe (0.3.4) + tilt (1.4.1) + tins (1.3.0) + tzinfo (1.2.1) + thread_safe (~> 0.1) + will_paginate (3.0.5) + +PLATFORMS + ruby + +DEPENDENCIES + activerecord (~> 4.1) + arel (~> 5.0.1) + bcrypt-ruby (~> 3.1.5) + coveralls (~> 0.7) + delayed_job (~> 4.0) + delayed_job_active_record (~> 4.0) + excon (~> 0.33) + faker (~> 1.3) + feedbag (~> 0.9.2) + feedjira (~> 1.3.0) + foreman (~> 0.67.0) + formatador (~> 0.2.4) + highline (~> 1.6, >= 1.6.21) + i18n (~> 0.6.9) + loofah (~> 2.0.0) + netrc (~> 0.7.7) + nokogiri (~> 1.6) + pg (~> 0.17.1) + pry-byebug (~> 1.3, >= 1.3.2) + puma (~> 2.8, >= 2.8.2) + rack-ssl-enforcer + rack-test (~> 0.6.2) + racksh (~> 1.0) + rake (~> 10.3, >= 10.3.1) + rendezvous (~> 0.0.2) + rspec (~> 2.14, >= 2.14.1) + rspec-html-matchers (~> 0.5) + shotgun (~> 0.9) + sinatra (~> 1.4, >= 1.4.5) + sinatra-activerecord (~> 2.0, >= 2.0.1) + sinatra-assetpack (~> 0.3.3) + sinatra-contrib (~> 1.4.2) + sinatra-flash (~> 0.3.0) + sqlite3 (~> 1.3, >= 1.3.9) + thread (~> 0.1.4) + will_paginate (~> 3.0, >= 3.0.5) diff --git a/config.ru b/config.ru index 3720996aa..9edf23e7d 100644 --- a/config.ru +++ b/config.ru @@ -3,6 +3,9 @@ require "bundler" Bundler.require +require 'rack/ssl-enforcer' +use Rack::SslEnforcer + require "./fever_api" map "/fever" do run FeverAPI::Endpoint From 40caaa1ba478765a9af24a3ea1119ae4649400c0 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 10:41:58 -0700 Subject: [PATCH 14/90] Fix deprecation warnings --- spec/commands/feeds/add_new_feed_spec.rb | 2 +- spec/commands/feeds/export_to_opml_spec.rb | 4 ++-- spec/commands/users/complete_setup_spec.rb | 2 +- spec/utils/feed_discovery_spec.rb | 4 ++-- spec/utils/i18n_support_spec.rb | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/commands/feeds/add_new_feed_spec.rb b/spec/commands/feeds/add_new_feed_spec.rb index e7243db3b..662bfefb2 100644 --- a/spec/commands/feeds/add_new_feed_spec.rb +++ b/spec/commands/feeds/add_new_feed_spec.rb @@ -9,7 +9,7 @@ it "returns false if cant discover any feeds" do result = AddNewFeed.add("http://not-a-feed.com", discoverer) - result.should be_false + result.should be_falsey end end diff --git a/spec/commands/feeds/export_to_opml_spec.rb b/spec/commands/feeds/export_to_opml_spec.rb index 2aaaf0822..31345410f 100644 --- a/spec/commands/feeds/export_to_opml_spec.rb +++ b/spec/commands/feeds/export_to_opml_spec.rb @@ -12,7 +12,7 @@ result = ExportToOpml.new(feeds).to_xml outlines = Nokogiri.XML(result).xpath("//body//outline") - outlines.should have(2).items + outlines.size.should eq 2 outlines.first["title"].should eq feed_one.name outlines.first["xmlUrl"].should eq feed_one.url outlines.last["title"].should eq feed_two.name @@ -23,7 +23,7 @@ result = ExportToOpml.new([]).to_xml outlines = Nokogiri.XML(result).xpath("//body//outline") - outlines.should have(0).items + outlines.size.should eq 0 end it "has a proper title" do diff --git a/spec/commands/users/complete_setup_spec.rb b/spec/commands/users/complete_setup_spec.rb index 2d972ebb2..3e8759e5c 100644 --- a/spec/commands/users/complete_setup_spec.rb +++ b/spec/commands/users/complete_setup_spec.rb @@ -8,6 +8,6 @@ user.should_receive(:save).once result = CompleteSetup.complete(user) - result.setup_complete.should be_true + result.setup_complete.should be_truthy end end diff --git a/spec/utils/feed_discovery_spec.rb b/spec/utils/feed_discovery_spec.rb index 05439e9ec..b38aefc1b 100644 --- a/spec/utils/feed_discovery_spec.rb +++ b/spec/utils/feed_discovery_spec.rb @@ -18,7 +18,7 @@ result = FeedDiscovery.new.discover(url, finder, parser) - result.should be_false + result.should be_falsey end it "returns a feed if the url provided is parsable" do @@ -36,7 +36,7 @@ result = FeedDiscovery.new.discover(url, finder, parser) - result.should be_false + result.should be_falsey end it "returns the feed if the discovered feed is parsable" do diff --git a/spec/utils/i18n_support_spec.rb b/spec/utils/i18n_support_spec.rb index 05c0e51ac..e82795c02 100644 --- a/spec/utils/i18n_support_spec.rb +++ b/spec/utils/i18n_support_spec.rb @@ -21,7 +21,7 @@ it "should load default locale" do I18n.locale.to_s.should eq "en" - I18n.t("layout.title").should eq "stringer | your rss buddy" + I18n.t("layout.title").should eq "AlkaliNews" end end From 589011c68a06ad5e8b4a2c72f89dcdcaa54d4378 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 16:09:20 -0700 Subject: [PATCH 15/90] Fix rspec-html-expectations usage on upgrade via include. Start fixing deprecations in tests --- Gemfile | 4 +-- Gemfile.lock | 29 ++++++++++-------- spec/commands/feeds/add_new_feed_spec.rb | 6 ++-- spec/commands/feeds/export_to_opml_spec.rb | 14 ++++----- spec/commands/feeds/import_from_opml_spec.rb | 30 +++++++++---------- spec/commands/find_new_stories_spec.rb | 14 ++++----- .../commands/stories/mark_all_as_read_spec.rb | 2 +- spec/commands/stories/mark_as_read_spec.rb | 2 +- spec/commands/stories/mark_as_starred.rb | 2 +- spec/commands/stories/mark_as_unread_spec.rb | 2 +- .../stories/mark_as_unstarred_spec.rb | 2 +- .../stories/mark_feed_as_read_spec.rb | 2 +- .../stories/mark_group_as_read_spec.rb | 12 ++++---- spec/controllers/debug_controller_spec.rb | 2 +- spec/integration/feed_importing_spec.rb | 2 +- spec/spec_helper.rb | 1 + 16 files changed, 66 insertions(+), 60 deletions(-) diff --git a/Gemfile b/Gemfile index 2bb5ecfe1..96d33aae6 100644 --- a/Gemfile +++ b/Gemfile @@ -18,8 +18,8 @@ group :development, :test do gem "foreman", "~> 0.78.0" gem "pry-byebug", "~> 3.3" gem "rack-test", "~> 0.6.2" - gem "rspec", "~> 2.14", ">= 2.14.1" - gem "rspec-html-matchers", "~> 0.5.0" + gem "rspec", "~> 3.0" + gem "rspec-html-matchers", "> 0.5.0" gem "rubocop", "~> 0.36.0", require: false gem "shotgun", "~> 0.9" gem "timecop", "~> 0.8.0" diff --git a/Gemfile.lock b/Gemfile.lock index 1f04f6e4c..4ba37050c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -106,17 +106,22 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rspec (2.99.0) - rspec-core (~> 2.99.0) - rspec-expectations (~> 2.99.0) - rspec-mocks (~> 2.99.0) - rspec-core (2.99.2) - rspec-expectations (2.99.2) - diff-lcs (>= 1.1.3, < 2.0) - rspec-html-matchers (0.5.0) + rspec (3.4.0) + rspec-core (~> 3.4.0) + rspec-expectations (~> 3.4.0) + rspec-mocks (~> 3.4.0) + rspec-core (3.4.1) + rspec-support (~> 3.4.0) + rspec-expectations (3.4.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-html-matchers (0.7.0) nokogiri (~> 1) - rspec (~> 2, >= 2.11.0) - rspec-mocks (2.99.4) + rspec (~> 3) + rspec-mocks (3.4.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.4.0) + rspec-support (3.4.1) rubocop (0.36.0) parser (>= 2.3.0.0, < 3.0) powerpack (~> 0.1) @@ -203,8 +208,8 @@ DEPENDENCIES racksh (~> 1.0) rake (~> 10.3, >= 10.3.1) rendezvous (~> 0.1.2) - rspec (~> 2.14, >= 2.14.1) - rspec-html-matchers (~> 0.5.0) + rspec (~> 3.0) + rspec-html-matchers (> 0.5.0) rubocop (~> 0.36.0) shotgun (~> 0.9) sinatra (~> 1.4, >= 1.4.5) diff --git a/spec/commands/feeds/add_new_feed_spec.rb b/spec/commands/feeds/add_new_feed_spec.rb index 662bfefb2..655c51d08 100644 --- a/spec/commands/feeds/add_new_feed_spec.rb +++ b/spec/commands/feeds/add_new_feed_spec.rb @@ -9,7 +9,7 @@ it "returns false if cant discover any feeds" do result = AddNewFeed.add("http://not-a-feed.com", discoverer) - result.should be_falsey + expect(result).to be_falsey end end @@ -21,11 +21,11 @@ let(:repo) { double } it "parses and creates the feed if discovered" do - repo.should_receive(:create).and_return(feed) + expect(repo).to receive(:create).and_return(feed) result = AddNewFeed.add("http://feed.com", discoverer, repo) - result.should be feed + expect(result).to be feed end end end diff --git a/spec/commands/feeds/export_to_opml_spec.rb b/spec/commands/feeds/export_to_opml_spec.rb index 31345410f..ee3424c2f 100644 --- a/spec/commands/feeds/export_to_opml_spec.rb +++ b/spec/commands/feeds/export_to_opml_spec.rb @@ -12,25 +12,25 @@ result = ExportToOpml.new(feeds).to_xml outlines = Nokogiri.XML(result).xpath("//body//outline") - outlines.size.should eq 2 - outlines.first["title"].should eq feed_one.name - outlines.first["xmlUrl"].should eq feed_one.url - outlines.last["title"].should eq feed_two.name - outlines.last["xmlUrl"].should eq feed_two.url + expect(outlines.size).to eq 2 + expect(outlines.first["title"]).to eq feed_one.name + expect(outlines.first["xmlUrl"]).to eq feed_one.url + expect(outlines.last["title"]).to eq feed_two.name + expect(outlines.last["xmlUrl"]).to eq feed_two.url end it "handles empty feeds" do result = ExportToOpml.new([]).to_xml outlines = Nokogiri.XML(result).xpath("//body//outline") - outlines.size.should eq 0 + expect(outlines.size).to eq 0 end it "has a proper title" do result = ExportToOpml.new(feeds).to_xml title = Nokogiri.XML(result).xpath("//head//title").first - title.content.should eq "Feeds from Stringer" + expect(title.content).to eq "Feeds from Stringer" end end end diff --git a/spec/commands/feeds/import_from_opml_spec.rb b/spec/commands/feeds/import_from_opml_spec.rb index b739c5858..338ea9724 100644 --- a/spec/commands/feeds/import_from_opml_spec.rb +++ b/spec/commands/feeds/import_from_opml_spec.rb @@ -30,18 +30,18 @@ def import before { import } it "retains exising feeds" do - feed_1.should be_valid - feed_2.should be_valid + expect(feed_1).to be_valid + expect(feed_2).to be_valid end it "creates new groups" do - group_1.should be - group_2.should be + expect(group_1).to be + expect(group_2).to be end it "sets group_id for existing feeds" do - feed_1.reload.group.should eq group_1 - feed_2.reload.group.should eq group_2 + expect(feed_1.reload.group).to eq group_1 + expect(feed_2.reload.group).to eq group_2 end end @@ -58,18 +58,18 @@ def import before { import } it "creates groups" do - group_1.should be - group_1.should be + expect(group_1).to be + expect(group_2).to be end it "creates feeds" do - feed_1.should exist - feed_2.should exist + expect(feed_1).to exist + expect(feed_2).to exist end it "sets group" do - feed_1.first.group.should eq group_1 - feed_2.first.group.should eq group_2 + expect(feed_1.first.group).to eq group_1 + expect(feed_2.first.group).to eq group_2 end end @@ -80,12 +80,12 @@ def import before { import } it "does not create any new group for feeds without group" do - Group.where("id NOT IN (?)", [group_1.id, group_2.id]).count.should eq 0 + expect(Group.where("id NOT IN (?)", [group_1.id, group_2.id]).count).to eq 0 end it "creates feeds without group_id" do - feed_1.group_id.should be_nil - feed_2.group_id.should be_nil + expect(feed_1.group_id).to be_nil + expect(feed_2.group_id).to be_nil end end end diff --git a/spec/commands/find_new_stories_spec.rb b/spec/commands/find_new_stories_spec.rb index 8b7f45bfd..ada330f0e 100644 --- a/spec/commands/find_new_stories_spec.rb +++ b/spec/commands/find_new_stories_spec.rb @@ -7,7 +7,7 @@ describe "#new_stories" do context "the feed contains no new stories" do before do - StoryRepository.stub(:exists?).and_return(true) + expect(StoryRepository).to receive(:exists?).and_return(true).at_least(:once) end it "should find zero new stories" do @@ -16,7 +16,7 @@ feed = double(entries: [story1, story2]) result = FindNewStories.new(feed, 1, Time.new(2013, 1, 2)).new_stories - result.should be_empty + expect(result).to be_empty end end @@ -26,11 +26,11 @@ story2 = double(published: nil, id: "story2") feed = double(entries: [story1, story2]) - StoryRepository.stub(:exists?).with("story1", 1).and_return(true) - StoryRepository.stub(:exists?).with("story2", 1).and_return(false) + expect(StoryRepository).to receive(:exists?).with("story1", 1).and_return(true) + expect(StoryRepository).to receive(:exists?).with("story2", 1).and_return(false) result = FindNewStories.new(feed, 1, Time.new(2013, 1, 2)).new_stories - result.should eq [story2] + expect(result).to eq [story2] end end @@ -40,7 +40,7 @@ feed = double(last_modified: nil, entries: [new_story, old_story]) result = FindNewStories.new(feed, 1, Time.new(2013, 1, 3), "old-story").new_stories - result.should eq [new_story] + expect(result).to eq [new_story] end it "should ignore stories older than 3 days" do @@ -57,7 +57,7 @@ feed = double(last_modified: nil, entries: new_stories + stories_older_than_3_days) result = FindNewStories.new(feed, 1, nil, nil).new_stories - result.should_not include(stories_older_than_3_days) + expect(result).to_not include(stories_older_than_3_days) end end end diff --git a/spec/commands/stories/mark_all_as_read_spec.rb b/spec/commands/stories/mark_all_as_read_spec.rb index 5df6734fc..b72c75b78 100644 --- a/spec/commands/stories/mark_all_as_read_spec.rb +++ b/spec/commands/stories/mark_all_as_read_spec.rb @@ -9,7 +9,7 @@ it "marks all stories as read" do command = MarkAllAsRead.new([1, 2], repo) - stories.should_receive(:update_all).with(is_read: true) + expect(stories).to receive(:update_all).with(is_read: true) command.mark_as_read end end diff --git a/spec/commands/stories/mark_as_read_spec.rb b/spec/commands/stories/mark_as_read_spec.rb index c7776dc3c..b24ff9d74 100644 --- a/spec/commands/stories/mark_as_read_spec.rb +++ b/spec/commands/stories/mark_as_read_spec.rb @@ -9,7 +9,7 @@ it "marks a story as read" do command = MarkAsRead.new(1, repo) - story.should_receive(:update_attributes).with(is_read: true) + expect(story).to receive(:update_attributes).with(is_read: true) command.mark_as_read end end diff --git a/spec/commands/stories/mark_as_starred.rb b/spec/commands/stories/mark_as_starred.rb index f0d91de32..ecfca860a 100644 --- a/spec/commands/stories/mark_as_starred.rb +++ b/spec/commands/stories/mark_as_starred.rb @@ -9,7 +9,7 @@ it "marks a story as starred" do command = MarkAsStarred.new(1, repo) - story.should_receive(:update_attributes).with(is_starred: true) + expect(story).to receive(:update_attributes).with(is_starred: true) command.mark_as_starred end end diff --git a/spec/commands/stories/mark_as_unread_spec.rb b/spec/commands/stories/mark_as_unread_spec.rb index b09f973a7..51716ed01 100644 --- a/spec/commands/stories/mark_as_unread_spec.rb +++ b/spec/commands/stories/mark_as_unread_spec.rb @@ -9,7 +9,7 @@ it "marks a story as unread" do command = MarkAsUnread.new(1, repo) - story.should_receive(:update_attributes).with(is_read: false) + expect(story).to receive(:update_attributes).with(is_read: false) command.mark_as_unread end end diff --git a/spec/commands/stories/mark_as_unstarred_spec.rb b/spec/commands/stories/mark_as_unstarred_spec.rb index 576c3bcfd..d55d94418 100644 --- a/spec/commands/stories/mark_as_unstarred_spec.rb +++ b/spec/commands/stories/mark_as_unstarred_spec.rb @@ -9,7 +9,7 @@ it "marks a story as unstarred" do command = MarkAsUnstarred.new(1, repo) - story.should_receive(:update_attributes).with(is_starred: false) + expect(story).to receive(:update_attributes).with(is_starred: false) command.mark_as_unstarred end end diff --git a/spec/commands/stories/mark_feed_as_read_spec.rb b/spec/commands/stories/mark_feed_as_read_spec.rb index fc08bda08..00e5dff69 100644 --- a/spec/commands/stories/mark_feed_as_read_spec.rb +++ b/spec/commands/stories/mark_feed_as_read_spec.rb @@ -9,7 +9,7 @@ it "marks feed 1 as read" do command = MarkFeedAsRead.new(1, Time.now.to_i, repo) - stories.should_receive(:update_all).with(is_read: true) + expect(stories).to receive(:update_all).with(is_read: true) command.mark_feed_as_read end end diff --git a/spec/commands/stories/mark_group_as_read_spec.rb b/spec/commands/stories/mark_group_as_read_spec.rb index 1bb6deba1..cd69382ba 100644 --- a/spec/commands/stories/mark_group_as_read_spec.rb +++ b/spec/commands/stories/mark_group_as_read_spec.rb @@ -14,22 +14,22 @@ def run_command(group_id) it "marks group as read" do command = run_command(2) - stories.should_receive(:update_all).with(is_read: true) - repo.should_receive(:fetch_unread_by_timestamp_and_group).with(timestamp, 2).and_return(stories) + expect(stories).to receive(:update_all).with(is_read: true) + expect(repo).to receive(:fetch_unread_by_timestamp_and_group).with(timestamp, 2).and_return(stories) command.mark_group_as_read end it "does not mark any group as read when group is not provided" do command = run_command(nil) - repo.should_not_receive(:fetch_unread_by_timestamp_and_group) - repo.should_not_receive(:fetch_unread_by_timestamp) + expect(repo).to_not receive(:fetch_unread_by_timestamp_and_group) + expect(repo).to_not receive(:fetch_unread_by_timestamp) command.mark_group_as_read end context "SPARKS_GROUP_ID and KINDLING_GROUP_ID" do before do - stories.should_receive(:update_all).with(is_read: true) - repo.should_receive(:fetch_unread_by_timestamp).and_return(stories) + expect(stories).to receive(:update_all).with(is_read: true) + expect(repo).to receive(:fetch_unread_by_timestamp).and_return(stories) end it "marks as read all feeds when group is 0" do diff --git a/spec/controllers/debug_controller_spec.rb b/spec/controllers/debug_controller_spec.rb index 496b32a36..77f6978cd 100644 --- a/spec/controllers/debug_controller_spec.rb +++ b/spec/controllers/debug_controller_spec.rb @@ -21,7 +21,7 @@ get "/debug" page = last_response.body - page.should have_tag("dd", text: /#{RUBY_VERSION}/) + page.should have_tag("dd", text: RUBY_VERSION) end it "displays the user agent" do diff --git a/spec/integration/feed_importing_spec.rb b/spec/integration/feed_importing_spec.rb index 47c6e20ef..78c0a3859 100644 --- a/spec/integration/feed_importing_spec.rb +++ b/spec/integration/feed_importing_spec.rb @@ -51,7 +51,7 @@ context "new entries" do it "creates new stories" do @server.response = sample_data("feeds/feed01_valid_feed/feed_updated.xml") - expect { fetch_feed(feed) }.to change { feed.stories.count }.by(1).to(6) + expect { fetch_feed(feed) }.to change { feed.stories.count }.from(5).to(6) end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3caf4b027..f2799081b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -20,6 +20,7 @@ RSpec.configure do |config| config.include Rack::Test::Methods + config.include RSpecHtmlMatchers end def app_require(file) From dc12fb2dfff3bfa978548cf819264729b1f182bd Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 20:36:46 -0700 Subject: [PATCH 16/90] Updating specs (should to expect) --- .../users/change_user_password_spec.rb | 2 +- spec/commands/users/complete_setup_spec.rb | 2 +- spec/commands/users/sign_in_user_spec.rb | 4 +- spec/controllers/debug_controller_spec.rb | 10 +-- spec/controllers/feeds_controller_spec.rb | 36 ++++---- spec/controllers/first_run_controller_spec.rb | 32 +++---- spec/controllers/sessions_controller_spec.rb | 16 ++-- spec/controllers/stories_controller_spec.rb | 84 +++++++++---------- spec/fever_api/authentication_spec.rb | 2 +- spec/fever_api/read_favicons_spec.rb | 2 +- spec/fever_api/read_feeds_groups_spec.rb | 2 +- spec/fever_api/read_feeds_spec.rb | 6 +- spec/fever_api/read_groups_spec.rb | 2 +- spec/fever_api/read_items_spec.rb | 2 +- spec/fever_api/read_links_spec.rb | 2 +- spec/fever_api/sync_saved_item_ids_spec.rb | 2 +- spec/fever_api/sync_unread_item_ids_spec.rb | 2 +- spec/fever_api/write_mark_feed_spec.rb | 2 +- spec/fever_api/write_mark_group_spec.rb | 2 +- spec/fever_api/write_mark_item_spec.rb | 2 +- spec/fever_api_spec.rb | 84 +++++++++---------- spec/helpers/url_helers_spec.rb | 10 +-- spec/javascript/support/vendor/js/chai.js | 10 +-- spec/models/story_spec.rb | 12 +-- spec/repositories/feed_repository_spec.rb | 14 ++-- spec/repositories/story_repository_spec.rb | 12 +-- spec/utils/feed_discovery_spec.rb | 8 +- spec/utils/i18n_support_spec.rb | 4 +- spec/utils/opml_parser_spec.rb | 26 +++--- 29 files changed, 197 insertions(+), 197 deletions(-) diff --git a/spec/commands/users/change_user_password_spec.rb b/spec/commands/users/change_user_password_spec.rb index 36ff42bd9..f34700d58 100644 --- a/spec/commands/users/change_user_password_spec.rb +++ b/spec/commands/users/change_user_password_spec.rb @@ -28,7 +28,7 @@ command = ChangeUserPassword.new(repo) result = command.change_user_password(new_password) - result.api_key.should eq ApiKey.compute(new_password) + expect(result.api_key).to eq ApiKey.compute(new_password) end end end diff --git a/spec/commands/users/complete_setup_spec.rb b/spec/commands/users/complete_setup_spec.rb index 3e8759e5c..c06d96c56 100644 --- a/spec/commands/users/complete_setup_spec.rb +++ b/spec/commands/users/complete_setup_spec.rb @@ -8,6 +8,6 @@ user.should_receive(:save).once result = CompleteSetup.complete(user) - result.setup_complete.should be_truthy + expect(result.setup_complete).to be_truthy end end diff --git a/spec/commands/users/sign_in_user_spec.rb b/spec/commands/users/sign_in_user_spec.rb index d4f09f4c8..f3f921810 100644 --- a/spec/commands/users/sign_in_user_spec.rb +++ b/spec/commands/users/sign_in_user_spec.rb @@ -14,13 +14,13 @@ it "returns the user if the password is valid" do result = SignInUser.sign_in(valid_password, repo) - result.id.should eq 1 + expect(result.id).to eq 1 end it "returns nil if password is invalid" do result = SignInUser.sign_in("not-the-pw", repo) - result.should be_nil + expect(result).to be_nil end end end diff --git a/spec/controllers/debug_controller_spec.rb b/spec/controllers/debug_controller_spec.rb index 77f6978cd..590ed0e43 100644 --- a/spec/controllers/debug_controller_spec.rb +++ b/spec/controllers/debug_controller_spec.rb @@ -21,29 +21,29 @@ get "/debug" page = last_response.body - page.should have_tag("dd", text: RUBY_VERSION) + expect(page).to have_tag("dd", text: RUBY_VERSION) end it "displays the user agent" do get "/debug", {}, "HTTP_USER_AGENT" => "test" page = last_response.body - page.should have_tag("dd", text: /test/) + expect(page).to have_tag("dd", text: /test/) end it "displays the delayed job count" do get "/debug" page = last_response.body - page.should have_tag("dd", text: /42/) + expect(page).to have_tag("dd", text: /42/) end it "displays pending migrations" do get "/debug" page = last_response.body - page.should have_tag("li", text: /Migration B - 2/) - page.should have_tag("li", text: /Migration C - 3/) + expect(page).to have_tag("li", text: /Migration B - 2/) + expect(page).to have_tag("li", text: /Migration C - 3/) end end end diff --git a/spec/controllers/feeds_controller_spec.rb b/spec/controllers/feeds_controller_spec.rb index e3d990702..441ba9d4e 100644 --- a/spec/controllers/feeds_controller_spec.rb +++ b/spec/controllers/feeds_controller_spec.rb @@ -12,8 +12,8 @@ get "/feeds" page = last_response.body - page.should have_tag("ul#feed-list") - page.should have_tag("li.feed", count: 2) + expect(page).to have_tag("ul#feed-list") + expect(page).to have_tag("li.feed", count: 2) end it "displays message to add feeds if there are none" do @@ -22,7 +22,7 @@ get "/feeds" page = last_response.body - page.should have_tag("#add-some-feeds") + expect(page).to have_tag("#add-some-feeds") end end @@ -33,8 +33,8 @@ get "/feeds/123/edit" - last_response.body.should include("Rainbows and unicorns") - last_response.body.should include("example.com/feed") + expect(last_response.body).to include("Rainbows and unicorns") + expect(last_response.body).to include("example.com/feed") end end @@ -46,7 +46,7 @@ put "/feeds/123", feed_id: "123", feed_name: "Test", feed_url: "example.com/feed" - last_response.should be_redirect + expect(last_response).to be_redirect end it "updates a feed group given the id" do @@ -56,7 +56,7 @@ put "/feeds/123", feed_id: "123", feed_name: feed.name, feed_url: feed.url, group_id: "321" - last_response.should be_redirect + expect(last_response).to be_redirect end end @@ -73,8 +73,8 @@ get "/feeds/new" page = last_response.body - page.should have_tag("form#add-feed-setup") - page.should have_tag("input#submit") + expect(page).to have_tag("form#add-feed-setup") + expect(page).to have_tag("input#submit") end end @@ -89,7 +89,7 @@ post "/feeds", feed_url: feed_url - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/" end end @@ -103,7 +103,7 @@ post "/feeds", feed_url: feed_url page = last_response.body - page.should have_tag(".error") + expect(page).to have_tag(".error") end end @@ -117,7 +117,7 @@ post "/feeds", feed_url: feed_url page = last_response.body - page.should have_tag(".error") + expect(page).to have_tag(".error") end end end @@ -127,8 +127,8 @@ get "/feeds/import" page = last_response.body - page.should have_tag("input#opml_file") - page.should have_tag("a#skip") + expect(page).to have_tag("input#opml_file") + expect(page).to have_tag("a#skip") end end @@ -140,7 +140,7 @@ post "/feeds/import", "opml_file" => opml_file - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/setup/tutorial" end end @@ -154,9 +154,9 @@ get "/feeds/export" - last_response.body.should eq some_xml - last_response.header["Content-Type"].should include "application/xml" - last_response.header["Content-Disposition"].should == "attachment; filename=\"stringer.opml\"" + expect(last_response.body).to eq some_xml + expect(last_response.header["Content-Type"]).to include "application/xml" + expect(last_response.header["Content-Disposition"]).to eq "attachment; filename=\"stringer.opml\"" end end end diff --git a/spec/controllers/first_run_controller_spec.rb b/spec/controllers/first_run_controller_spec.rb index 4b49c6620..38f4e0d01 100644 --- a/spec/controllers/first_run_controller_spec.rb +++ b/spec/controllers/first_run_controller_spec.rb @@ -13,10 +13,10 @@ get "/setup/password" page = last_response.body - page.should have_tag("form#password_setup") - page.should have_tag("input#password") - page.should have_tag("input#password-confirmation") - page.should have_tag("input#submit") + expect(page).to have_tag("form#password_setup") + expect(page).to have_tag("input#password") + expect(page).to have_tag("input#password-confirmation") + expect(page).to have_tag("input#submit") end end @@ -25,14 +25,14 @@ post "/setup/password" page = last_response.body - page.should have_tag("div.error") + expect(page).to have_tag("div.error") end it "rejects when password isn't confirmed" do post "/setup/password", password: "foo", password_confirmation: "bar" page = last_response.body - page.should have_tag("div.error") + expect(page).to have_tag("div.error") end it "accepts confirmed passwords and redirects to next step" do @@ -40,7 +40,7 @@ post "/setup/password", password: "foo", password_confirmation: "foo" - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/feeds/import" end end @@ -61,12 +61,12 @@ get "/setup/tutorial" page = last_response.body - page.should have_tag("#mark-all-instruction") - page.should have_tag("#refresh-instruction") - page.should have_tag("#feeds-instruction") - page.should have_tag("#add-feed-instruction") - page.should have_tag("#story-instruction") - page.should have_tag("#start") + expect(page).to have_tag("#mark-all-instruction") + expect(page).to have_tag("#refresh-instruction") + expect(page).to have_tag("#feeds-instruction") + expect(page).to have_tag("#add-feed-instruction") + expect(page).to have_tag("#story-instruction") + expect(page).to have_tag("#start") end end end @@ -78,15 +78,15 @@ it "should redirect any requests to first run stuff" do get "/" - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/news" get "/setup/password" - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/news" get "/setup/tutorial" - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/news" end end diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index 99dd2636a..4f4564f20 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -8,8 +8,8 @@ get "/login" page = last_response.body - page.should have_tag("input#password") - page.should have_tag("#login") + expect(page).to have_tag("input#password") + expect(page).to have_tag("#login") end end @@ -20,7 +20,7 @@ post "/login", password: "not-the-password" page = last_response.body - page.should have_tag(".error") + expect(page).to have_tag(".error") end it "allows access when password is correct" do @@ -28,9 +28,9 @@ post "/login", password: "the-password" - session[:user_id].should eq 1 + expect(session[:user_id]).to eq 1 - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/" end @@ -40,7 +40,7 @@ post "/login", { password: "the-password" }, "rack.session" => { redirect_to: "/archive" } - session[:redirect_to].should be_nil + expect(session[:redirect_to]).to be_nil URI.parse(last_response.location).path.should eq "/archive" end end @@ -49,9 +49,9 @@ it "clears the session and redirects" do get "/logout", {}, "rack.session" => { userid: 1 } - session[:user_id].should be_nil + expect(session[:user_id]).to be_nil - last_response.status.should be 302 + expect(last_response.status).to be 302 URI.parse(last_response.location).path.should eq "/" end end diff --git a/spec/controllers/stories_controller_spec.rb b/spec/controllers/stories_controller_spec.rb index 938bf760e..8d811ee7b 100644 --- a/spec/controllers/stories_controller_spec.rb +++ b/spec/controllers/stories_controller_spec.rb @@ -10,49 +10,49 @@ describe "GET /news" do before do - StoryRepository.stub(:unread).and_return(stories) - UserRepository.stub(fetch: double) + allow(StoryRepository).to receive(:unread).and_return(stories) + expect(UserRepository).to receive(:fetch).and_return(double).at_least(:once) end it "display list of unread stories" do get "/news" - last_response.body.should have_tag("#stories") + expect(last_response.body).to have_tag("#stories") end it "displays the blog title and article title" do - StoryRepository.should_receive(:unread).and_return([story_one]) + expect(StoryRepository).to receive(:unread).and_return([story_one]) get "/news" - last_response.body.should include(story_one.headline) - last_response.body.should include(story_one.source) + expect(last_response.body).to include(story_one.headline) + expect(last_response.body).to include(story_one.source) end it "displays all user actions" do get "/news" - last_response.body.should have_tag("#mark-all") - last_response.body.should have_tag("#refresh") - last_response.body.should have_tag("#feeds") - last_response.body.should have_tag("#add-feed") + expect(last_response.body).to have_tag("#mark-all") + expect(last_response.body).to have_tag("#refresh") + expect(last_response.body).to have_tag("#feeds") + expect(last_response.body).to have_tag("#add-feed") end it "should have correct footer links" do get "/news" page = last_response.body - page.should have_tag("a", with: { href: "/feeds/export" }) - page.should have_tag("a", with: { href: "/logout" }) - page.should have_tag("a", with: { href: "https://github.com/swanson/stringer" }) + expect(page).to have_tag("a", with: { href: "/feeds/export" }) + expect(page).to have_tag("a", with: { href: "/logout" }) + expect(page).to have_tag("a", with: { href: "https://github.com/swanson/stringer" }) end it "displays a zen-like message when there are no unread stories" do - StoryRepository.stub(:unread).and_return([]) + expect(StoryRepository).to receive(:unread).and_return([]) get "/news" - last_response.body.should have_tag("#zen") + expect(last_response.body).to have_tag("#zen") end end @@ -60,14 +60,14 @@ let(:read_one) { StoryFactory.build(is_read: true) } let(:read_two) { StoryFactory.build(is_read: true) } let(:stories) { [read_one, read_two].paginate } - before { StoryRepository.stub(:read).and_return(stories) } + before { expect(StoryRepository).to receive(:read).and_return(stories) } it "displays the list of read stories with pagination" do get "/archive" page = last_response.body - page.should have_tag("#stories") - page.should have_tag("div#pagination") + expect(page).to have_tag("#stories") + expect(page).to have_tag("div#pagination") end end @@ -75,37 +75,37 @@ let(:starred_one) { StoryFactory.build(is_starred: true) } let(:starred_two) { StoryFactory.build(is_starred: true) } let(:stories) { [starred_one, starred_two].paginate } - before { StoryRepository.stub(:starred).and_return(stories) } + before { expect(StoryRepository).to receive(:starred).and_return(stories) } it "displays the list of starred stories with pagination" do get "/starred" page = last_response.body - page.should have_tag("#stories") - page.should have_tag("div#pagination") + expect(page).to have_tag("#stories") + expect(page).to have_tag("div#pagination") end end describe "PUT /stories/:id" do - before { StoryRepository.stub(:fetch).and_return(story_one) } + before { expect(StoryRepository).to receive(:fetch).and_return(story_one) } context "is_read parameter" do context "when it is not malformed" do it "marks a story as read" do - StoryRepository.should_receive(:save).once + expect(StoryRepository).to receive(:save).once put "/stories/#{story_one.id}", { is_read: true }.to_json - story_one.is_read.should eq true + expect(story_one.is_read).to eq true end end context "when it is malformed" do it "marks a story as read" do - StoryRepository.should_receive(:save).once + expect(StoryRepository).to receive(:save).once put "/stories/#{story_one.id}", { is_read: "malformed" }.to_json - story_one.is_read.should eq true + expect(story_one.is_read).to eq true end end end @@ -115,7 +115,7 @@ it "marks a story as permanently unread" do put "/stories/#{story_one.id}", { keep_unread: false }.to_json - story_one.keep_unread.should eq false + expect(story_one.keep_unread).to eq false end end @@ -123,7 +123,7 @@ it "marks a story as permanently unread" do put "/stories/#{story_one.id}", { keep_unread: "malformed" }.to_json - story_one.keep_unread.should eq true + expect(story_one.keep_unread).to eq true end end end @@ -133,7 +133,7 @@ it "marks a story as permanently starred" do put "/stories/#{story_one.id}", { is_starred: true }.to_json - story_one.is_starred.should eq true + expect(story_one.is_starred).to eq true end end @@ -141,7 +141,7 @@ it "marks a story as permanently starred" do put "/stories/#{story_one.id}", { is_starred: "malformed" }.to_json - story_one.is_starred.should eq true + expect(story_one.is_starred).to eq true end end end @@ -149,43 +149,43 @@ describe "POST /stories/mark_all_as_read" do it "marks all unread stories as read and reload the page" do - MarkAllAsRead.any_instance.should_receive(:mark_as_read).once + expect_any_instance_of(MarkAllAsRead).to receive(:mark_as_read).once post "/stories/mark_all_as_read", story_ids: %w(1 2 3) - last_response.status.should be 302 - URI.parse(last_response.location).path.should eq "/news" + expect(last_response.status).to be 302 + expect(URI.parse(last_response.location).path).to eq "/news" end end describe "GET /feed/:feed_id" do it "looks for a particular feed" do - FeedRepository.should_receive(:fetch).with(story_one.feed.id.to_s).and_return(story_one.feed) - StoryRepository.should_receive(:feed).with(story_one.feed.id.to_s).and_return([story_one]) + expect(FeedRepository).to receive(:fetch).with(story_one.feed.id.to_s).and_return(story_one.feed) + expect(StoryRepository).to receive(:feed).with(story_one.feed.id.to_s).and_return([story_one]) get "/feed/#{story_one.feed.id}" end it "displays a list of stories" do - FeedRepository.stub(:fetch).and_return(story_one.feed) - StoryRepository.stub(:feed).and_return(stories) + expect(FeedRepository).to receive(:fetch).and_return(story_one.feed) + expect(StoryRepository).to receive(:feed).and_return(stories) get "/feed/#{story_one.feed.id}" - last_response.body.should have_tag("#stories") + expect(last_response.body).to have_tag("#stories") end it "differentiates between read and unread" do - FeedRepository.stub(:fetch).and_return(story_one.feed) - StoryRepository.stub(:feed).and_return(stories) + expect(FeedRepository).to receive(:fetch).and_return(story_one.feed) + expect(StoryRepository).to receive(:feed).and_return(stories) story_one.is_read = false story_two.is_read = true get "/feed/#{story_one.feed.id}" - last_response.body.should have_tag("li", class: "story") - last_response.body.should have_tag("li", class: "unread") + expect(last_response.body).to have_tag("li", class: "story") + expect(last_response.body).to have_tag("li", class: "unread") end end end diff --git a/spec/fever_api/authentication_spec.rb b/spec/fever_api/authentication_spec.rb index 5d0cd685d..b0bea48bb 100644 --- a/spec/fever_api/authentication_spec.rb +++ b/spec/fever_api/authentication_spec.rb @@ -7,6 +7,6 @@ fake_clock = double("clock") fake_clock.should_receive(:now).and_return(1234567890) result = FeverAPI::Authentication.new(clock: fake_clock).call(double) - result.should == { auth: 1, last_refreshed_on_time: 1234567890 } + expect(result).to eq({ auth: 1, last_refreshed_on_time: 1234567890 }) end end diff --git a/spec/fever_api/read_favicons_spec.rb b/spec/fever_api/read_favicons_spec.rb index d50ff19bb..30bb0bd90 100644 --- a/spec/fever_api/read_favicons_spec.rb +++ b/spec/fever_api/read_favicons_spec.rb @@ -17,6 +17,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/read_feeds_groups_spec.rb b/spec/fever_api/read_feeds_groups_spec.rb index c6d0fccf7..a675ded28 100644 --- a/spec/fever_api/read_feeds_groups_spec.rb +++ b/spec/fever_api/read_feeds_groups_spec.rb @@ -38,6 +38,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/read_feeds_spec.rb b/spec/fever_api/read_feeds_spec.rb index 2b6d11697..1fafa1e63 100644 --- a/spec/fever_api/read_feeds_spec.rb +++ b/spec/fever_api/read_feeds_spec.rb @@ -13,16 +13,16 @@ it "returns a list of feeds" do feed_repository.should_receive(:list).and_return(feeds) - subject.call("feeds" => nil).should == { + subject.call("feeds" => nil).should eq({ feeds: [ { id: 5 }, { id: 7 }, { id: 11 } ] - } + }) end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/read_groups_spec.rb b/spec/fever_api/read_groups_spec.rb index 9841136a3..2091bf3cf 100644 --- a/spec/fever_api/read_groups_spec.rb +++ b/spec/fever_api/read_groups_spec.rb @@ -26,6 +26,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/read_items_spec.rb b/spec/fever_api/read_items_spec.rb index b91acb3ab..849b0283c 100644 --- a/spec/fever_api/read_items_spec.rb +++ b/spec/fever_api/read_items_spec.rb @@ -60,6 +60,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/read_links_spec.rb b/spec/fever_api/read_links_spec.rb index 4efcd66d5..ca3231459 100644 --- a/spec/fever_api/read_links_spec.rb +++ b/spec/fever_api/read_links_spec.rb @@ -10,6 +10,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/sync_saved_item_ids_spec.rb b/spec/fever_api/sync_saved_item_ids_spec.rb index 6ee754f25..96a7d1877 100644 --- a/spec/fever_api/sync_saved_item_ids_spec.rb +++ b/spec/fever_api/sync_saved_item_ids_spec.rb @@ -17,6 +17,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/sync_unread_item_ids_spec.rb b/spec/fever_api/sync_unread_item_ids_spec.rb index 8213a5cf5..0ed0f07c5 100644 --- a/spec/fever_api/sync_unread_item_ids_spec.rb +++ b/spec/fever_api/sync_unread_item_ids_spec.rb @@ -17,6 +17,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/write_mark_feed_spec.rb b/spec/fever_api/write_mark_feed_spec.rb index 20e7eaaab..5fe3256e3 100644 --- a/spec/fever_api/write_mark_feed_spec.rb +++ b/spec/fever_api/write_mark_feed_spec.rb @@ -17,6 +17,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/write_mark_group_spec.rb b/spec/fever_api/write_mark_group_spec.rb index 9e673af72..adbe2dcad 100644 --- a/spec/fever_api/write_mark_group_spec.rb +++ b/spec/fever_api/write_mark_group_spec.rb @@ -17,6 +17,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api/write_mark_item_spec.rb b/spec/fever_api/write_mark_item_spec.rb index a6a4029f3..f3c1232c2 100644 --- a/spec/fever_api/write_mark_item_spec.rb +++ b/spec/fever_api/write_mark_item_spec.rb @@ -55,6 +55,6 @@ end it "returns an empty hash otherwise" do - subject.call.should == {} + expect(subject.call).to eq({}) end end diff --git a/spec/fever_api_spec.rb b/spec/fever_api_spec.rb index bd2b869f7..50557a8b0 100644 --- a/spec/fever_api_spec.rb +++ b/spec/fever_api_spec.rb @@ -33,7 +33,7 @@ def last_response_as_object describe "authentication" do it "authenticates request with correct api_key" do get "/", headers - last_response.should be_ok + expect(last_response).to be_ok end it "does not authenticate request with incorrect api_key" do @@ -55,8 +55,8 @@ def make_request(extra_headers = {}) it "returns standard answer" do make_request - last_response.should be_ok - last_response_as_object.should include(standard_answer) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) end it "returns groups and feeds by groups when 'groups' header is provided" do @@ -65,9 +65,9 @@ def make_request(extra_headers = {}) make_request(groups: nil) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( groups: [group.as_fever_json], feeds_groups: [{ group_id: group.id, feed_ids: feed.id.to_s }] ) @@ -79,9 +79,9 @@ def make_request(extra_headers = {}) make_request(feeds: nil) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( feeds: [feed.as_fever_json], feeds_groups: [{ group_id: group.id, feed_ids: feed.id.to_s }] ) @@ -90,9 +90,9 @@ def make_request(extra_headers = {}) it "returns favicons hash when 'favicons' header provided" do make_request(favicons: nil) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( favicons: [ { id: 0, @@ -108,9 +108,9 @@ def make_request(extra_headers = {}) make_request(items: nil, since_id: 5) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( items: [story_one.as_fever_json], total_items: 2 ) @@ -121,9 +121,9 @@ def make_request(extra_headers = {}) make_request(items: nil) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( items: [story_one.as_fever_json, story_two.as_fever_json], total_items: 2 ) @@ -134,9 +134,9 @@ def make_request(extra_headers = {}) make_request(items: nil, with_ids: 5) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( items: [story_one.as_fever_json], total_items: 1 ) @@ -145,9 +145,9 @@ def make_request(extra_headers = {}) it "returns links as empty array when 'links' header is provided" do make_request(links: nil) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include(links: []) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include(links: []) end it "returns unread items ids when 'unread_item_ids' header is provided" do @@ -155,9 +155,9 @@ def make_request(extra_headers = {}) make_request(unread_item_ids: nil) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( unread_item_ids: [story_one.id, story_two.id].join(",") ) end @@ -167,9 +167,9 @@ def make_request(extra_headers = {}) make_request(saved_item_ids: nil) - last_response.should be_ok - last_response_as_object.should include(standard_answer) - last_response_as_object.should include( + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) + expect(last_response_as_object).to include( saved_item_ids: [story_one.id, story_two.id].join(",") ) end @@ -185,8 +185,8 @@ def make_request(extra_headers = {}) make_request(mark: "item", as: "read", id: 10) - last_response.should be_ok - last_response_as_object.should include(standard_answer) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) end it "commands to mark story as unread" do @@ -194,8 +194,8 @@ def make_request(extra_headers = {}) make_request(mark: "item", as: "unread", id: 10) - last_response.should be_ok - last_response_as_object.should include(standard_answer) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) end it "commands to save story" do @@ -203,8 +203,8 @@ def make_request(extra_headers = {}) make_request(mark: "item", as: "saved", id: 10) - last_response.should be_ok - last_response_as_object.should include(standard_answer) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) end it "commands to unsave story" do @@ -212,8 +212,8 @@ def make_request(extra_headers = {}) make_request(mark: "item", as: "unsaved", id: 10) - last_response.should be_ok - last_response_as_object.should include(standard_answer) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) end it "commands to mark group as read" do @@ -221,8 +221,8 @@ def make_request(extra_headers = {}) make_request(mark: "group", as: "read", id: 10, before: 1375080946) - last_response.should be_ok - last_response_as_object.should include(standard_answer) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) end it "commands to mark entire feed as read" do @@ -230,8 +230,8 @@ def make_request(extra_headers = {}) make_request(mark: "feed", as: "read", id: 20, before: 1375080945) - last_response.should be_ok - last_response_as_object.should include(standard_answer) + expect(last_response).to be_ok + expect(last_response_as_object).to include(standard_answer) end end end diff --git a/spec/helpers/url_helers_spec.rb b/spec/helpers/url_helers_spec.rb index afca83454..0fa8b24dc 100644 --- a/spec/helpers/url_helers_spec.rb +++ b/spec/helpers/url_helers_spec.rb @@ -71,7 +71,7 @@ class Helper content = "" result = helper.expand_absolute_urls(content, "http://oodl.io/d/") - result.should include(weird_url) + expect(result).to include(weird_url) end end @@ -82,7 +82,7 @@ class Helper url = helper.normalize_url("//blog.golang.org/context", feed_url) - url.should eq "#{scheme}://blog.golang.org/context" + expect(url).to eq "#{scheme}://blog.golang.org/context" end end @@ -91,14 +91,14 @@ class Helper normalized_url = helper.normalize_url( input, "http://blog.golang.org/feed.atom" ) - normalized_url.should eq(input) + expect(normalized_url).to eq(input) end it "falls back to http if the base_url is also sheme less" do url = helper.normalize_url( "//blog.golang.org/context", "//blog.golang.org/feed.atom" ) - url.should eq "http://blog.golang.org/context" + expect(url).to eq "http://blog.golang.org/context" end it "resolves relative urls" do @@ -106,7 +106,7 @@ class Helper "/progrium/dokku/releases/tag/v0.4.4", "https://github.com/progrium/dokku/releases.atom" ) - url.should eq "https://github.com/progrium/dokku/releases/tag/v0.4.4" + expect(url).to eq "https://github.com/progrium/dokku/releases/tag/v0.4.4" end end end diff --git a/spec/javascript/support/vendor/js/chai.js b/spec/javascript/support/vendor/js/chai.js index b588bcc36..0d294e00d 100644 --- a/spec/javascript/support/vendor/js/chai.js +++ b/spec/javascript/support/vendor/js/chai.js @@ -272,10 +272,10 @@ var expect = require('./chai/interface/expect'); exports.use(expect); /*! - * Should interface + expect(*).to interface */ -var should = require('./chai/interface/should'); +expect(var).to = require('./chai/interface/should'); exports.use(should); /*! @@ -2874,7 +2874,7 @@ module.exports = function (chai, util) { , configurable: true }); - var should = {}; + expect(var).to = {}; should.equal = function (val1, val2, msg) { new Assertion(val1, msg).to.equal(val2); @@ -2909,8 +2909,8 @@ module.exports = function (chai, util) { return should; }; - chai.should = loadShould; - chai.Should = loadShould; + expect(chai).to = loadShould; + expect(chai).to = loadShould; }; }); diff --git a/spec/models/story_spec.rb b/spec/models/story_spec.rb index bac7435ef..3ca12d381 100644 --- a/spec/models/story_spec.rb +++ b/spec/models/story_spec.rb @@ -13,28 +13,28 @@ describe "#headline" do it "truncates to 50 chars" do - story.headline.size.should eq(50) + expect(story.headline.size).to eq(50) end it "uses a fallback string if story has no title" do story.title = nil - story.headline.should eq(Story::UNTITLED) + expect(story.headline).to eq(Story::UNTITLED) end it "strips html out" do story.title = "Super cool stuff" - story.headline.should eq "Super cool stuff" + expect(story.headline).to eq "Super cool stuff" end end describe "#lead" do it "truncates to 100 chars" do - story.lead.size.should eq(100) + expect(story.lead.size).to eq(100) end it "strips html out" do story.body = "Yo dawg" - story.lead.should eq "Yo dawg" + expect(story.lead).to eq "Yo dawg" end end @@ -43,7 +43,7 @@ before { story.feed = feed } it "returns the feeds name" do - story.source.should eq(feed.name) + expect(story.source).to eq(feed.name) end end end diff --git a/spec/repositories/feed_repository_spec.rb b/spec/repositories/feed_repository_spec.rb index f6fcb5601..c34aab972 100644 --- a/spec/repositories/feed_repository_spec.rb +++ b/spec/repositories/feed_repository_spec.rb @@ -12,7 +12,7 @@ FeedRepository.update_last_fetched(feed, timestamp) - feed.last_fetched.should eq timestamp + expect(feed.last_fetched).to eq timestamp end let(:weird_timestamp) { Time.parse("Mon, 01 Jan 0001 00:00:00 +0100") } @@ -22,7 +22,7 @@ FeedRepository.update_last_fetched(feed, weird_timestamp) - feed.last_fetched.should eq timestamp + expect(feed.last_fetched).to eq timestamp end it "doesn't update if timestamp is nil (feed does not report last modified)" do @@ -30,7 +30,7 @@ FeedRepository.update_last_fetched(feed, nil) - feed.last_fetched.should eq timestamp + expect(feed.last_fetched).to eq timestamp end it "doesn't update if timestamp is older than the current value" do @@ -39,7 +39,7 @@ FeedRepository.update_last_fetched(feed, one_week_ago) - feed.last_fetched.should eq timestamp + expect(feed.last_fetched).to eq timestamp end end @@ -49,8 +49,8 @@ FeedRepository.update_feed(feed, "Test Feed", "example.com/feed") - feed.name.should eq "Test Feed" - feed.url.should eq "example.com/feed" + expect(feed.name).to eq "Test Feed" + expect(feed.url).to eq "example.com/feed" end end @@ -67,7 +67,7 @@ result = FeedRepository.fetch(feed.id) - result.should eq feed + expect(result).to eq feed end end end diff --git a/spec/repositories/story_repository_spec.rb b/spec/repositories/story_repository_spec.rb index b06a3e052..d7993de66 100644 --- a/spec/repositories/story_repository_spec.rb +++ b/spec/repositories/story_repository_spec.rb @@ -11,7 +11,7 @@ it "normalizes story urls" do entry = double(url: "//blog.golang.org/context", title: "", content: "").as_null_object - StoryRepository.should receive(:normalize_url).with(entry.url, feed.url) + expect(StoryRepository).to receive(:normalize_url).with(entry.url, feed.url) StoryRepository.add(entry, feed) end @@ -20,7 +20,7 @@ entry = double(title: "n\u2028\u2029", content: "").as_null_object StoryRepository.stub(:normalize_url) - Story.should receive(:create).with(hash_including(title: "n")) + expect(Story).to receive(:create).with(hash_including(title: "n")) StoryRepository.add(entry, feed) end @@ -51,22 +51,22 @@ context "regressions" do it "handles tag properly" do result = StoryRepository.sanitize("WM_ERROR asdf") - result.should eq "WM_ERROR asdf" + expect(result).to eq "WM_ERROR asdf" end it "handles
tag properly" do result = StoryRepository.sanitize("
some code
") - result.should eq "
some code
" + expect(result).to eq "
some code
" end it "handles unprintable characters" do result = StoryRepository.sanitize("n\u2028\u2029") - result.should eq "n" + expect(result).to eq "n" end it "preserves line endings" do result = StoryRepository.sanitize("test\r\ncase") - result.should eq "test\r\ncase" + expect(result).to eq "test\r\ncase" end end end diff --git a/spec/utils/feed_discovery_spec.rb b/spec/utils/feed_discovery_spec.rb index b38aefc1b..ad086006b 100644 --- a/spec/utils/feed_discovery_spec.rb +++ b/spec/utils/feed_discovery_spec.rb @@ -18,7 +18,7 @@ result = FeedDiscovery.new.discover(url, finder, parser) - result.should be_falsey + expect(result).to be_falsey end it "returns a feed if the url provided is parsable" do @@ -26,7 +26,7 @@ result = FeedDiscovery.new.discover(url, finder, parser) - result.should eq feed + expect(result).to eq feed end it "returns false if the discovered feed is not parsable" do @@ -36,7 +36,7 @@ result = FeedDiscovery.new.discover(url, finder, parser) - result.should be_falsey + expect(result).to be_falsey end it "returns the feed if the discovered feed is parsable" do @@ -46,7 +46,7 @@ result = FeedDiscovery.new.discover(url, finder, parser) - result.should eq feed + expect(result).to eq feed end end end diff --git a/spec/utils/i18n_support_spec.rb b/spec/utils/i18n_support_spec.rb index e82795c02..dacfdeee2 100644 --- a/spec/utils/i18n_support_spec.rb +++ b/spec/utils/i18n_support_spec.rb @@ -11,7 +11,7 @@ let(:locale) { nil } it "should load default locale" do - I18n.locale.to_s.should eq "en" + expect(I18n.locale.to_s).to eq "en" I18n.locale.to_s.should_not eq nil end end @@ -20,7 +20,7 @@ let(:locale) { "en" } it "should load default locale" do - I18n.locale.to_s.should eq "en" + expect(I18n.locale.to_s).to eq "en" I18n.t("layout.title").should eq "AlkaliNews" end end diff --git a/spec/utils/opml_parser_spec.rb b/spec/utils/opml_parser_spec.rb index 193d351c7..e007dc195 100644 --- a/spec/utils/opml_parser_spec.rb +++ b/spec/utils/opml_parser_spec.rb @@ -23,13 +23,13 @@ eos resulted_values = result.values.flatten - resulted_values.size.should eq 2 - resulted_values.first[:name].should eq "a sample feed" - resulted_values.first[:url].should eq "http://feeds.feedburner.com/foobar" + expect(resulted_values.size).to eq 2 + expect(resulted_values.first[:name]).to eq "a sample feed" + expect(resulted_values.first[:url]).to eq "http://feeds.feedburner.com/foobar" - resulted_values.last[:name].should eq "Matt's Blog" - resulted_values.last[:url].should eq "http://mdswanson.com/atom.xml" - result.keys.first.should eq "Ungrouped" + expect(resulted_values.last[:name]).to eq "Matt's Blog" + expect(resulted_values.last[:url]).to eq "http://mdswanson.com/atom.xml" + expect(result.keys.first).to eq "Ungrouped" end it "handles nested groups of feeds" do @@ -49,10 +49,10 @@ eos resulted_values = result.values.flatten - resulted_values.count.should eq 1 - resulted_values.first[:name].should eq "a sample feed" - resulted_values.first[:url].should eq "http://feeds.feedburner.com/foobar" - result.keys.first.should eq "Technology News" + expect(resulted_values.count).to eq 1 + expect(resulted_values.first[:name]).to eq "a sample feed" + expect(resulted_values.first[:url]).to eq "http://feeds.feedburner.com/foobar" + expect(result.keys.first).to eq "Technology News" end it "doesn't explode when there are no feeds" do @@ -67,7 +67,7 @@ eos - result.should be_empty + expect(result).to be_empty end it "handles Feedly's exported OPML (missing :title)" do @@ -85,8 +85,8 @@ eos resulted_values = result.values.flatten - resulted_values.count.should eq 1 - resulted_values.first[:name].should eq "a sample feed" + expect(resulted_values.count).to eq 1 + expect(resulted_values.first[:name]).to eq "a sample feed" end end end From e2a7c9d4005b070b2e48e6a777a6bc3c74656402 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 20:41:57 -0700 Subject: [PATCH 17/90] More spec changes (should_recieve) --- .../users/change_user_password_spec.rb | 8 +++--- spec/commands/users/complete_setup_spec.rb | 2 +- spec/commands/users/create_user_spec.rb | 4 +-- spec/controllers/feeds_controller_spec.rb | 28 +++++++++---------- spec/controllers/first_run_controller_spec.rb | 6 ++-- spec/fever_api/authentication_spec.rb | 2 +- spec/fever_api/read_feeds_spec.rb | 2 +- spec/fever_api/read_groups_spec.rb | 2 +- spec/fever_api/read_items_spec.rb | 8 +++--- spec/fever_api/sync_saved_item_ids_spec.rb | 2 +- spec/fever_api/sync_unread_item_ids_spec.rb | 2 +- spec/fever_api/write_mark_feed_spec.rb | 4 +-- spec/fever_api/write_mark_group_spec.rb | 4 +-- spec/fever_api/write_mark_item_spec.rb | 16 +++++------ spec/fever_api_spec.rb | 24 ++++++++-------- spec/repositories/feed_repository_spec.rb | 2 +- spec/tasks/change_password_spec.rb | 10 +++---- spec/tasks/fetch_feed_spec.rb | 8 +++--- spec/tasks/fetch_feeds_spec.rb | 6 ++-- spec/tasks/remove_old_stories_spec.rb | 10 +++---- spec/utils/feed_discovery_spec.rb | 18 ++++++------ 21 files changed, 83 insertions(+), 85 deletions(-) diff --git a/spec/commands/users/change_user_password_spec.rb b/spec/commands/users/change_user_password_spec.rb index f34700d58..ec58bd431 100644 --- a/spec/commands/users/change_user_password_spec.rb +++ b/spec/commands/users/change_user_password_spec.rb @@ -12,8 +12,8 @@ describe "#change_user_password" do it "changes the password of the user" do - repo.should_receive(:first).and_return(user) - repo.should_receive(:save) + expect(repo).to receive(:first).and_return(user) + expect(repo).to receive(:save) command = ChangeUserPassword.new(repo) result = command.change_user_password(new_password) @@ -22,8 +22,8 @@ end it "changes the API key of the user" do - repo.should_receive(:first).and_return(user) - repo.should_receive(:save) + expect(repo).to receive(:first).and_return(user) + expect(repo).to receive(:save) command = ChangeUserPassword.new(repo) result = command.change_user_password(new_password) diff --git a/spec/commands/users/complete_setup_spec.rb b/spec/commands/users/complete_setup_spec.rb index c06d96c56..854ae360c 100644 --- a/spec/commands/users/complete_setup_spec.rb +++ b/spec/commands/users/complete_setup_spec.rb @@ -5,7 +5,7 @@ describe CompleteSetup do let(:user) { UserFactory.build } it "marks setup as complete" do - user.should_receive(:save).once + expect(user).to receive(:save).once result = CompleteSetup.complete(user) expect(result.setup_complete).to be_truthy diff --git a/spec/commands/users/create_user_spec.rb b/spec/commands/users/create_user_spec.rb index 2a1627347..ffbcc5133 100644 --- a/spec/commands/users/create_user_spec.rb +++ b/spec/commands/users/create_user_spec.rb @@ -9,8 +9,8 @@ it "remove any existing users and create a user with the password supplied" do command = CreateUser.new(repo) - repo.should_receive(:create) - repo.should_receive(:delete_all) + expect(repo).to receive(:create) + expect(repo).to receive(:delete_all) command.create("password") end diff --git a/spec/controllers/feeds_controller_spec.rb b/spec/controllers/feeds_controller_spec.rb index 441ba9d4e..3dd61c054 100644 --- a/spec/controllers/feeds_controller_spec.rb +++ b/spec/controllers/feeds_controller_spec.rb @@ -7,7 +7,7 @@ describe "GET /feeds" do it "renders a list of feeds" do - FeedRepository.should_receive(:list).and_return(feeds) + expect(FeedRepository).to receive(:list).and_return(feeds) get "/feeds" @@ -17,7 +17,7 @@ end it "displays message to add feeds if there are none" do - FeedRepository.should_receive(:list).and_return([]) + expect(FeedRepository).to receive(:list).and_return([]) get "/feeds" @@ -29,7 +29,7 @@ describe "GET /feeds/:feed_id/edit" do it "fetches a feed given the id" do feed = Feed.new(name: "Rainbows and unicorns", url: "example.com/feed") - FeedRepository.should_receive(:fetch).with("123").and_return(feed) + expect(FeedRepository).to receive(:fetch).with("123").and_return(feed) get "/feeds/123/edit" @@ -41,8 +41,8 @@ describe "PUT /feeds/:feed_id" do it "updates a feed given the id" do feed = FeedFactory.build(url: "example.com/atom") - FeedRepository.should_receive(:fetch).with("123").and_return(feed) - FeedRepository.should_receive(:update_feed).with(feed, "Test", "example.com/feed", nil) + expect(FeedRepository).to receive(:fetch).with("123").and_return(feed) + expect(FeedRepository).to receive(:update_feed).with(feed, "Test", "example.com/feed", nil) put "/feeds/123", feed_id: "123", feed_name: "Test", feed_url: "example.com/feed" @@ -51,8 +51,8 @@ it "updates a feed group given the id" do feed = FeedFactory.build(url: "example.com/atom") - FeedRepository.should_receive(:fetch).with("123").and_return(feed) - FeedRepository.should_receive(:update_feed).with(feed, feed.name, feed.url, "321") + expect(FeedRepository).to receive(:fetch).with("123").and_return(feed) + expect(FeedRepository).to receive(:update_feed).with(feed, feed.name, feed.url, "321") put "/feeds/123", feed_id: "123", feed_name: feed.name, feed_url: feed.url, group_id: "321" @@ -62,7 +62,7 @@ describe "DELETE /feeds/:feed_id" do it "deletes a feed given the id" do - FeedRepository.should_receive(:delete).with("123") + expect(FeedRepository).to receive(:delete).with("123") delete "/feeds/123" end @@ -84,8 +84,8 @@ let(:valid_feed) { double(valid?: true) } it "adds the feed and queues it to be fetched" do - AddNewFeed.should_receive(:add).with(feed_url).and_return(valid_feed) - FetchFeeds.should_receive(:enqueue).with([valid_feed]) + expect(AddNewFeed).to receive(:add).with(feed_url).and_return(valid_feed) + expect(FetchFeeds).to receive(:enqueue).with([valid_feed]) post "/feeds", feed_url: feed_url @@ -98,7 +98,7 @@ let(:feed_url) { "http://not-a-valid-feed.com/" } it "adds the feed and queues it to be fetched" do - AddNewFeed.should_receive(:add).with(feed_url).and_return(false) + expect(AddNewFeed).to receive(:add).with(feed_url).and_return(false) post "/feeds", feed_url: feed_url @@ -112,7 +112,7 @@ let(:invalid_feed) { double(valid?: false) } it "adds the feed and queues it to be fetched" do - AddNewFeed.should_receive(:add).with(feed_url).and_return(invalid_feed) + expect(AddNewFeed).to receive(:add).with(feed_url).and_return(invalid_feed) post "/feeds", feed_url: feed_url @@ -136,7 +136,7 @@ let(:opml_file) { Rack::Test::UploadedFile.new("spec/sample_data/subscriptions.xml", "application/xml") } it "parse OPML and starts fetching" do - ImportFromOpml.should_receive(:import).once + expect(ImportFromOpml).to receive(:import).once post "/feeds/import", "opml_file" => opml_file @@ -150,7 +150,7 @@ before { Feed.stub(:all) } it "returns an OPML file" do - ExportToOpml.any_instance.should_receive(:to_xml).and_return(some_xml) + expect_any_instance_of(ExportToOpml).to receive(:to_xml).and_return(some_xml) get "/feeds/export" diff --git a/spec/controllers/first_run_controller_spec.rb b/spec/controllers/first_run_controller_spec.rb index 38f4e0d01..8111b8985 100644 --- a/spec/controllers/first_run_controller_spec.rb +++ b/spec/controllers/first_run_controller_spec.rb @@ -36,7 +36,7 @@ end it "accepts confirmed passwords and redirects to next step" do - CreateUser.any_instance.should_receive(:create).with("foo").and_return(double(id: 1)) + expect_any_instance_of(CreateUser).to receive(:create).with("foo").and_return(double(id: 1)) post "/setup/password", password: "foo", password_confirmation: "foo" @@ -55,8 +55,8 @@ end it "displays the tutorial and completes setup" do - CompleteSetup.should_receive(:complete).with(user).once - FetchFeeds.should_receive(:enqueue).with(feeds).once + expect(CompleteSetup).to receive(:complete).with(user).once + expect(FetchFeeds).to receive(:enqueue).with(feeds).once get "/setup/tutorial" diff --git a/spec/fever_api/authentication_spec.rb b/spec/fever_api/authentication_spec.rb index b0bea48bb..927fbfd45 100644 --- a/spec/fever_api/authentication_spec.rb +++ b/spec/fever_api/authentication_spec.rb @@ -5,7 +5,7 @@ describe FeverAPI::Authentication do it "returns a hash with keys :auth and :last_refreshed_on_time" do fake_clock = double("clock") - fake_clock.should_receive(:now).and_return(1234567890) + expect(fake_clock).to receive(:now).and_return(1234567890) result = FeverAPI::Authentication.new(clock: fake_clock).call(double) expect(result).to eq({ auth: 1, last_refreshed_on_time: 1234567890 }) end diff --git a/spec/fever_api/read_feeds_spec.rb b/spec/fever_api/read_feeds_spec.rb index 1fafa1e63..355017e81 100644 --- a/spec/fever_api/read_feeds_spec.rb +++ b/spec/fever_api/read_feeds_spec.rb @@ -12,7 +12,7 @@ end it "returns a list of feeds" do - feed_repository.should_receive(:list).and_return(feeds) + expect(feed_repository).to receive(:list).and_return(feeds) subject.call("feeds" => nil).should eq({ feeds: [ { id: 5 }, diff --git a/spec/fever_api/read_groups_spec.rb b/spec/fever_api/read_groups_spec.rb index 2091bf3cf..82fca064a 100644 --- a/spec/fever_api/read_groups_spec.rb +++ b/spec/fever_api/read_groups_spec.rb @@ -10,7 +10,7 @@ subject { FeverAPI::ReadGroups.new(group_repository: group_repository) } it "returns a group list if requested" do - group_repository.should_receive(:list).and_return([group_1, group_2]) + expect(group_repository).to receive(:list).and_return([group_1, group_2]) subject.call("groups" => nil).should == { groups: [ { diff --git a/spec/fever_api/read_items_spec.rb b/spec/fever_api/read_items_spec.rb index 849b0283c..d45d992fb 100644 --- a/spec/fever_api/read_items_spec.rb +++ b/spec/fever_api/read_items_spec.rb @@ -10,7 +10,7 @@ end it "returns a list of unread items including total count" do - story_repository.should_receive(:unread).twice.and_return([ + expect(story_repository).to receive(:unread).twice.and_return([ double("story", as_fever_json: { id: 5 }), double("story", as_fever_json: { id: 7 }), double("story", as_fever_json: { id: 11 }) @@ -26,11 +26,11 @@ end it "returns a list of unread items since id including total count" do - story_repository.should_receive(:unread_since_id).with(3).and_return([ + expect(story_repository).to receive(:unread_since_id).with(3).and_return([ double("story", as_fever_json: { id: 5 }), double("story", as_fever_json: { id: 7 }) ]) - story_repository.should_receive(:unread).and_return([ + expect(story_repository).to receive(:unread).and_return([ double("story", as_fever_json: { id: 2 }), double("story", as_fever_json: { id: 5 }), double("story", as_fever_json: { id: 7 }) @@ -45,7 +45,7 @@ end it "returns a list of specified items including total count" do - story_repository.should_receive(:fetch_by_ids).with(%w(5 11)).twice.and_return([ + expect(story_repository).to receive(:fetch_by_ids).with(%w(5 11)).twice.and_return([ double("story", as_fever_json: { id: 5 }), double("story", as_fever_json: { id: 11 }) ]) diff --git a/spec/fever_api/sync_saved_item_ids_spec.rb b/spec/fever_api/sync_saved_item_ids_spec.rb index 96a7d1877..44c6f573b 100644 --- a/spec/fever_api/sync_saved_item_ids_spec.rb +++ b/spec/fever_api/sync_saved_item_ids_spec.rb @@ -12,7 +12,7 @@ end it "returns a list of starred items if requested" do - story_repository.should_receive(:all_starred).and_return(stories) + expect(story_repository).to receive(:all_starred).and_return(stories) subject.call("saved_item_ids" => nil).should == { saved_item_ids: story_ids.join(",") } end diff --git a/spec/fever_api/sync_unread_item_ids_spec.rb b/spec/fever_api/sync_unread_item_ids_spec.rb index 0ed0f07c5..ac3133894 100644 --- a/spec/fever_api/sync_unread_item_ids_spec.rb +++ b/spec/fever_api/sync_unread_item_ids_spec.rb @@ -12,7 +12,7 @@ end it "returns a list of unread items if requested" do - story_repository.should_receive(:unread).and_return(stories) + expect(story_repository).to receive(:unread).and_return(stories) subject.call("unread_item_ids" => nil).should == { unread_item_ids: story_ids.join(",") } end diff --git a/spec/fever_api/write_mark_feed_spec.rb b/spec/fever_api/write_mark_feed_spec.rb index 5fe3256e3..92f7f3e36 100644 --- a/spec/fever_api/write_mark_feed_spec.rb +++ b/spec/fever_api/write_mark_feed_spec.rb @@ -11,8 +11,8 @@ end it "instantiates a feed marker and calls mark_feed_as_read if requested" do - marker_class.should_receive(:new).with(5, 1234567890).and_return(feed_marker) - feed_marker.should_receive(:mark_feed_as_read) + expect(marker_class).to receive(:new).with(5, 1234567890).and_return(feed_marker) + expect(feed_marker).to receive(:mark_feed_as_read) subject.call(mark: "feed", id: 5, before: 1234567890).should == {} end diff --git a/spec/fever_api/write_mark_group_spec.rb b/spec/fever_api/write_mark_group_spec.rb index adbe2dcad..6efd4354a 100644 --- a/spec/fever_api/write_mark_group_spec.rb +++ b/spec/fever_api/write_mark_group_spec.rb @@ -11,8 +11,8 @@ end it "instantiates a group marker and calls mark_group_as_read if requested" do - marker_class.should_receive(:new).with(5, 1234567890).and_return(group_marker) - group_marker.should_receive(:mark_group_as_read) + expect(marker_class).to receive(:new).with(5, 1234567890).and_return(group_marker) + expect(group_marker).to receive(:mark_group_as_read) subject.call(mark: "group", id: 5, before: 1234567890).should == {} end diff --git a/spec/fever_api/write_mark_item_spec.rb b/spec/fever_api/write_mark_item_spec.rb index f3c1232c2..dcaae965c 100644 --- a/spec/fever_api/write_mark_item_spec.rb +++ b/spec/fever_api/write_mark_item_spec.rb @@ -12,8 +12,8 @@ end it "instantiates an item marker and calls mark_item_as_read if requested" do - marker_class.should_receive(:new).with(5).and_return(item_marker) - item_marker.should_receive(:mark_as_read) + expect(marker_class).to receive(:new).with(5).and_return(item_marker) + expect(item_marker).to receive(:mark_as_read) subject.call(mark: "item", as: "read", id: 5).should == {} end end @@ -24,8 +24,8 @@ end it "instantiates an item marker and calls mark_item_as_unread if requested" do - marker_class.should_receive(:new).with(5).and_return(item_marker) - item_marker.should_receive(:mark_as_unread) + expect(marker_class).to receive(:new).with(5).and_return(item_marker) + expect(item_marker).to receive(:mark_as_unread) subject.call(mark: "item", as: "unread", id: 5).should == {} end end @@ -36,8 +36,8 @@ end it "instantiates an item marker and calls mark_item_as_starred if requested" do - marker_class.should_receive(:new).with(5).and_return(item_marker) - item_marker.should_receive(:mark_as_starred) + expect(marker_class).to receive(:new).with(5).and_return(item_marker) + expect(item_marker).to receive(:mark_as_starred) subject.call(mark: "item", as: "saved", id: 5).should == {} end end @@ -48,8 +48,8 @@ end it "instantiates an item marker and calls mark_item_as_unstarred if requested" do - marker_class.should_receive(:new).with(5).and_return(item_marker) - item_marker.should_receive(:mark_as_unstarred) + expect(marker_class).to receive(:new).with(5).and_return(item_marker) + expect(item_marker).to receive(:mark_as_unstarred) subject.call(mark: "item", as: "unsaved", id: 5).should == {} end end diff --git a/spec/fever_api_spec.rb b/spec/fever_api_spec.rb index 50557a8b0..f34fe116b 100644 --- a/spec/fever_api_spec.rb +++ b/spec/fever_api_spec.rb @@ -103,8 +103,8 @@ def make_request(extra_headers = {}) end it "returns stories when 'items' header is provided along with 'since_id'" do - StoryRepository.should_receive(:unread_since_id).with("5").and_return([story_one]) - StoryRepository.should_receive(:unread).and_return([story_one, story_two]) + expect(StoryRepository).to receive(:unread_since_id).with("5").and_return([story_one]) + expect(StoryRepository).to receive(:unread).and_return([story_one, story_two]) make_request(items: nil, since_id: 5) @@ -117,7 +117,7 @@ def make_request(extra_headers = {}) end it "returns stories when 'items' header is provided without 'since_id'" do - StoryRepository.should_receive(:unread).twice.and_return([story_one, story_two]) + expect(StoryRepository).to receive(:unread).twice.and_return([story_one, story_two]) make_request(items: nil) @@ -130,7 +130,7 @@ def make_request(extra_headers = {}) end it "returns stories ids when 'items' header is provided along with 'with_ids'" do - StoryRepository.should_receive(:fetch_by_ids).twice.with(["5"]).and_return([story_one]) + expect(StoryRepository).to receive(:fetch_by_ids).twice.with(["5"]).and_return([story_one]) make_request(items: nil, with_ids: 5) @@ -151,7 +151,7 @@ def make_request(extra_headers = {}) end it "returns unread items ids when 'unread_item_ids' header is provided" do - StoryRepository.should_receive(:unread).and_return([story_one, story_two]) + expect(StoryRepository).to receive(:unread).and_return([story_one, story_two]) make_request(unread_item_ids: nil) @@ -163,7 +163,7 @@ def make_request(extra_headers = {}) end it "returns starred items when 'saved_item_ids' header is provided" do - Story.should_receive(:where).with(is_starred: true).and_return([story_one, story_two]) + expect(Story).to receive(:where).with(is_starred: true).and_return([story_one, story_two]) make_request(saved_item_ids: nil) @@ -181,7 +181,7 @@ def make_request(extra_headers = {}) end it "commands to mark story as read" do - MarkAsRead.should_receive(:new).with("10").and_return(double(mark_as_read: true)) + expect(MarkAsRead).to receive(:new).with("10").and_return(double(mark_as_read: true)) make_request(mark: "item", as: "read", id: 10) @@ -190,7 +190,7 @@ def make_request(extra_headers = {}) end it "commands to mark story as unread" do - MarkAsUnread.should_receive(:new).with("10").and_return(double(mark_as_unread: true)) + expect(MarkAsUnread).to receive(:new).with("10").and_return(double(mark_as_unread: true)) make_request(mark: "item", as: "unread", id: 10) @@ -199,7 +199,7 @@ def make_request(extra_headers = {}) end it "commands to save story" do - MarkAsStarred.should_receive(:new).with("10").and_return(double(mark_as_starred: true)) + expect(MarkAsStarred).to receive(:new).with("10").and_return(double(mark_as_starred: true)) make_request(mark: "item", as: "saved", id: 10) @@ -208,7 +208,7 @@ def make_request(extra_headers = {}) end it "commands to unsave story" do - MarkAsUnstarred.should_receive(:new).with("10").and_return(double(mark_as_unstarred: true)) + expect(MarkAsUnstarred).to receive(:new).with("10").and_return(double(mark_as_unstarred: true)) make_request(mark: "item", as: "unsaved", id: 10) @@ -217,7 +217,7 @@ def make_request(extra_headers = {}) end it "commands to mark group as read" do - MarkGroupAsRead.should_receive(:new).with("10", "1375080946").and_return(double(mark_group_as_read: true)) + expect(MarkGroupAsRead).to receive(:new).with("10", "1375080946").and_return(double(mark_group_as_read: true)) make_request(mark: "group", as: "read", id: 10, before: 1375080946) @@ -226,7 +226,7 @@ def make_request(extra_headers = {}) end it "commands to mark entire feed as read" do - MarkFeedAsRead.should_receive(:new).with("20", "1375080945").and_return(double(mark_feed_as_read: true)) + expect(MarkFeedAsRead).to receive(:new).with("20", "1375080945").and_return(double(mark_feed_as_read: true)) make_request(mark: "feed", as: "read", id: 20, before: 1375080945) diff --git a/spec/repositories/feed_repository_spec.rb b/spec/repositories/feed_repository_spec.rb index c34aab972..62d4192e3 100644 --- a/spec/repositories/feed_repository_spec.rb +++ b/spec/repositories/feed_repository_spec.rb @@ -58,7 +58,7 @@ let(:feed) { Feed.new(id: 1) } it "finds by id" do - Feed.should_receive(:find).with(feed.id).and_return(feed) + expect(Feed).to receive(:find).with(feed.id).and_return(feed) FeedRepository.fetch(feed.id) end diff --git a/spec/tasks/change_password_spec.rb b/spec/tasks/change_password_spec.rb index b6b8bed10..f6489b9a8 100644 --- a/spec/tasks/change_password_spec.rb +++ b/spec/tasks/change_password_spec.rb @@ -10,22 +10,20 @@ describe "#change_password" do it "invokes command with confirmed password" do - task.should_receive(:ask_hidden).twice + expect(task).to receive(:ask_hidden).twice .and_return(new_password, new_password) - command - .should_receive(:change_user_password) + expect(command).to receive(:change_user_password) .with(new_password) task.change_password end it "repeats until a matching confirmation" do - task.should_receive(:ask_hidden).exactly(2).times + expect(task).to receive(:ask_hidden).exactly(2).times .and_return(new_password, "", new_password, new_password) - command - .should_receive(:change_user_password) + expect(command).to receive(:change_user_password) .with(new_password) task.change_password diff --git a/spec/tasks/fetch_feed_spec.rb b/spec/tasks/fetch_feed_spec.rb index fad2de71f..9eec9addc 100644 --- a/spec/tasks/fetch_feed_spec.rb +++ b/spec/tasks/fetch_feed_spec.rb @@ -50,14 +50,14 @@ before { FindNewStories.any_instance.stub(:new_stories).and_return([new_story]) } it "should only add posts that are new" do - StoryRepository.should_receive(:add).with(new_story, daring_fireball) + expect(StoryRepository).to receive(:add).with(new_story, daring_fireball) StoryRepository.should_not_receive(:add).with(old_story, daring_fireball) FetchFeed.new(daring_fireball, parser: fake_parser).fetch end it "should update the last fetched time for the feed" do - FeedRepository.should_receive(:update_last_fetched) + expect(FeedRepository).to receive(:update_last_fetched) .with(daring_fireball, now) FetchFeed.new(daring_fireball, parser: fake_parser).fetch @@ -69,7 +69,7 @@ fake_feed = double(last_modified: Time.new(2012, 12, 31), entries: []) parser = double(fetch_and_parse: fake_feed) - FeedRepository.should_receive(:set_status) + expect(FeedRepository).to receive(:set_status) .with(:green, daring_fireball) FetchFeed.new(daring_fireball, parser: parser).fetch @@ -78,7 +78,7 @@ it "sets the status to red if things go wrong" do parser = double(fetch_and_parse: 404) - FeedRepository.should_receive(:set_status) + expect(FeedRepository).to receive(:set_status) .with(:red, daring_fireball) FetchFeed.new(daring_fireball, parser: parser).fetch diff --git a/spec/tasks/fetch_feeds_spec.rb b/spec/tasks/fetch_feeds_spec.rb index a464883db..7f43738ae 100644 --- a/spec/tasks/fetch_feeds_spec.rb +++ b/spec/tasks/fetch_feeds_spec.rb @@ -11,10 +11,10 @@ pool.stub(:process).and_yield FetchFeed.stub(:new).and_return(fetcher_one, fetcher_two) - fetcher_one.should_receive(:fetch).once - fetcher_two.should_receive(:fetch).once + expect(fetcher_one).to receive(:fetch).once + expect(fetcher_two).to receive(:fetch).once - pool.should_receive(:shutdown) + expect(pool).to receive(:shutdown) FetchFeeds.new(feeds, pool).fetch_all end diff --git a/spec/tasks/remove_old_stories_spec.rb b/spec/tasks/remove_old_stories_spec.rb index c0c7698c1..373d983a3 100644 --- a/spec/tasks/remove_old_stories_spec.rb +++ b/spec/tasks/remove_old_stories_spec.rb @@ -12,7 +12,7 @@ it "should pass along the number of days to the story repository query" do RemoveOldStories.stub(:pruned_feeds) { [] } - StoryRepository.should_receive(:unstarred_read_stories_older_than).with(7).and_return(stories_mock) + expect(StoryRepository).to receive(:unstarred_read_stories_older_than).with(7).and_return(stories_mock) RemoveOldStories.remove!(7) end @@ -21,7 +21,7 @@ RemoveOldStories.stub(:pruned_feeds) { [] } StoryRepository.stub(:unstarred_read_stories_older_than) { stories_mock } - stories_mock.should_receive(:delete_all) + expect(stories_mock).to receive(:delete_all) RemoveOldStories.remove!(11) end @@ -33,7 +33,7 @@ stories end - FeedRepository.should_receive(:fetch_by_ids).with([3, 5]).and_return([]) + expect(FeedRepository).to receive(:fetch_by_ids).with([3, 5]).and_return([]) RemoveOldStories.remove!(13) end @@ -43,8 +43,8 @@ RemoveOldStories.stub(:pruned_feeds) { feeds } RemoveOldStories.stub(:old_stories) { stories_mock } - FeedRepository.should_receive(:update_last_fetched).with(feeds.first, anything) - FeedRepository.should_receive(:update_last_fetched).with(feeds.last, anything) + expect(FeedRepository).to receive(:update_last_fetched).with(feeds.first, anything) + expect(FeedRepository).to receive(:update_last_fetched).with(feeds.last, anything) RemoveOldStories.remove!(13) end diff --git a/spec/utils/feed_discovery_spec.rb b/spec/utils/feed_discovery_spec.rb index ad086006b..169ced2d8 100644 --- a/spec/utils/feed_discovery_spec.rb +++ b/spec/utils/feed_discovery_spec.rb @@ -13,8 +13,8 @@ describe "#discover" do it "returns false if url is not a feed and feed url cannot be discovered" do - parser.should_receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) - finder.should_receive(:find).and_return([]) + expect(parser).to receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) + expect(finder).to receive(:find).and_return([]) result = FeedDiscovery.new.discover(url, finder, parser) @@ -22,7 +22,7 @@ end it "returns a feed if the url provided is parsable" do - parser.should_receive(:fetch_and_parse).with(url, anything).and_return(feed) + expect(parser).to receive(:fetch_and_parse).with(url, anything).and_return(feed) result = FeedDiscovery.new.discover(url, finder, parser) @@ -30,9 +30,9 @@ end it "returns false if the discovered feed is not parsable" do - parser.should_receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) - finder.should_receive(:find).and_return([invalid_discovered_url]) - parser.should_receive(:fetch_and_parse).with(invalid_discovered_url, anything).and_raise(StandardError) + expect(parser).to receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) + expect(finder).to receive(:find).and_return([invalid_discovered_url]) + expect(parser).to receive(:fetch_and_parse).with(invalid_discovered_url, anything).and_raise(StandardError) result = FeedDiscovery.new.discover(url, finder, parser) @@ -40,9 +40,9 @@ end it "returns the feed if the discovered feed is parsable" do - parser.should_receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) - finder.should_receive(:find).and_return([valid_discovered_url]) - parser.should_receive(:fetch_and_parse).with(valid_discovered_url, anything).and_return(feed) + expect(parser).to receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) + expect(finder).to receive(:find).and_return([valid_discovered_url]) + expect(parser).to receive(:fetch_and_parse).with(valid_discovered_url, anything).and_return(feed) result = FeedDiscovery.new.discover(url, finder, parser) From c98ea9a4f65c771c046002521b1549c57e9a042e Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 20:52:05 -0700 Subject: [PATCH 18/90] More removal of should --- spec/commands/users/change_user_password_spec.rb | 2 +- spec/controllers/feeds_controller_spec.rb | 4 ++-- spec/controllers/first_run_controller_spec.rb | 8 ++++---- spec/controllers/sessions_controller_spec.rb | 6 +++--- spec/fever_api/read_favicons_spec.rb | 4 ++-- spec/fever_api/read_feeds_groups_spec.rb | 8 ++++---- spec/fever_api/read_feeds_spec.rb | 2 +- spec/fever_api/read_groups_spec.rb | 4 ++-- spec/fever_api/read_items_spec.rb | 12 ++++++------ spec/fever_api/read_links_spec.rb | 2 +- spec/fever_api/sync_saved_item_ids_spec.rb | 2 +- spec/fever_api/sync_unread_item_ids_spec.rb | 2 +- spec/fever_api/write_mark_feed_spec.rb | 2 +- spec/fever_api/write_mark_group_spec.rb | 2 +- spec/fever_api/write_mark_item_spec.rb | 8 ++++---- spec/helpers/url_helers_spec.rb | 8 ++++---- spec/models/migration_status_spec.rb | 2 +- spec/repositories/story_repository_spec.rb | 4 ++-- spec/utils/i18n_support_spec.rb | 2 +- 19 files changed, 42 insertions(+), 42 deletions(-) diff --git a/spec/commands/users/change_user_password_spec.rb b/spec/commands/users/change_user_password_spec.rb index ec58bd431..caae4e3ee 100644 --- a/spec/commands/users/change_user_password_spec.rb +++ b/spec/commands/users/change_user_password_spec.rb @@ -18,7 +18,7 @@ command = ChangeUserPassword.new(repo) result = command.change_user_password(new_password) - BCrypt::Password.new(result.password_digest).should eq new_password + expect(BCrypt::Password.new(result.password_digest)).to eq new_password end it "changes the API key of the user" do diff --git a/spec/controllers/feeds_controller_spec.rb b/spec/controllers/feeds_controller_spec.rb index 3dd61c054..6b78bbb21 100644 --- a/spec/controllers/feeds_controller_spec.rb +++ b/spec/controllers/feeds_controller_spec.rb @@ -90,7 +90,7 @@ post "/feeds", feed_url: feed_url expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/" + expect(URI.parse(last_response.location).path).to eq "/" end end @@ -141,7 +141,7 @@ post "/feeds/import", "opml_file" => opml_file expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/setup/tutorial" + expect(URI.parse(last_response.location).path).to eq "/setup/tutorial" end end diff --git a/spec/controllers/first_run_controller_spec.rb b/spec/controllers/first_run_controller_spec.rb index 8111b8985..0aa05b533 100644 --- a/spec/controllers/first_run_controller_spec.rb +++ b/spec/controllers/first_run_controller_spec.rb @@ -41,7 +41,7 @@ post "/setup/password", password: "foo", password_confirmation: "foo" expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/feeds/import" + expect(URI.parse(last_response.location).path).to eq "/feeds/import" end end @@ -79,15 +79,15 @@ it "should redirect any requests to first run stuff" do get "/" expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/news" + expect(URI.parse(last_response.location).path).to eq "/news" get "/setup/password" expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/news" + expect(URI.parse(last_response.location).path).to eq "/news" get "/setup/tutorial" expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/news" + expect(URI.parse(last_response.location).path).to eq "/news" end end end diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index 4f4564f20..f4faf67a0 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -31,7 +31,7 @@ expect(session[:user_id]).to eq 1 expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/" + expect(URI.parse(last_response.location).path).to eq "/" end it "redirects to the previous path when present" do @@ -41,7 +41,7 @@ "rack.session" => { redirect_to: "/archive" } expect(session[:redirect_to]).to be_nil - URI.parse(last_response.location).path.should eq "/archive" + expect(URI.parse(last_response.location).path).to eq "/archive" end end @@ -52,7 +52,7 @@ expect(session[:user_id]).to be_nil expect(last_response.status).to be 302 - URI.parse(last_response.location).path.should eq "/" + expect(URI.parse(last_response.location).path).to eq "/" end end end diff --git a/spec/fever_api/read_favicons_spec.rb b/spec/fever_api/read_favicons_spec.rb index 30bb0bd90..f42b06609 100644 --- a/spec/fever_api/read_favicons_spec.rb +++ b/spec/fever_api/read_favicons_spec.rb @@ -6,14 +6,14 @@ subject { FeverAPI::ReadFavicons.new } it "returns a fixed icon list if requested" do - subject.call("favicons" => nil).should == { + expect(subject.call("favicons" => nil)).to eq ({ favicons: [ { id: 0, data: "image/gif;base64,R0lGODlhAQABAIAAAObm5gAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" } ] - } + }) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_feeds_groups_spec.rb b/spec/fever_api/read_feeds_groups_spec.rb index a675ded28..ae42283e1 100644 --- a/spec/fever_api/read_feeds_groups_spec.rb +++ b/spec/fever_api/read_feeds_groups_spec.rb @@ -14,27 +14,27 @@ it "returns a list of groups requested through feeds" do feed_repository.stub_chain(:in_group, :order).and_return(feeds) - subject.call("feeds" => nil).should == { + expect(subject.call("feeds" => nil)).to eq ({ feeds_groups: [ { group_id: 1, feed_ids: feed_ids.join(",") } ] - } + }) end it "returns a list of groups requested through groups" do feed_repository.stub_chain(:in_group, :order).and_return(feeds) - subject.call("groups" => nil).should == { + expect(subject.call("groups" => nil)).to eq ({ feeds_groups: [ { group_id: 1, feed_ids: feed_ids.join(",") } ] - } + }) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_feeds_spec.rb b/spec/fever_api/read_feeds_spec.rb index 355017e81..0d6e654e1 100644 --- a/spec/fever_api/read_feeds_spec.rb +++ b/spec/fever_api/read_feeds_spec.rb @@ -13,7 +13,7 @@ it "returns a list of feeds" do expect(feed_repository).to receive(:list).and_return(feeds) - subject.call("feeds" => nil).should eq({ + expect(subject.call("feeds" => nil)).to eq({ feeds: [ { id: 5 }, { id: 7 }, diff --git a/spec/fever_api/read_groups_spec.rb b/spec/fever_api/read_groups_spec.rb index 82fca064a..d9c5a9d0a 100644 --- a/spec/fever_api/read_groups_spec.rb +++ b/spec/fever_api/read_groups_spec.rb @@ -11,7 +11,7 @@ it "returns a group list if requested" do expect(group_repository).to receive(:list).and_return([group_1, group_2]) - subject.call("groups" => nil).should == { + expect(subject.call("groups" => nil)).to eq({ groups: [ { id: 1, @@ -22,7 +22,7 @@ title: "World news" } ] - } + }) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_items_spec.rb b/spec/fever_api/read_items_spec.rb index d45d992fb..cfce67c89 100644 --- a/spec/fever_api/read_items_spec.rb +++ b/spec/fever_api/read_items_spec.rb @@ -15,14 +15,14 @@ double("story", as_fever_json: { id: 7 }), double("story", as_fever_json: { id: 11 }) ]) - subject.call("items" => nil).should == { + expect(subject.call("items" => nil)).to eq({ items: [ { id: 5 }, { id: 7 }, { id: 11 } ], total_items: 3 - } + }) end it "returns a list of unread items since id including total count" do @@ -35,13 +35,13 @@ double("story", as_fever_json: { id: 5 }), double("story", as_fever_json: { id: 7 }) ]) - subject.call("items" => nil, since_id: 3).should == { + expect(subject.call("items" => nil, since_id: 3)).to eq({ items: [ { id: 5 }, { id: 7 } ], total_items: 3 - } + }) end it "returns a list of specified items including total count" do @@ -50,13 +50,13 @@ double("story", as_fever_json: { id: 11 }) ]) - subject.call("items" => nil, with_ids: "5,11").should == { + expect(subject.call("items" => nil, with_ids: "5,11")).to eq({ items: [ { id: 5 }, { id: 11 } ], total_items: 2 - } + }) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_links_spec.rb b/spec/fever_api/read_links_spec.rb index ca3231459..eeebdfbfc 100644 --- a/spec/fever_api/read_links_spec.rb +++ b/spec/fever_api/read_links_spec.rb @@ -6,7 +6,7 @@ subject { FeverAPI::ReadLinks.new } it "returns a fixed link list if requested" do - subject.call("links" => nil).should == { links: [] } + expect(subject.call("links" => nil)).to eq({ links: [] }) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/sync_saved_item_ids_spec.rb b/spec/fever_api/sync_saved_item_ids_spec.rb index 44c6f573b..d03fafbe8 100644 --- a/spec/fever_api/sync_saved_item_ids_spec.rb +++ b/spec/fever_api/sync_saved_item_ids_spec.rb @@ -13,7 +13,7 @@ it "returns a list of starred items if requested" do expect(story_repository).to receive(:all_starred).and_return(stories) - subject.call("saved_item_ids" => nil).should == { saved_item_ids: story_ids.join(",") } + expect(subject.call("saved_item_ids" => nil)).to eq({ saved_item_ids: story_ids.join(",") }) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/sync_unread_item_ids_spec.rb b/spec/fever_api/sync_unread_item_ids_spec.rb index ac3133894..f63a2c200 100644 --- a/spec/fever_api/sync_unread_item_ids_spec.rb +++ b/spec/fever_api/sync_unread_item_ids_spec.rb @@ -13,7 +13,7 @@ it "returns a list of unread items if requested" do expect(story_repository).to receive(:unread).and_return(stories) - subject.call("unread_item_ids" => nil).should == { unread_item_ids: story_ids.join(",") } + expect(subject.call("unread_item_ids" => nil)).to eq({ unread_item_ids: story_ids.join(",") }) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/write_mark_feed_spec.rb b/spec/fever_api/write_mark_feed_spec.rb index 92f7f3e36..793112034 100644 --- a/spec/fever_api/write_mark_feed_spec.rb +++ b/spec/fever_api/write_mark_feed_spec.rb @@ -13,7 +13,7 @@ it "instantiates a feed marker and calls mark_feed_as_read if requested" do expect(marker_class).to receive(:new).with(5, 1234567890).and_return(feed_marker) expect(feed_marker).to receive(:mark_feed_as_read) - subject.call(mark: "feed", id: 5, before: 1234567890).should == {} + expect(subject.call(mark: "feed", id: 5, before: 1234567890)).to eq({}) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/write_mark_group_spec.rb b/spec/fever_api/write_mark_group_spec.rb index 6efd4354a..1262f048c 100644 --- a/spec/fever_api/write_mark_group_spec.rb +++ b/spec/fever_api/write_mark_group_spec.rb @@ -13,7 +13,7 @@ it "instantiates a group marker and calls mark_group_as_read if requested" do expect(marker_class).to receive(:new).with(5, 1234567890).and_return(group_marker) expect(group_marker).to receive(:mark_group_as_read) - subject.call(mark: "group", id: 5, before: 1234567890).should == {} + expect(subject.call(mark: "group", id: 5, before: 1234567890)).to eq({}) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/write_mark_item_spec.rb b/spec/fever_api/write_mark_item_spec.rb index dcaae965c..2a2929409 100644 --- a/spec/fever_api/write_mark_item_spec.rb +++ b/spec/fever_api/write_mark_item_spec.rb @@ -14,7 +14,7 @@ it "instantiates an item marker and calls mark_item_as_read if requested" do expect(marker_class).to receive(:new).with(5).and_return(item_marker) expect(item_marker).to receive(:mark_as_read) - subject.call(mark: "item", as: "read", id: 5).should == {} + expect(subject.call(mark: "item", as: "read", id: 5)).to eq({}) end end @@ -26,7 +26,7 @@ it "instantiates an item marker and calls mark_item_as_unread if requested" do expect(marker_class).to receive(:new).with(5).and_return(item_marker) expect(item_marker).to receive(:mark_as_unread) - subject.call(mark: "item", as: "unread", id: 5).should == {} + expect(subject.call(mark: "item", as: "unread", id: 5)).to eq({}) end end @@ -38,7 +38,7 @@ it "instantiates an item marker and calls mark_item_as_starred if requested" do expect(marker_class).to receive(:new).with(5).and_return(item_marker) expect(item_marker).to receive(:mark_as_starred) - subject.call(mark: "item", as: "saved", id: 5).should == {} + expect(subject.call(mark: "item", as: "saved", id: 5)).to eq({}) end end @@ -50,7 +50,7 @@ it "instantiates an item marker and calls mark_item_as_unstarred if requested" do expect(marker_class).to receive(:new).with(5).and_return(item_marker) expect(item_marker).to receive(:mark_as_unstarred) - subject.call(mark: "item", as: "unsaved", id: 5).should == {} + expect(subject.call(mark: "item", as: "unsaved", id: 5)).to eq({}) end end diff --git a/spec/helpers/url_helers_spec.rb b/spec/helpers/url_helers_spec.rb index 0fa8b24dc..05564591c 100644 --- a/spec/helpers/url_helers_spec.rb +++ b/spec/helpers/url_helers_spec.rb @@ -13,7 +13,7 @@ class Helper it "preserves existing absolute urls" do content = 'bar' - helper.expand_absolute_urls(content, nil).should eq content + expect(helper.expand_absolute_urls(content, nil)).to eq content end it "replaces relative urls in a, img and video tags" do @@ -26,7 +26,7 @@ class Helper EOS result = helper.expand_absolute_urls(content, "http://oodl.io/d/") - result.gsub(/\n/, "").should eq <<-EOS.gsub(/\n/, "") + expect(result.gsub(/\n/, "")).to eq <<-EOS.gsub(/\n/, "")
tee @@ -37,7 +37,7 @@ class Helper end it "handles empty body" do - helper.expand_absolute_urls("", nil).should eq "" + expect(helper.expand_absolute_urls("", nil)).to eq "" end it "doesn't modify tags that do not have url attributes" do @@ -50,7 +50,7 @@ class Helper EOS result = helper.expand_absolute_urls(content, "http://oodl.io/d/") - result.gsub(/\n/, "").should eq <<-EOS.gsub(/\n/, "") + expect(result.gsub(/\n/, "")).to eq <<-EOS.gsub(/\n/, "")
diff --git a/spec/models/migration_status_spec.rb b/spec/models/migration_status_spec.rb index ba741878e..40239a144 100644 --- a/spec/models/migration_status_spec.rb +++ b/spec/models/migration_status_spec.rb @@ -15,7 +15,7 @@ migrator.stub(:migrations_path) migrator.stub(:current_version).and_return 1 - MigrationStatus.new(migrator).pending_migrations.should eq ["Migration B - 2", "Migration C - 3"] + expect(MigrationStatus.new(migrator).pending_migrations).to eq(["Migration B - 2", "Migration C - 3"]) end end end diff --git a/spec/repositories/story_repository_spec.rb b/spec/repositories/story_repository_spec.rb index d7993de66..2a9445726 100644 --- a/spec/repositories/story_repository_spec.rb +++ b/spec/repositories/story_repository_spec.rb @@ -39,11 +39,11 @@ end it "sanitizes content" do - StoryRepository.extract_content(entry).should eq "Some test content" + expect(StoryRepository.extract_content(entry)).to eq "Some test content" end it "falls back to summary if there is no content" do - StoryRepository.extract_content(summary_only).should eq "Dumb publisher" + expect(StoryRepository.extract_content(summary_only)).to eq "Dumb publisher" end end diff --git a/spec/utils/i18n_support_spec.rb b/spec/utils/i18n_support_spec.rb index dacfdeee2..60c44b3f8 100644 --- a/spec/utils/i18n_support_spec.rb +++ b/spec/utils/i18n_support_spec.rb @@ -21,7 +21,7 @@ it "should load default locale" do expect(I18n.locale.to_s).to eq "en" - I18n.t("layout.title").should eq "AlkaliNews" + expect(I18n.t("layout.title")).to eq "AlkaliNews" end end From a64b9cd9329dd34ae58df81491464249e933aca0 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 22:27:02 -0700 Subject: [PATCH 19/90] Finished upgrading specs to not use deprecated API --- spec/controllers/debug_controller_spec.rb | 6 +++--- spec/controllers/feeds_controller_spec.rb | 2 +- spec/controllers/first_run_controller_spec.rb | 8 ++++---- spec/controllers/sessions_controller_spec.rb | 6 +++--- spec/fever_api/read_feeds_groups_spec.rb | 4 ++-- spec/fever_api_spec.rb | 16 ++++++++-------- spec/javascript/spec/models/story_spec.js | 16 ++++++++-------- spec/models/migration_status_spec.rb | 6 +++--- spec/repositories/feed_repository_spec.rb | 2 +- spec/repositories/story_repository_spec.rb | 4 ++-- spec/spec_helper.rb | 1 + spec/tasks/fetch_feed_spec.rb | 16 ++++++++-------- spec/tasks/fetch_feeds_spec.rb | 4 ++-- spec/tasks/remove_old_stories_spec.rb | 16 ++++++++-------- spec/utils/i18n_support_spec.rb | 6 +++--- 15 files changed, 57 insertions(+), 56 deletions(-) diff --git a/spec/controllers/debug_controller_spec.rb b/spec/controllers/debug_controller_spec.rb index 590ed0e43..f019b7854 100644 --- a/spec/controllers/debug_controller_spec.rb +++ b/spec/controllers/debug_controller_spec.rb @@ -7,13 +7,13 @@ describe "GET /debug" do before do delayed_job = double "Delayed::Job" - delayed_job.stub(:count).and_return(42) + expect(delayed_job).to receive(:count).and_return(42) stub_const("Delayed::Job", delayed_job) migration_status_instance = double "migration_status_instance" - migration_status_instance.stub(:pending_migrations).and_return ["Migration B - 2", "Migration C - 3"] + expect(migration_status_instance).to receive(:pending_migrations).and_return ["Migration B - 2", "Migration C - 3"] migration_status = double "MigrationStatus" - migration_status.stub(:new).and_return(migration_status_instance) + expect(migration_status).to receive(:new).and_return(migration_status_instance) stub_const("MigrationStatus", migration_status) end diff --git a/spec/controllers/feeds_controller_spec.rb b/spec/controllers/feeds_controller_spec.rb index 6b78bbb21..013baaf4b 100644 --- a/spec/controllers/feeds_controller_spec.rb +++ b/spec/controllers/feeds_controller_spec.rb @@ -147,7 +147,7 @@ describe "GET /feeds/export" do let(:some_xml) { "some dummy opml" } - before { Feed.stub(:all) } + before { expect(Feed).to receive(:all) } it "returns an OPML file" do expect_any_instance_of(ExportToOpml).to receive(:to_xml).and_return(some_xml) diff --git a/spec/controllers/first_run_controller_spec.rb b/spec/controllers/first_run_controller_spec.rb index 0aa05b533..05433f361 100644 --- a/spec/controllers/first_run_controller_spec.rb +++ b/spec/controllers/first_run_controller_spec.rb @@ -5,7 +5,7 @@ describe "FirstRunController" do context "when a user has not been setup" do before do - UserRepository.stub(:setup_complete?).and_return(false) + expect(UserRepository).to receive(:setup_complete?).and_return(false).at_least(:once) end describe "GET /setup/password" do @@ -50,8 +50,8 @@ let(:feeds) { [double, double] } before do - UserRepository.stub(fetch: user) - Feed.stub(all: feeds) + allow(UserRepository).to receive(:fetch).and_return(user) + expect(Feed).to receive(:all).and_return(feeds) end it "displays the tutorial and completes setup" do @@ -73,7 +73,7 @@ context "when a user has been setup" do before do - UserRepository.stub(:setup_complete?).and_return(true) + expect(UserRepository).to receive(:setup_complete?).and_return(true).at_least(:once) end it "should redirect any requests to first run stuff" do diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index f4faf67a0..5ec8d658e 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -15,7 +15,7 @@ describe "POST /login" do it "denies access when password is incorrect" do - SignInUser.stub(:sign_in).and_return(nil) + expect(SignInUser).to receive(:sign_in).and_return(nil) post "/login", password: "not-the-password" @@ -24,7 +24,7 @@ end it "allows access when password is correct" do - SignInUser.stub(:sign_in).and_return(double(id: 1)) + expect(SignInUser).to receive(:sign_in).and_return(double(id: 1)) post "/login", password: "the-password" @@ -35,7 +35,7 @@ end it "redirects to the previous path when present" do - SignInUser.stub(:sign_in).and_return(double(id: 1)) + expect(SignInUser).to receive(:sign_in).and_return(double(id: 1)) post "/login", { password: "the-password" }, "rack.session" => { redirect_to: "/archive" } diff --git a/spec/fever_api/read_feeds_groups_spec.rb b/spec/fever_api/read_feeds_groups_spec.rb index ae42283e1..42b759431 100644 --- a/spec/fever_api/read_feeds_groups_spec.rb +++ b/spec/fever_api/read_feeds_groups_spec.rb @@ -12,7 +12,7 @@ end it "returns a list of groups requested through feeds" do - feed_repository.stub_chain(:in_group, :order).and_return(feeds) + expect(feed_repository).to receive_message_chain(:in_group, :order).and_return(feeds) expect(subject.call("feeds" => nil)).to eq ({ feeds_groups: [ @@ -25,7 +25,7 @@ end it "returns a list of groups requested through groups" do - feed_repository.stub_chain(:in_group, :order).and_return(feeds) + expect(feed_repository).to receive_message_chain(:in_group, :order).and_return(feeds) expect(subject.call("groups" => nil)).to eq ({ feeds_groups: [ diff --git a/spec/fever_api_spec.rb b/spec/fever_api_spec.rb index f34fe116b..325770ba1 100644 --- a/spec/fever_api_spec.rb +++ b/spec/fever_api_spec.rb @@ -21,9 +21,9 @@ def app before do user = double(api_key: api_key) - User.stub(:first) { user } + allow(User).to receive(:first).and_return(user) - Time.stub(:now) { Time.at(123456789) } + allow(Time).to receive(:now).and_return(Time.at(123456789)) end def last_response_as_object @@ -38,12 +38,12 @@ def last_response_as_object it "does not authenticate request with incorrect api_key" do get "/", api_key: "foo" - last_response.should_not be_ok + expect(last_response).to_not be_ok end it "does not authenticate request when api_key is not provided" do get "/" - last_response.should_not be_ok + expect(last_response).to_not be_ok end end @@ -60,8 +60,8 @@ def make_request(extra_headers = {}) end it "returns groups and feeds by groups when 'groups' header is provided" do - GroupRepository.stub(:list).and_return([group]) - FeedRepository.stub_chain(:in_group, :order).and_return([feed]) + expect(GroupRepository).to receive(:list).and_return([group]) + expect(FeedRepository).to receive_message_chain(:in_group, :order).and_return([feed]) make_request(groups: nil) @@ -74,8 +74,8 @@ def make_request(extra_headers = {}) end it "returns feeds and feeds by groups when 'feeds' header is provided" do - FeedRepository.stub(:list).and_return([feed]) - FeedRepository.stub_chain(:in_group, :order).and_return([feed]) + expect(FeedRepository).to receive(:list).and_return([feed]) + expect(FeedRepository).to receive_message_chain(:in_group, :order).and_return([feed]) make_request(feeds: nil) diff --git a/spec/javascript/spec/models/story_spec.js b/spec/javascript/spec/models/story_spec.js index e666993ff..ffc778f4b 100644 --- a/spec/javascript/spec/models/story_spec.js +++ b/spec/javascript/spec/models/story_spec.js @@ -49,8 +49,8 @@ describe("Story", function(){ it("calls save if it should save", function(){ var story = new Story(); - sinon.stub(story, "save"); - sinon.stub(story, "shouldSave", function(){ + expect(sinon).to receive(story, "save"); + expect(sinon).to receive(story, "shouldSave", function(){ return true; }); @@ -90,8 +90,8 @@ describe("Story", function(){ describe("toggle", function(){ it("calles open/close based on state", function(){ var story = new Story(); - sinon.stub(story, "open"); - sinon.stub(story, "close"); + expect(sinon).to receive(story, "open"); + expect(sinon).to receive(story, "close"); story.toggle(); story.open.should.have.been.calledOnce; @@ -107,7 +107,7 @@ describe("Story", function(){ describe("shouldSave", function(){ it("returns false in there are no changed Attributes", function(){ var story = new Story(); - sinon.stub(story, "changedAttributes", function(){ + expect(sinon).to receive(story, "changedAttributes", function(){ return false; }); story.shouldSave().should.be.false; @@ -116,7 +116,7 @@ describe("Story", function(){ it("returns false if it has changedAttributes but no id", function(){ var story = new Story(); - sinon.stub(story, "changedAttributes", function(){ + expect(sinon).to receive(story, "changedAttributes", function(){ return {is_read: true}; }); story.shouldSave().should.be.false; @@ -125,7 +125,7 @@ describe("Story", function(){ it("returns true if it has changedAttributes and an id", function(){ var story = new Story({id: 1}); - sinon.stub(story, "changedAttributes", function(){ + expect(sinon).to receive(story, "changedAttributes", function(){ return {is_read: true}; }); story.shouldSave().should.be.true; @@ -136,7 +136,7 @@ describe("Story", function(){ describe("openInTab", function(){ it("opens a new window", function(){ var story = new Story({permalink: "http://localhost"}); - sinon.stub(window, "open"); + expect(sinon).to receive(window, "open"); story.openInTab(); window.open.should.have.been.calledWith("http://localhost", "_blank"); diff --git a/spec/models/migration_status_spec.rb b/spec/models/migration_status_spec.rb index 40239a144..13a9d252a 100644 --- a/spec/models/migration_status_spec.rb +++ b/spec/models/migration_status_spec.rb @@ -7,13 +7,13 @@ describe "pending_migrations" do it "returns array of strings representing pending migrations" do migrator = double "Migrator" - migrator.stub(:migrations).and_return [ + expect(migrator).to receive(:migrations).and_return [ double("First Migration", name: "Migration A", version: 1), double("Second Migration", name: "Migration B", version: 2), double("Third Migration", name: "Migration C", version: 3) ] - migrator.stub(:migrations_path) - migrator.stub(:current_version).and_return 1 + expect(migrator).to receive(:migrations_path) + expect(migrator).to receive(:current_version).and_return 1 expect(MigrationStatus.new(migrator).pending_migrations).to eq(["Migration B - 2", "Migration C - 3"]) end diff --git a/spec/repositories/feed_repository_spec.rb b/spec/repositories/feed_repository_spec.rb index 62d4192e3..30210d054 100644 --- a/spec/repositories/feed_repository_spec.rb +++ b/spec/repositories/feed_repository_spec.rb @@ -63,7 +63,7 @@ end it "returns found feed" do - Feed.stub(:find).with(feed.id).and_return(feed) + expect(Feed).to receive(:find).with(feed.id).and_return(feed) result = FeedRepository.fetch(feed.id) diff --git a/spec/repositories/story_repository_spec.rb b/spec/repositories/story_repository_spec.rb index 2a9445726..8d26df20d 100644 --- a/spec/repositories/story_repository_spec.rb +++ b/spec/repositories/story_repository_spec.rb @@ -6,7 +6,7 @@ describe ".add" do let(:feed) { double(url: "http://blog.golang.org/feed.atom") } before do - Story.stub(:create) + allow(Story).to receive(:create) end it "normalizes story urls" do @@ -18,7 +18,7 @@ it "sanitizes titles" do entry = double(title: "n\u2028\u2029", content: "").as_null_object - StoryRepository.stub(:normalize_url) + expect(StoryRepository).to receive(:normalize_url) expect(Story).to receive(:create).with(hash_including(title: "n")) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f2799081b..0635d491f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -21,6 +21,7 @@ RSpec.configure do |config| config.include Rack::Test::Methods config.include RSpecHtmlMatchers + config.raise_errors_for_deprecations! end def app_require(file) diff --git a/spec/tasks/fetch_feed_spec.rb b/spec/tasks/fetch_feed_spec.rb index 9eec9addc..83914fe1c 100644 --- a/spec/tasks/fetch_feed_spec.rb +++ b/spec/tasks/fetch_feed_spec.rb @@ -11,16 +11,16 @@ end before do - StoryRepository.stub(:add) - FeedRepository.stub(:update_last_fetched) - FeedRepository.stub(:set_status) + allow(StoryRepository).to receive(:add) + allow(FeedRepository).to receive(:update_last_fetched) + allow(FeedRepository).to receive(:set_status) end context "when feed has not been modified" do it "should not try to fetch posts" do parser = double(fetch_and_parse: 304) - StoryRepository.should_not_receive(:add) + expect(StoryRepository).to_not receive(:add) FetchFeed.new(daring_fireball, parser: parser) end @@ -31,9 +31,9 @@ fake_feed = double(last_modified: Time.new(2012, 12, 31)) parser = double(fetch_and_parse: fake_feed) - FindNewStories.any_instance.stub(:new_stories).and_return([]) + expect_any_instance_of(FindNewStories).to receive(:new_stories).and_return([]) - StoryRepository.should_not_receive(:add) + expect(StoryRepository).to_not receive(:add) FetchFeed.new(daring_fireball, parser: parser).fetch end @@ -47,11 +47,11 @@ let(:fake_feed) { double(last_modified: now, entries: [new_story, old_story]) } let(:fake_parser) { double(fetch_and_parse: fake_feed) } - before { FindNewStories.any_instance.stub(:new_stories).and_return([new_story]) } + before { expect_any_instance_of(FindNewStories).to receive(:new_stories).and_return([new_story]) } it "should only add posts that are new" do expect(StoryRepository).to receive(:add).with(new_story, daring_fireball) - StoryRepository.should_not_receive(:add).with(old_story, daring_fireball) + expect(StoryRepository).to_not receive(:add).with(old_story, daring_fireball) FetchFeed.new(daring_fireball, parser: fake_parser).fetch end diff --git a/spec/tasks/fetch_feeds_spec.rb b/spec/tasks/fetch_feeds_spec.rb index 7f43738ae..fe8ec4b67 100644 --- a/spec/tasks/fetch_feeds_spec.rb +++ b/spec/tasks/fetch_feeds_spec.rb @@ -8,8 +8,8 @@ let(:pool) { double } it "calls FetchFeed#fetch for every feed" do - pool.stub(:process).and_yield - FetchFeed.stub(:new).and_return(fetcher_one, fetcher_two) + expect(pool).to receive(:process).and_yield.at_least(:once) + expect(FetchFeed).to receive(:new).and_return(fetcher_one, fetcher_two) expect(fetcher_one).to receive(:fetch).once expect(fetcher_two).to receive(:fetch).once diff --git a/spec/tasks/remove_old_stories_spec.rb b/spec/tasks/remove_old_stories_spec.rb index 373d983a3..f4850386d 100644 --- a/spec/tasks/remove_old_stories_spec.rb +++ b/spec/tasks/remove_old_stories_spec.rb @@ -5,12 +5,12 @@ describe ".remove!" do let(:stories_mock) do stories = double("stories") - stories.stub(:delete_all) + allow(stories).to receive(:delete_all) stories end it "should pass along the number of days to the story repository query" do - RemoveOldStories.stub(:pruned_feeds) { [] } + expect(RemoveOldStories).to receive(:pruned_feeds).and_return([]) expect(StoryRepository).to receive(:unstarred_read_stories_older_than).with(7).and_return(stories_mock) @@ -18,8 +18,8 @@ end it "should request deletion of all old stories" do - RemoveOldStories.stub(:pruned_feeds) { [] } - StoryRepository.stub(:unstarred_read_stories_older_than) { stories_mock } + expect(RemoveOldStories).to receive(:pruned_feeds).and_return([]) + expect(StoryRepository).to receive(:unstarred_read_stories_older_than).and_return(stories_mock) expect(stories_mock).to receive(:delete_all) @@ -27,9 +27,9 @@ end it "should fetch affected feeds by id" do - RemoveOldStories.stub(:old_stories) do + expect(RemoveOldStories).to receive(:old_stories) do stories = [double("story", feed_id: 3), double("story", feed_id: 5)] - stories.stub(:delete_all) + expect(stories).to receive(:delete_all) stories end @@ -40,8 +40,8 @@ it "should update last_fetched on affected feeds" do feeds = [double("feed a"), double("feed b")] - RemoveOldStories.stub(:pruned_feeds) { feeds } - RemoveOldStories.stub(:old_stories) { stories_mock } + expect(RemoveOldStories).to receive(:pruned_feeds) { feeds } + expect(RemoveOldStories).to receive(:old_stories) { stories_mock } expect(FeedRepository).to receive(:update_last_fetched).with(feeds.first, anything) expect(FeedRepository).to receive(:update_last_fetched).with(feeds.last, anything) diff --git a/spec/utils/i18n_support_spec.rb b/spec/utils/i18n_support_spec.rb index 60c44b3f8..30963d315 100644 --- a/spec/utils/i18n_support_spec.rb +++ b/spec/utils/i18n_support_spec.rb @@ -2,7 +2,7 @@ describe "i18n" do before do - UserRepository.stub(:setup_complete?).and_return(false) + expect(UserRepository).to receive(:setup_complete?).and_return(false) ENV["LOCALE"] = locale get "/" end @@ -12,7 +12,7 @@ it "should load default locale" do expect(I18n.locale.to_s).to eq "en" - I18n.locale.to_s.should_not eq nil + expect(I18n.locale.to_s).to_not eq nil end end @@ -29,7 +29,7 @@ let(:locale) { "xx" } it "should not find localization strings" do - I18n.t("layout.title", locale: ENV["LOCALE"].to_sym).should_not eq "stringer | your rss buddy" + expect(I18n.t("layout.title", locale: ENV["LOCALE"].to_sym)).to_not eq "stringer | your rss buddy" end end end From 48e03c9cef9e1c885efc03ebcb685f3041b96a0f Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 23:41:48 -0700 Subject: [PATCH 20/90] Last upgrades for now --- Gemfile | 61 ++++++++++++--------------- Gemfile.lock | 68 ++++++++++++++----------------- app/tasks/fetch_feed.rb | 2 +- app/utils/feed_discovery.rb | 2 +- config.ru | 5 +-- spec/utils/feed_discovery_spec.rb | 12 +++--- 6 files changed, 65 insertions(+), 85 deletions(-) diff --git a/Gemfile b/Gemfile index 96d33aae6..1e2dfcf52 100644 --- a/Gemfile +++ b/Gemfile @@ -2,55 +2,44 @@ ruby "2.3.0" source "https://rubygems.org" group :production do - gem "pg", "~> 0.18" - gem "puma", "~> 2.8", ">= 2.8.2" - gem "rack-ssl-enforcer" + gem "pg", "~> 0.18.4" + gem "puma", "~> 2.15" end group :development do - gem "sqlite3", "~> 1.3", ">= 1.3.9" + gem "sqlite3", "~> 1.3" + gem "pry-byebug", "~> 3.3" + gem "foreman", "~> 0.78.0" + gem "rubocop", "~> 0.36.0", require: false + gem "shotgun", "~> 0.9.1" end group :development, :test do gem "capybara", "~> 2.6" gem "coveralls", "~> 0.8.10", require: false - gem "faker", "~> 1.3" - gem "foreman", "~> 0.78.0" - gem "pry-byebug", "~> 3.3" - gem "rack-test", "~> 0.6.2" - gem "rspec", "~> 3.0" - gem "rspec-html-matchers", "> 0.5.0" - gem "rubocop", "~> 0.36.0", require: false - gem "shotgun", "~> 0.9" + gem "faker", "~> 1.6" + gem "rack-test", "~> 0.6.3" + gem "rspec", "~> 3.4" + gem "rspec-html-matchers", "~> 0.7.0" gem "timecop", "~> 0.8.0" end -group :heroku do - gem "excon", "~> 0.33" - gem "formatador", "~> 0.2.4" - gem "netrc", "~> 0.11.0" - gem "rendezvous", "~> 0.1.2" -end - -gem "activerecord", "~> 4.1" -gem "arel", ">= 5" -gem "bcrypt-ruby", "~> 3.1.5" -gem "delayed_job", "~> 4.0" -gem "delayed_job_active_record", "~> 4.0" -gem "feedbag", "~> 0.9.2" -gem "feedjira", "~> 1.0" -gem "highline", "~> 1.6", ">= 1.6.21", require: false +gem "activerecord", "~> 4.2" +gem "bcrypt-ruby", "~> 3.1" +gem "delayed_job", "~> 4.1" +gem "delayed_job_active_record", "~> 4.1" +gem "feedbag", "~> 0.9.5" +gem "feedjira", "~> 2.0" gem "i18n", "~> 0.7.0" -gem "loofah", "~> 2.0.0" gem "nokogiri", "~> 1.6" -gem "rack-ssl", "~> 1.4.1" +gem "rack-protection", "~> 1.5" +gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" -gem "rake", "~> 10.3", ">= 10.3.1" -gem "sinatra", "~> 1.4", ">= 1.4.5" -gem "sinatra-assetpack", "~> 0.3.3", require: "sinatra/assetpack" -gem "sinatra-activerecord", "~> 2.0", ">= 2.0.1" -gem "sinatra-contrib", "~> 1.4.2" +gem "rake", "~> 10.5" +gem "sinatra", "~> 1.4" +gem "sinatra-activerecord", "~> 2.0" +gem "sinatra-assetpack", "~> 0.3.5", require: "sinatra/assetpack" +gem "sinatra-contrib", "~> 1.4" gem "sinatra-flash", "~> 0.3.0" gem "thread", "~> 0.2.2" -gem "will_paginate", "~> 3.0", ">= 3.0.5" -gem "rack-protection", "~> 1.5.3" +gem "will_paginate", "~> 3.1.0" diff --git a/Gemfile.lock b/Gemfile.lock index 4ba37050c..ee981e3fb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,7 +38,6 @@ GEM term-ansicolor (~> 1.3) thor (~> 0.19.1) tins (~> 1.6.0) - curb (0.9.1) delayed_job (4.1.1) activesupport (>= 3.0, < 5.0) delayed_job_active_record (4.1.0) @@ -48,19 +47,21 @@ GEM docile (1.1.5) domain_name (0.5.25) unf (>= 0.0.5, < 1.0.0) - excon (0.45.4) faker (1.6.1) i18n (~> 0.5) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + faraday_middleware (0.10.0) + faraday (>= 0.7.4, < 0.10) feedbag (0.9.5) nokogiri (~> 1.0) - feedjira (1.6.0) - curb (~> 0.8) + feedjira (2.0.0) + faraday (~> 0.9) + faraday_middleware (~> 0.9) loofah (~> 2.0) sax-machine (~> 1.0) foreman (0.78.0) thor (~> 0.19.1) - formatador (0.2.5) - highline (1.7.8) http-cookie (1.0.2) domain_name (~> 0.5) i18n (0.7.0) @@ -73,6 +74,7 @@ GEM mini_portile2 (2.0.0) minitest (5.8.4) multi_json (1.11.2) + multipart-post (2.0.0) netrc (0.11.0) nokogiri (1.6.7.2) mini_portile2 (~> 2.0.0.rc2) @@ -93,7 +95,6 @@ GEM rack rack-ssl (1.4.1) rack - rack-ssl-enforcer (0.2.9) rack-test (0.6.3) rack (>= 1.0) racksh (1.0.0) @@ -101,7 +102,6 @@ GEM rack-test (>= 0.5) rainbow (2.1.0) rake (10.5.0) - rendezvous (0.1.2) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) @@ -180,47 +180,39 @@ PLATFORMS ruby DEPENDENCIES - activerecord (~> 4.1) - arel (>= 5) - bcrypt-ruby (~> 3.1.5) + activerecord (~> 4.2) + bcrypt-ruby (~> 3.1) capybara (~> 2.6) coveralls (~> 0.8.10) - delayed_job (~> 4.0) - delayed_job_active_record (~> 4.0) - excon (~> 0.33) - faker (~> 1.3) - feedbag (~> 0.9.2) - feedjira (~> 1.0) + delayed_job (~> 4.1) + delayed_job_active_record (~> 4.1) + faker (~> 1.6) + feedbag (~> 0.9.5) + feedjira (~> 2.0) foreman (~> 0.78.0) - formatador (~> 0.2.4) - highline (~> 1.6, >= 1.6.21) i18n (~> 0.7.0) - loofah (~> 2.0.0) - netrc (~> 0.11.0) nokogiri (~> 1.6) - pg (~> 0.18) + pg (~> 0.18.4) pry-byebug (~> 3.3) - puma (~> 2.8, >= 2.8.2) - rack-protection (~> 1.5.3) - rack-ssl (~> 1.4.1) - rack-ssl-enforcer - rack-test (~> 0.6.2) + puma (~> 2.15) + rack-protection (~> 1.5) + rack-ssl (~> 1.4) + rack-test (~> 0.6.3) racksh (~> 1.0) - rake (~> 10.3, >= 10.3.1) - rendezvous (~> 0.1.2) - rspec (~> 3.0) - rspec-html-matchers (> 0.5.0) + rake (~> 10.5) + rspec (~> 3.4) + rspec-html-matchers (~> 0.7.0) rubocop (~> 0.36.0) - shotgun (~> 0.9) - sinatra (~> 1.4, >= 1.4.5) - sinatra-activerecord (~> 2.0, >= 2.0.1) - sinatra-assetpack (~> 0.3.3) - sinatra-contrib (~> 1.4.2) + shotgun (~> 0.9.1) + sinatra (~> 1.4) + sinatra-activerecord (~> 2.0) + sinatra-assetpack (~> 0.3.5) + sinatra-contrib (~> 1.4) sinatra-flash (~> 0.3.0) - sqlite3 (~> 1.3, >= 1.3.9) + sqlite3 (~> 1.3) thread (~> 0.2.2) timecop (~> 0.8.0) - will_paginate (~> 3.0, >= 3.0.5) + will_paginate (~> 3.1.0) BUNDLED WITH 1.11.2 diff --git a/app/tasks/fetch_feed.rb b/app/tasks/fetch_feed.rb index d75a4b28d..e59af719a 100644 --- a/app/tasks/fetch_feed.rb +++ b/app/tasks/fetch_feed.rb @@ -32,7 +32,7 @@ def fetch private def fetch_raw_feed - @parser.fetch_and_parse(@feed.url, options) + @parser.fetch_and_parse(@feed.url) end def feed_not_modified diff --git a/app/utils/feed_discovery.rb b/app/utils/feed_discovery.rb index 656865bfd..8c8be46d9 100644 --- a/app/utils/feed_discovery.rb +++ b/app/utils/feed_discovery.rb @@ -14,7 +14,7 @@ def discover(url, finder = Feedbag, parser = Feedjira::Feed) end def get_feed_for_url(url, parser) - feed = parser.fetch_and_parse(url, user_agent: "Stringer") + feed = parser.fetch_and_parse(url) feed.feed_url ||= url feed rescue diff --git a/config.ru b/config.ru index 9edf23e7d..8b62e862b 100644 --- a/config.ru +++ b/config.ru @@ -1,10 +1,9 @@ require "rubygems" require "bundler" - Bundler.require -require 'rack/ssl-enforcer' -use Rack::SslEnforcer +require 'rack/protection' +use Rack::Protection require "./fever_api" map "/fever" do diff --git a/spec/utils/feed_discovery_spec.rb b/spec/utils/feed_discovery_spec.rb index 169ced2d8..9bbff04af 100644 --- a/spec/utils/feed_discovery_spec.rb +++ b/spec/utils/feed_discovery_spec.rb @@ -13,7 +13,7 @@ describe "#discover" do it "returns false if url is not a feed and feed url cannot be discovered" do - expect(parser).to receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) + expect(parser).to receive(:fetch_and_parse).with(url).and_raise(StandardError) expect(finder).to receive(:find).and_return([]) result = FeedDiscovery.new.discover(url, finder, parser) @@ -22,7 +22,7 @@ end it "returns a feed if the url provided is parsable" do - expect(parser).to receive(:fetch_and_parse).with(url, anything).and_return(feed) + expect(parser).to receive(:fetch_and_parse).with(url).and_return(feed) result = FeedDiscovery.new.discover(url, finder, parser) @@ -30,9 +30,9 @@ end it "returns false if the discovered feed is not parsable" do - expect(parser).to receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) + expect(parser).to receive(:fetch_and_parse).with(url).and_raise(StandardError) expect(finder).to receive(:find).and_return([invalid_discovered_url]) - expect(parser).to receive(:fetch_and_parse).with(invalid_discovered_url, anything).and_raise(StandardError) + expect(parser).to receive(:fetch_and_parse).with(invalid_discovered_url).and_raise(StandardError) result = FeedDiscovery.new.discover(url, finder, parser) @@ -40,9 +40,9 @@ end it "returns the feed if the discovered feed is parsable" do - expect(parser).to receive(:fetch_and_parse).with(url, anything).and_raise(StandardError) + expect(parser).to receive(:fetch_and_parse).with(url).and_raise(StandardError) expect(finder).to receive(:find).and_return([valid_discovered_url]) - expect(parser).to receive(:fetch_and_parse).with(valid_discovered_url, anything).and_return(feed) + expect(parser).to receive(:fetch_and_parse).with(valid_discovered_url).and_return(feed) result = FeedDiscovery.new.discover(url, finder, parser) From dddb06e708a35d2feebc41dac0ee3366d82c02fc Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 23:46:02 -0700 Subject: [PATCH 21/90] Switch bcrypt-ruby to bcrypt --- Gemfile | 2 +- Gemfile.lock | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 1e2dfcf52..56c32520c 100644 --- a/Gemfile +++ b/Gemfile @@ -25,7 +25,7 @@ group :development, :test do end gem "activerecord", "~> 4.2" -gem "bcrypt-ruby", "~> 3.1" +gem "bcrypt", "~> 3.1" gem "delayed_job", "~> 4.1" gem "delayed_job_active_record", "~> 4.1" gem "feedbag", "~> 0.9.5" diff --git a/Gemfile.lock b/Gemfile.lock index ee981e3fb..aae8255b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -19,8 +19,6 @@ GEM ast (2.2.0) backports (3.6.7) bcrypt (3.1.10) - bcrypt-ruby (3.1.5) - bcrypt (>= 3.1.3) builder (3.2.2) byebug (8.2.1) capybara (2.6.0) @@ -181,7 +179,7 @@ PLATFORMS DEPENDENCIES activerecord (~> 4.2) - bcrypt-ruby (~> 3.1) + bcrypt (~> 3.1) capybara (~> 2.6) coveralls (~> 0.8.10) delayed_job (~> 4.1) From 397f05d977424a695909ded32e6be00810994e8e Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 24 Jan 2016 23:49:38 -0700 Subject: [PATCH 22/90] Switch protection lower in the chain --- app.rb | 3 +++ config.ru | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.rb b/app.rb index 84b05c24b..3c0670b23 100644 --- a/app.rb +++ b/app.rb @@ -8,6 +8,7 @@ require "i18n" require "will_paginate" require "will_paginate/active_record" +require 'rack/protection' require_relative "app/helpers/authentication_helpers" require_relative "app/repositories/user_repository" @@ -32,6 +33,8 @@ class Stringer < Sinatra::Base enable :sessions set :session_secret, ENV["SECRET_TOKEN"] || "secret!" + use Rack::Protection + enable :logging enable :method_override diff --git a/config.ru b/config.ru index 8b62e862b..ea98b435a 100644 --- a/config.ru +++ b/config.ru @@ -2,9 +2,6 @@ require "rubygems" require "bundler" Bundler.require -require 'rack/protection' -use Rack::Protection - require "./fever_api" map "/fever" do run FeverAPI::Endpoint From 04556c63aeb7f5839d8d15db3221119a11006949 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 25 Jan 2016 00:14:51 -0700 Subject: [PATCH 23/90] Rubocop run --- app.rb | 2 +- app/fever_api/read_feeds_groups.rb | 2 +- app/fever_api/response.rb | 2 +- app/models/feed.rb | 2 +- app/models/story.rb | 3 +- app/repositories/feed_repository.rb | 2 +- app/repositories/story_repository.rb | 12 ++-- app/tasks/fetch_feed.rb | 3 +- app/utils/sample_story.rb | 3 +- config/puma.rb | 13 ++--- fever_api.rb | 2 +- spec/controllers/debug_controller_spec.rb | 4 +- spec/fever_api/authentication_spec.rb | 2 +- spec/fever_api/read_favicons_spec.rb | 4 +- spec/fever_api/read_feeds_groups_spec.rb | 18 +++--- spec/fever_api/read_feeds_spec.rb | 12 ++-- spec/fever_api/read_groups_spec.rb | 5 +- spec/fever_api/read_items_spec.rb | 61 ++++++++++++--------- spec/fever_api/read_links_spec.rb | 2 +- spec/fever_api/sync_saved_item_ids_spec.rb | 2 +- spec/fever_api/sync_unread_item_ids_spec.rb | 2 +- spec/helpers/url_helers_spec.rb | 4 +- 22 files changed, 85 insertions(+), 77 deletions(-) diff --git a/app.rb b/app.rb index 3c0670b23..0843ebe62 100644 --- a/app.rb +++ b/app.rb @@ -8,7 +8,7 @@ require "i18n" require "will_paginate" require "will_paginate/active_record" -require 'rack/protection' +require "rack/protection" require_relative "app/helpers/authentication_helpers" require_relative "app/repositories/user_repository" diff --git a/app/fever_api/read_feeds_groups.rb b/app/fever_api/read_feeds_groups.rb index a33c7e99e..7899f0a5b 100644 --- a/app/fever_api/read_feeds_groups.rb +++ b/app/fever_api/read_feeds_groups.rb @@ -18,7 +18,7 @@ def call(params = {}) def feeds_groups grouped_feeds = @feed_repository.in_group.order("LOWER(name)") - .group_by(&:group_id) + .group_by(&:group_id) grouped_feeds.map do |group_id, feeds| { group_id: group_id, diff --git a/app/fever_api/response.rb b/app/fever_api/response.rb index 2b24247f6..1e6e62697 100644 --- a/app/fever_api/response.rb +++ b/app/fever_api/response.rb @@ -32,7 +32,7 @@ class Response WriteMarkItem, WriteMarkFeed, WriteMarkGroup - ] + ].freeze def initialize(params) @params = params diff --git a/app/models/feed.rb b/app/models/feed.rb index 4dfbfeb60..08b66523b 100644 --- a/app/models/feed.rb +++ b/app/models/feed.rb @@ -4,7 +4,7 @@ class Feed < ActiveRecord::Base validates_uniqueness_of :url - STATUS = { green: 0, yellow: 1, red: 2 } + STATUS = { green: 0, yellow: 1, red: 2 }.freeze def status STATUS.key(read_attribute(:status)) diff --git a/app/models/story.rb b/app/models/story.rb index 8f052e420..f097975cd 100644 --- a/app/models/story.rb +++ b/app/models/story.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require_relative "./feed" class Story < ActiveRecord::Base @@ -5,7 +6,7 @@ class Story < ActiveRecord::Base validates_uniqueness_of :entry_id, scope: :feed_id - UNTITLED = "[untitled]" + UNTITLED = "[untitled]".freeze def headline title.nil? ? UNTITLED : strip_html(title)[0, 50] diff --git a/app/repositories/feed_repository.rb b/app/repositories/feed_repository.rb index 475c545b8..6a8bec620 100644 --- a/app/repositories/feed_repository.rb +++ b/app/repositories/feed_repository.rb @@ -19,7 +19,7 @@ def self.update_feed(feed, name, url, group_id = nil) end def self.update_last_fetched(feed, timestamp) - if self.valid_timestamp?(timestamp, feed.last_fetched) + if valid_timestamp?(timestamp, feed.last_fetched) feed.last_fetched = timestamp feed.save end diff --git a/app/repositories/story_repository.rb b/app/repositories/story_repository.rb index f7fd01f9e..17e0e8b42 100644 --- a/app/repositories/story_repository.rb +++ b/app/repositories/story_repository.rb @@ -62,12 +62,12 @@ def self.feed(feed_id) def self.read(page = 1) Story.where(is_read: true).includes(:feed) - .order("published desc").page(page).per_page(20) + .order("published desc").page(page).per_page(20) end def self.starred(page = 1) Story.where(is_starred: true).includes(:feed) - .order("published desc").page(page).per_page(20) + .order("published desc").page(page).per_page(20) end def self.all_starred @@ -76,7 +76,7 @@ def self.all_starred def self.unstarred_read_stories_older_than(num_days) Story.where(is_read: true, is_starred: false) - .where("published <= ?", num_days.days.ago) + .where("published <= ?", num_days.days.ago) end def self.read_count @@ -97,9 +97,9 @@ def self.extract_content(entry) def self.sanitize(content) Loofah.fragment(content.gsub(//i, "")) - .scrub!(:prune) - .scrub!(:unprintable) - .to_s + .scrub!(:prune) + .scrub!(:unprintable) + .to_s end def self.samples diff --git a/app/tasks/fetch_feed.rb b/app/tasks/fetch_feed.rb index e59af719a..7bb3038c4 100644 --- a/app/tasks/fetch_feed.rb +++ b/app/tasks/fetch_feed.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "feedjira" require_relative "../repositories/story_repository" @@ -5,7 +6,7 @@ require_relative "../commands/feeds/find_new_stories" class FetchFeed - USER_AGENT = "Stringer (https://github.com/swanson/stringer)" + USER_AGENT = "Stringer (https://github.com/swanson/stringer)".freeze def initialize(feed, parser: Feedjira::Feed, logger: nil) @feed = feed diff --git a/app/utils/sample_story.rb b/app/utils/sample_story.rb index 4da16b129..126a31341 100644 --- a/app/utils/sample_story.rb +++ b/app/utils/sample_story.rb @@ -1,5 +1,6 @@ +# frozen_string_literal: true SampleStory = Struct.new(:source, :title, :lead, :is_read, :published) do - BODY = <<-eos + BODY = <<-eos.freeze

Tofu shoreditch intelligentsia umami, fashion axe photo booth try-hard terry richardson quinoa actually fingerstache meggings fixie. Aesthetic salvia vinyl raw denim, keffiyeh master cleanse tonx selfies mlkshk occupy twee diff --git a/config/puma.rb b/config/puma.rb index 18cb952df..09977ab3f 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -1,18 +1,15 @@ -@delayed_job_pid=nil -environment=ENV['RACK_ENV'] || 'development' -db_pool=(ENV['DB_POOL']||4).to_i -threads 1,db_pool -bind "tcp://0.0.0.0:#{ENV['PORT']||9292}" +@delayed_job_pid = nil +db_pool = (ENV["DB_POOL"] || 4).to_i +threads 1, db_pool +bind "tcp://0.0.0.0:#{ENV['PORT'] || 9292}" on_restart do # the following is highly recommended for Rails + "preload_app true" # as there's no need for the master process to hold a connection - defined?(ActiveRecord::Base) and + defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect! @delayed_job_pid ||= spawn("bundle exec rake work_jobs") sleep 1 end - - diff --git a/fever_api.rb b/fever_api.rb index 2d6c83027..09e44cf97 100644 --- a/fever_api.rb +++ b/fever_api.rb @@ -19,7 +19,7 @@ class Endpoint < Sinatra::Base def authenticated?(api_key) return unless api_key user = User.first - user.api_key && api_key.downcase == user.api_key.downcase + user.api_key && api_key.casecmp(user.api_key) == 0 end get "/" do diff --git a/spec/controllers/debug_controller_spec.rb b/spec/controllers/debug_controller_spec.rb index f019b7854..564caddbb 100644 --- a/spec/controllers/debug_controller_spec.rb +++ b/spec/controllers/debug_controller_spec.rb @@ -11,7 +11,9 @@ stub_const("Delayed::Job", delayed_job) migration_status_instance = double "migration_status_instance" - expect(migration_status_instance).to receive(:pending_migrations).and_return ["Migration B - 2", "Migration C - 3"] + expect(migration_status_instance) + .to receive(:pending_migrations) + .and_return ["Migration B - 2", "Migration C - 3"] migration_status = double "MigrationStatus" expect(migration_status).to receive(:new).and_return(migration_status_instance) stub_const("MigrationStatus", migration_status) diff --git a/spec/fever_api/authentication_spec.rb b/spec/fever_api/authentication_spec.rb index 927fbfd45..0c96932eb 100644 --- a/spec/fever_api/authentication_spec.rb +++ b/spec/fever_api/authentication_spec.rb @@ -7,6 +7,6 @@ fake_clock = double("clock") expect(fake_clock).to receive(:now).and_return(1234567890) result = FeverAPI::Authentication.new(clock: fake_clock).call(double) - expect(result).to eq({ auth: 1, last_refreshed_on_time: 1234567890 }) + expect(result).to eq(auth: 1, last_refreshed_on_time: 1234567890) end end diff --git a/spec/fever_api/read_favicons_spec.rb b/spec/fever_api/read_favicons_spec.rb index f42b06609..5b91e4b5e 100644 --- a/spec/fever_api/read_favicons_spec.rb +++ b/spec/fever_api/read_favicons_spec.rb @@ -6,14 +6,14 @@ subject { FeverAPI::ReadFavicons.new } it "returns a fixed icon list if requested" do - expect(subject.call("favicons" => nil)).to eq ({ + expect(subject.call("favicons" => nil)).to eq( favicons: [ { id: 0, data: "image/gif;base64,R0lGODlhAQABAIAAAObm5gAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" } ] - }) + ) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_feeds_groups_spec.rb b/spec/fever_api/read_feeds_groups_spec.rb index 42b759431..f99efed16 100644 --- a/spec/fever_api/read_feeds_groups_spec.rb +++ b/spec/fever_api/read_feeds_groups_spec.rb @@ -12,29 +12,31 @@ end it "returns a list of groups requested through feeds" do - expect(feed_repository).to receive_message_chain(:in_group, :order).and_return(feeds) + expect(feed_repository) + .to receive_message_chain(:in_group, :order) + .and_return(feeds) - expect(subject.call("feeds" => nil)).to eq ({ + expect(subject.call("feeds" => nil)).to eq( feeds_groups: [ { group_id: 1, feed_ids: feed_ids.join(",") } - ] - }) + ]) end it "returns a list of groups requested through groups" do - expect(feed_repository).to receive_message_chain(:in_group, :order).and_return(feeds) + expect(feed_repository) + .to receive_message_chain(:in_group, :order) + .and_return(feeds) - expect(subject.call("groups" => nil)).to eq ({ + expect(subject.call("groups" => nil)).to eq( feeds_groups: [ { group_id: 1, feed_ids: feed_ids.join(",") } - ] - }) + ]) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_feeds_spec.rb b/spec/fever_api/read_feeds_spec.rb index 0d6e654e1..7674dade6 100644 --- a/spec/fever_api/read_feeds_spec.rb +++ b/spec/fever_api/read_feeds_spec.rb @@ -13,13 +13,11 @@ it "returns a list of feeds" do expect(feed_repository).to receive(:list).and_return(feeds) - expect(subject.call("feeds" => nil)).to eq({ - feeds: [ - { id: 5 }, - { id: 7 }, - { id: 11 } - ] - }) + expect(subject.call("feeds" => nil)).to eq(feeds: [ + { id: 5 }, + { id: 7 }, + { id: 11 } + ]) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_groups_spec.rb b/spec/fever_api/read_groups_spec.rb index d9c5a9d0a..849a7a28d 100644 --- a/spec/fever_api/read_groups_spec.rb +++ b/spec/fever_api/read_groups_spec.rb @@ -11,7 +11,7 @@ it "returns a group list if requested" do expect(group_repository).to receive(:list).and_return([group_1, group_2]) - expect(subject.call("groups" => nil)).to eq({ + expect(subject.call("groups" => nil)).to eq( groups: [ { id: 1, @@ -21,8 +21,7 @@ id: 2, title: "World news" } - ] - }) + ]) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_items_spec.rb b/spec/fever_api/read_items_spec.rb index cfce67c89..d896681db 100644 --- a/spec/fever_api/read_items_spec.rb +++ b/spec/fever_api/read_items_spec.rb @@ -10,53 +10,60 @@ end it "returns a list of unread items including total count" do - expect(story_repository).to receive(:unread).twice.and_return([ - double("story", as_fever_json: { id: 5 }), - double("story", as_fever_json: { id: 7 }), - double("story", as_fever_json: { id: 11 }) - ]) - expect(subject.call("items" => nil)).to eq({ + expect(story_repository).to receive(:unread).twice.and_return( + [ + double("story", as_fever_json: { id: 5 }), + double("story", as_fever_json: { id: 7 }), + double("story", as_fever_json: { id: 11 }) + ]) + expect(subject.call("items" => nil)).to eq( items: [ { id: 5 }, { id: 7 }, { id: 11 } ], - total_items: 3 - }) + total_items: 3) end it "returns a list of unread items since id including total count" do - expect(story_repository).to receive(:unread_since_id).with(3).and_return([ - double("story", as_fever_json: { id: 5 }), - double("story", as_fever_json: { id: 7 }) - ]) - expect(story_repository).to receive(:unread).and_return([ - double("story", as_fever_json: { id: 2 }), - double("story", as_fever_json: { id: 5 }), - double("story", as_fever_json: { id: 7 }) - ]) - expect(subject.call("items" => nil, since_id: 3)).to eq({ + expect(story_repository) + .to receive(:unread_since_id) + .with(3) + .and_return([ + double("story", as_fever_json: { id: 5 }), + double("story", as_fever_json: { id: 7 }) + ]) + expect(story_repository) + .to receive(:unread) + .and_return([ + double("story", as_fever_json: { id: 2 }), + double("story", as_fever_json: { id: 5 }), + double("story", as_fever_json: { id: 7 }) + ]) + expect(subject.call("items" => nil, since_id: 3)).to eq( items: [ { id: 5 }, { id: 7 } ], - total_items: 3 - }) + total_items: 3) end it "returns a list of specified items including total count" do - expect(story_repository).to receive(:fetch_by_ids).with(%w(5 11)).twice.and_return([ - double("story", as_fever_json: { id: 5 }), - double("story", as_fever_json: { id: 11 }) - ]) + expect(story_repository) + .to receive(:fetch_by_ids) + .with(%w(5 11)) + .twice + .and_return([ + double("story", as_fever_json: { id: 5 }), + double("story", as_fever_json: { id: 11 }) + ]) - expect(subject.call("items" => nil, with_ids: "5,11")).to eq({ + expect(subject.call("items" => nil, with_ids: "5,11")).to eq( items: [ { id: 5 }, { id: 11 } ], - total_items: 2 - }) + total_items: 2) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/read_links_spec.rb b/spec/fever_api/read_links_spec.rb index eeebdfbfc..895123de0 100644 --- a/spec/fever_api/read_links_spec.rb +++ b/spec/fever_api/read_links_spec.rb @@ -6,7 +6,7 @@ subject { FeverAPI::ReadLinks.new } it "returns a fixed link list if requested" do - expect(subject.call("links" => nil)).to eq({ links: [] }) + expect(subject.call("links" => nil)).to eq(links: []) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/sync_saved_item_ids_spec.rb b/spec/fever_api/sync_saved_item_ids_spec.rb index d03fafbe8..e9efefb64 100644 --- a/spec/fever_api/sync_saved_item_ids_spec.rb +++ b/spec/fever_api/sync_saved_item_ids_spec.rb @@ -13,7 +13,7 @@ it "returns a list of starred items if requested" do expect(story_repository).to receive(:all_starred).and_return(stories) - expect(subject.call("saved_item_ids" => nil)).to eq({ saved_item_ids: story_ids.join(",") }) + expect(subject.call("saved_item_ids" => nil)).to eq(saved_item_ids: story_ids.join(",")) end it "returns an empty hash otherwise" do diff --git a/spec/fever_api/sync_unread_item_ids_spec.rb b/spec/fever_api/sync_unread_item_ids_spec.rb index f63a2c200..b7f9925f4 100644 --- a/spec/fever_api/sync_unread_item_ids_spec.rb +++ b/spec/fever_api/sync_unread_item_ids_spec.rb @@ -13,7 +13,7 @@ it "returns a list of unread items if requested" do expect(story_repository).to receive(:unread).and_return(stories) - expect(subject.call("unread_item_ids" => nil)).to eq({ unread_item_ids: story_ids.join(",") }) + expect(subject.call("unread_item_ids" => nil)).to eq(unread_item_ids: story_ids.join(",")) end it "returns an empty hash otherwise" do diff --git a/spec/helpers/url_helers_spec.rb b/spec/helpers/url_helers_spec.rb index 05564591c..6ed0288bf 100644 --- a/spec/helpers/url_helers_spec.rb +++ b/spec/helpers/url_helers_spec.rb @@ -26,7 +26,7 @@ class Helper EOS result = helper.expand_absolute_urls(content, "http://oodl.io/d/") - expect(result.gsub(/\n/, "")).to eq <<-EOS.gsub(/\n/, "") + expect(result.delete("\n")).to eq <<-EOS.delete("\n")

tee @@ -50,7 +50,7 @@ class Helper EOS result = helper.expand_absolute_urls(content, "http://oodl.io/d/") - expect(result.gsub(/\n/, "")).to eq <<-EOS.gsub(/\n/, "") + expect(result.delete("\n")).to eq <<-EOS.delete("\n")
From d7a408fc6eabcc59e638f737d84deb591c22c953 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sat, 24 Jun 2017 23:56:28 -0600 Subject: [PATCH 24/90] upgrade outdated dependencies --- Gemfile | 24 +++++++-------- Gemfile.lock | 87 ++++++++++++++++++++++++---------------------------- 2 files changed, 52 insertions(+), 59 deletions(-) diff --git a/Gemfile b/Gemfile index a2010eadf..b567dd571 100644 --- a/Gemfile +++ b/Gemfile @@ -2,14 +2,14 @@ ruby "2.4.1" source "https://rubygems.org" group :production do - gem "pg", "~> 0.18.4" - gem "puma", "~> 2.15" + gem "pg", "~> 0.21.0" + gem "puma", "~> 3.9.1" end group :development do gem "sqlite3", "~> 1.3" gem "pry-byebug", "~> 3.3" - gem "foreman", "~> 0.78.0" + gem "foreman", "~> 0.84.0" gem "shotgun", "~> 0.9.1" end @@ -19,31 +19,31 @@ group :development, :test do gem "faker", "~> 1.6" gem "rack-test", "~> 0.6.3" gem "rspec", "~> 3.4" - gem "rspec-html-matchers", "~> 0.7.0" - gem "timecop", "~> 0.8.0" + gem "rspec-html-matchers", "~> 0.9.1" + gem "timecop", "~> 0.9.0" gem "rubocop", "~> 0.38", require: false end -gem "activerecord", "~> 4.2.6" +gem "activerecord", "~> 5.1.1" gem "bcrypt", "~> 3.1" gem "delayed_job", "~> 4.1" gem "delayed_job_active_record", "~> 4.1" gem "feedbag", "~> 0.9.5" -gem "i18n", "~> 0.7.0" +gem "i18n", "~> 0.8.4" gem "nokogiri", "~> 1.6" -gem "rack-protection", "~> 1.5" +gem "rack-protection", "~> 2.0.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" -gem "rake", "~> 10.5" +gem "rake", "~> 12.0.0" gem "sinatra-activerecord", "~> 2.0" -gem "sinatra-assetpack", "~> 0.3.5", require: "sinatra/assetpack" -gem "sinatra-contrib", "~> 1.4.7" +#gem "sinatra-assetpack", "~> 0.3.5", require: "sinatra/assetpack" +gem "sinatra-contrib", "~> 2.0.0" gem "sinatra-flash", "~> 0.3.0" gem "thread", "~> 0.2.2" gem "will_paginate", "~> 3.1.0" gem "loofah", "~> 2.0" gem "sass" -gem "sinatra", "~> 1.4.8", ">= 1.4.8" +gem "sinatra", "~> 2.0.0" gem "sprockets", "~> 3.0" gem "sprockets-helpers" gem "uglifier" diff --git a/Gemfile.lock b/Gemfile.lock index 65a3351c0..762799059 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,23 @@ GEM remote: https://rubygems.org/ specs: - activemodel (4.2.8) - activesupport (= 4.2.8) - builder (~> 3.1) - activerecord (4.2.8) - activemodel (= 4.2.8) - activesupport (= 4.2.8) - arel (~> 6.0) - activesupport (4.2.8) + activemodel (5.1.1) + activesupport (= 5.1.1) + activerecord (5.1.1) + activemodel (= 5.1.1) + activesupport (= 5.1.1) + arel (~> 8.0) + activesupport (5.1.1) + concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.5.1) public_suffix (~> 2.0, >= 2.0.2) - arel (6.0.4) + arel (8.0.0) ast (2.3.0) backports (3.8.0) bcrypt (3.1.11) - builder (3.2.3) byebug (9.0.6) capybara (2.14.3) addressable @@ -58,10 +56,9 @@ GEM faraday_middleware (>= 0.9) loofah (>= 2.0) sax-machine (>= 1.0) - foreman (0.78.0) + foreman (0.84.0) thor (~> 0.19.1) - i18n (0.7.0) - jsmin (1.0.1) + i18n (0.8.4) json (2.1.0) loofah (2.0.3) nokogiri (>= 1.5.9) @@ -73,13 +70,14 @@ GEM minitest (5.10.2) multi_json (1.12.1) multipart-post (2.0.0) + mustermann (1.0.0) nokogiri (1.8.0) mini_portile2 (~> 2.2.0) open_uri_redirections (0.2.1) parallel (1.11.2) parser (2.4.0.0) ast (~> 2.2) - pg (0.18.4) + pg (0.21.0) powerpack (0.1.1) pry (0.10.4) coderay (~> 1.1.0) @@ -89,9 +87,9 @@ GEM byebug (~> 9.0) pry (~> 0.10) public_suffix (2.0.5) - puma (2.16.0) - rack (1.6.8) - rack-protection (1.5.3) + puma (3.9.1) + rack (2.0.3) + rack-protection (2.0.0) rack rack-ssl (1.4.1) rack @@ -102,7 +100,7 @@ GEM rack-test (>= 0.5) rainbow (2.2.2) rake - rake (10.5.0) + rake (12.0.0) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -112,7 +110,7 @@ GEM rspec-expectations (3.6.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.6.0) - rspec-html-matchers (0.7.3) + rspec-html-matchers (0.9.1) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) rspec-mocks (3.6.0) @@ -136,24 +134,20 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.1) - sinatra (1.4.8) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) + sinatra (2.0.0) + mustermann (~> 1.0) + rack (~> 2.0) + rack-protection (= 2.0.0) + tilt (~> 2.0) sinatra-activerecord (2.0.13) activerecord (>= 3.2) sinatra (>= 1.0) - sinatra-assetpack (0.3.5) - jsmin - rack-test - sinatra - tilt (>= 1.3.0, < 2.0) - sinatra-contrib (1.4.7) + sinatra-contrib (2.0.0) backports (>= 2.0) multi_json - rack-protection - rack-test - sinatra (~> 1.4.0) + mustermann (~> 1.0) + rack-protection (= 2.0.0) + sinatra (= 2.0.0) tilt (>= 1.3, < 3) sinatra-flash (0.3.0) sinatra (>= 1.0.0) @@ -169,8 +163,8 @@ GEM thor (0.19.4) thread (0.2.2) thread_safe (0.3.6) - tilt (1.4.1) - timecop (0.8.1) + tilt (2.0.7) + timecop (0.9.0) tins (1.14.0) tzinfo (1.2.3) thread_safe (~> 0.1) @@ -185,7 +179,7 @@ PLATFORMS ruby DEPENDENCIES - activerecord (~> 4.2.6) + activerecord (~> 5.1.1) bcrypt (~> 3.1) capybara (~> 2.6) coveralls (~> 0.8.10) @@ -194,33 +188,32 @@ DEPENDENCIES faker (~> 1.6) feedbag (~> 0.9.5) feedjira (~> 2.0) - foreman (~> 0.78.0) - i18n (~> 0.7.0) + foreman (~> 0.84.0) + i18n (~> 0.8.4) loofah (~> 2.0) nokogiri (~> 1.6) - pg (~> 0.18.4) + pg (~> 0.21.0) pry-byebug (~> 3.3) - puma (~> 2.15) - rack-protection (~> 1.5) + puma (~> 3.9.1) + rack-protection (~> 2.0.0) rack-ssl (~> 1.4) rack-test (~> 0.6.3) racksh (~> 1.0) - rake (~> 10.5) + rake (~> 12.0.0) rspec (~> 3.4) - rspec-html-matchers (~> 0.7.0) + rspec-html-matchers (~> 0.9.1) rubocop (~> 0.38) sass shotgun (~> 0.9.1) - sinatra (~> 1.4.8, >= 1.4.8) + sinatra (~> 2.0.0) sinatra-activerecord (~> 2.0) - sinatra-assetpack (~> 0.3.5) - sinatra-contrib (~> 1.4.7) + sinatra-contrib (~> 2.0.0) sinatra-flash (~> 0.3.0) sprockets (~> 3.0) sprockets-helpers sqlite3 (~> 1.3) thread (~> 0.2.2) - timecop (~> 0.8.0) + timecop (~> 0.9.0) uglifier will_paginate (~> 3.1.0) From 2665a947e5967888d11c8a2c7516e41214f5b2f7 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 25 Jun 2017 00:04:40 -0600 Subject: [PATCH 25/90] tweak gemfile order --- Gemfile | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Gemfile b/Gemfile index b567dd571..d78e1019a 100644 --- a/Gemfile +++ b/Gemfile @@ -7,10 +7,10 @@ group :production do end group :development do - gem "sqlite3", "~> 1.3" - gem "pry-byebug", "~> 3.3" gem "foreman", "~> 0.84.0" + gem "pry-byebug", "~> 3.3" gem "shotgun", "~> 0.9.1" + gem "sqlite3", "~> 1.3" end group :development, :test do @@ -20,31 +20,35 @@ group :development, :test do gem "rack-test", "~> 0.6.3" gem "rspec", "~> 3.4" gem "rspec-html-matchers", "~> 0.9.1" - gem "timecop", "~> 0.9.0" gem "rubocop", "~> 0.38", require: false + gem "timecop", "~> 0.9.0" end gem "activerecord", "~> 5.1.1" gem "bcrypt", "~> 3.1" gem "delayed_job", "~> 4.1" gem "delayed_job_active_record", "~> 4.1" + gem "feedbag", "~> 0.9.5" +gem "feedjira", "~> 2.0" gem "i18n", "~> 0.8.4" +gem "loofah", "~> 2.0" + gem "nokogiri", "~> 1.6" gem "rack-protection", "~> 2.0.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" + gem "rake", "~> 12.0.0" +gem "sass" +gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" -#gem "sinatra-assetpack", "~> 0.3.5", require: "sinatra/assetpack" + gem "sinatra-contrib", "~> 2.0.0" gem "sinatra-flash", "~> 0.3.0" -gem "thread", "~> 0.2.2" -gem "will_paginate", "~> 3.1.0" -gem "loofah", "~> 2.0" -gem "sass" -gem "sinatra", "~> 2.0.0" gem "sprockets", "~> 3.0" gem "sprockets-helpers" + +gem "thread", "~> 0.2.2" gem "uglifier" -gem "feedjira", "~> 2.0" +gem "will_paginate", "~> 3.1.0" From 4d5e0808359104762879f4e4ddf913ebe798380d Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 16 Oct 2017 02:26:28 -0600 Subject: [PATCH 26/90] updated to latest gems --- .ruby-version | 2 +- Gemfile | 18 +++---- Gemfile.lock | 119 ++++++++++++++++++++------------------------ spec/spec_helper.rb | 1 - 4 files changed, 62 insertions(+), 78 deletions(-) diff --git a/.ruby-version b/.ruby-version index 005119baa..8e8299dcc 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.4.1 +2.4.2 diff --git a/Gemfile b/Gemfile index d78e1019a..5597087e8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,27 +1,21 @@ -ruby "2.4.1" +ruby "2.4.2" source "https://rubygems.org" group :production do gem "pg", "~> 0.21.0" - gem "puma", "~> 3.9.1" -end - -group :development do - gem "foreman", "~> 0.84.0" - gem "pry-byebug", "~> 3.3" - gem "shotgun", "~> 0.9.1" - gem "sqlite3", "~> 1.3" + gem "puma", "~> 3.10.0" end group :development, :test do gem "capybara", "~> 2.6" gem "coveralls", "~> 0.8.10", require: false gem "faker", "~> 1.6" - gem "rack-test", "~> 0.6.3" + gem "rack-test", "~> 0.7.0" gem "rspec", "~> 3.4" gem "rspec-html-matchers", "~> 0.9.1" gem "rubocop", "~> 0.38", require: false gem "timecop", "~> 0.9.0" + gem "sqlite3" end gem "activerecord", "~> 5.1.1" @@ -31,7 +25,7 @@ gem "delayed_job_active_record", "~> 4.1" gem "feedbag", "~> 0.9.5" gem "feedjira", "~> 2.0" -gem "i18n", "~> 0.8.4" +gem "i18n", "~> 0.9.0" gem "loofah", "~> 2.0" gem "nokogiri", "~> 1.6" @@ -39,7 +33,7 @@ gem "rack-protection", "~> 2.0.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" -gem "rake", "~> 12.0.0" +gem "rake", "~> 12.1.0" gem "sass" gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index 762799059..940fc8882 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,32 +1,30 @@ GEM remote: https://rubygems.org/ specs: - activemodel (5.1.1) - activesupport (= 5.1.1) - activerecord (5.1.1) - activemodel (= 5.1.1) - activesupport (= 5.1.1) + activemodel (5.1.4) + activesupport (= 5.1.4) + activerecord (5.1.4) + activemodel (= 5.1.4) + activesupport (= 5.1.4) arel (~> 8.0) - activesupport (5.1.1) + activesupport (5.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.1) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) arel (8.0.0) ast (2.3.0) - backports (3.8.0) + backports (3.10.0) bcrypt (3.1.11) - byebug (9.0.6) - capybara (2.14.3) + capybara (2.15.4) addressable - mime-types (>= 1.16) + mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - coderay (1.1.1) concurrent-ruby (1.0.5) coveralls (0.8.21) json (>= 1.8, < 3) @@ -34,6 +32,7 @@ GEM term-ansicolor (~> 1.3) thor (~> 0.19.4) tins (~> 1.6) + crass (1.0.2) delayed_job (4.1.3) activesupport (>= 3.0, < 5.2) delayed_job_active_record (4.1.2) @@ -42,11 +41,11 @@ GEM diff-lcs (1.3) docile (1.1.5) execjs (2.7.0) - faker (1.7.3) + faker (1.8.4) i18n (~> 0.5) - faraday (0.12.1) + faraday (0.13.1) multipart-post (>= 1.2, < 3) - faraday_middleware (0.11.0.1) + faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) feedbag (0.9.8) nokogiri (~> 1.0) @@ -56,51 +55,45 @@ GEM faraday_middleware (>= 0.9) loofah (>= 2.0) sax-machine (>= 1.0) - foreman (0.84.0) - thor (~> 0.19.1) - i18n (0.8.4) + ffi (1.9.18) + i18n (0.9.0) + concurrent-ruby (~> 1.0) json (2.1.0) - loofah (2.0.3) + loofah (2.1.1) + crass (~> 1.0.2) nokogiri (>= 1.5.9) - method_source (0.8.2) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) - mini_portile2 (2.2.0) - minitest (5.10.2) - multi_json (1.12.1) + mini_mime (0.1.4) + mini_portile2 (2.3.0) + minitest (5.10.3) + multi_json (1.12.2) multipart-post (2.0.0) - mustermann (1.0.0) - nokogiri (1.8.0) - mini_portile2 (~> 2.2.0) + mustermann (1.0.1) + nokogiri (1.8.1) + mini_portile2 (~> 2.3.0) open_uri_redirections (0.2.1) - parallel (1.11.2) + parallel (1.12.0) parser (2.4.0.0) ast (~> 2.2) pg (0.21.0) powerpack (0.1.1) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-byebug (3.4.2) - byebug (~> 9.0) - pry (~> 0.10) - public_suffix (2.0.5) - puma (3.9.1) + public_suffix (3.0.0) + puma (3.10.0) rack (2.0.3) rack-protection (2.0.0) rack rack-ssl (1.4.1) rack - rack-test (0.6.3) - rack (>= 1.0) + rack-test (0.7.0) + rack (>= 1.0, < 3) racksh (1.0.0) rack (>= 1.0) rack-test (>= 0.5) rainbow (2.2.2) rake - rake (12.0.0) + rake (12.1.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) rspec (3.6.0) rspec-core (~> 3.6.0) rspec-expectations (~> 3.6.0) @@ -117,23 +110,25 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.6.0) rspec-support (3.6.0) - rubocop (0.49.1) + rubocop (0.50.0) parallel (~> 1.10) parser (>= 2.3.3.1, < 3.0) powerpack (~> 0.1) - rainbow (>= 1.99.1, < 3.0) + rainbow (>= 2.2.2, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.8.1) - sass (3.4.24) + ruby-progressbar (1.9.0) + sass (3.5.2) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) sax-machine (1.3.2) - shotgun (0.9.2) - rack (>= 1.0) simplecov (0.14.1) docile (~> 1.1.0) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-html (0.10.1) + simplecov-html (0.10.2) sinatra (2.0.0) mustermann (~> 1.0) rack (~> 2.0) @@ -151,7 +146,6 @@ GEM tilt (>= 1.3, < 3) sinatra-flash (0.3.0) sinatra (>= 1.0.0) - slop (3.6.0) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -163,9 +157,9 @@ GEM thor (0.19.4) thread (0.2.2) thread_safe (0.3.6) - tilt (2.0.7) - timecop (0.9.0) - tins (1.14.0) + tilt (2.0.8) + timecop (0.9.1) + tins (1.15.0) tzinfo (1.2.3) thread_safe (~> 0.1) uglifier (3.2.0) @@ -188,37 +182,34 @@ DEPENDENCIES faker (~> 1.6) feedbag (~> 0.9.5) feedjira (~> 2.0) - foreman (~> 0.84.0) - i18n (~> 0.8.4) + i18n (~> 0.9.0) loofah (~> 2.0) nokogiri (~> 1.6) pg (~> 0.21.0) - pry-byebug (~> 3.3) - puma (~> 3.9.1) + puma (~> 3.10.0) rack-protection (~> 2.0.0) rack-ssl (~> 1.4) - rack-test (~> 0.6.3) + rack-test (~> 0.7.0) racksh (~> 1.0) - rake (~> 12.0.0) + rake (~> 12.1.0) rspec (~> 3.4) rspec-html-matchers (~> 0.9.1) rubocop (~> 0.38) sass - shotgun (~> 0.9.1) sinatra (~> 2.0.0) sinatra-activerecord (~> 2.0) sinatra-contrib (~> 2.0.0) sinatra-flash (~> 0.3.0) sprockets (~> 3.0) sprockets-helpers - sqlite3 (~> 1.3) + sqlite3 thread (~> 0.2.2) timecop (~> 0.9.0) uglifier will_paginate (~> 3.1.0) RUBY VERSION - ruby 2.4.1p111 + ruby 2.4.2p198 BUNDLED WITH - 1.14.6 + 1.16.0.pre.3 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f2799081b..1b0a16f94 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,7 +3,6 @@ require "rspec" require "rspec-html-matchers" require "rack/test" -require "pry" require "faker" require "ostruct" require "date" From 18486be092c5334bbd3e4b26074398610d38652c Mon Sep 17 00:00:00 2001 From: Michael Stock Date: Thu, 21 Dec 2017 19:24:10 -0800 Subject: [PATCH 27/90] Move to using Feedjira 3.0 Feedjira removed it's built-in HTTP fetching so that has been replaced with HTTParty. --- Gemfile | 3 ++- Gemfile.lock | 15 ++++++------- app/tasks/fetch_feed.rb | 7 +++++-- app/utils/feed_discovery.rb | 12 ++++++----- spec/tasks/fetch_feed_spec.rb | 35 +++++++++++++++++++++---------- spec/utils/feed_discovery_spec.rb | 33 +++++++++++++++++++---------- 6 files changed, 66 insertions(+), 39 deletions(-) diff --git a/Gemfile b/Gemfile index a8d60ed70..7decf2305 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,8 @@ gem "bcrypt", "~> 3.1" gem "delayed_job", "~> 4.1" gem "delayed_job_active_record", "~> 4.1" gem "feedbag", "~> 0.9.5" -gem "feedjira", "~> 2.1.3" +gem "feedjira", "~> 3.0.0.beta1" +gem "httparty" gem "i18n" gem "loofah", "~> 2.0" gem "nokogiri", "~> 1.6", ">= 1.6.7.2" diff --git a/Gemfile.lock b/Gemfile.lock index 8b3bcf184..6d1635ac1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -51,17 +51,13 @@ GEM execjs (2.7.0) faker (1.6.3) i18n (~> 0.5) - faraday (0.13.1) - multipart-post (>= 1.2, < 3) - faraday_middleware (0.12.2) - faraday (>= 0.7.4, < 1.0) feedbag (0.9.5) nokogiri (~> 1.0) - feedjira (2.1.3) - faraday (>= 0.9) - faraday_middleware (>= 0.9) + feedjira (3.0.0.beta1) loofah (>= 2.0) sax-machine (>= 1.0) + httparty (0.15.6) + multi_xml (>= 0.5.2) i18n (0.7.0) json (1.8.3) kgio (2.10.0) @@ -75,7 +71,7 @@ GEM mini_portile2 (2.3.0) minitest (5.8.4) multi_json (1.12.1) - multipart-post (2.0.0) + multi_xml (0.6.0) nokogiri (1.8.1) mini_portile2 (~> 2.3.0) parser (2.3.0.6) @@ -190,7 +186,8 @@ DEPENDENCIES delayed_job_active_record (~> 4.1) faker (~> 1.2) feedbag (~> 0.9.5) - feedjira (~> 2.1.3) + feedjira (~> 3.0.0.beta1) + httparty i18n loofah (~> 2.0) nokogiri (~> 1.6, >= 1.6.7.2) diff --git a/app/tasks/fetch_feed.rb b/app/tasks/fetch_feed.rb index 2482391cc..ba62dad72 100644 --- a/app/tasks/fetch_feed.rb +++ b/app/tasks/fetch_feed.rb @@ -1,13 +1,15 @@ require "feedjira" +require "httparty" require_relative "../repositories/story_repository" require_relative "../repositories/feed_repository" require_relative "../commands/feeds/find_new_stories" class FetchFeed - def initialize(feed, parser: Feedjira::Feed, logger: nil) + def initialize(feed, parser: Feedjira, client: HTTParty, logger: nil) @feed = feed @parser = parser + @client = client @logger = logger end @@ -30,7 +32,8 @@ def fetch private def fetch_raw_feed - @parser.fetch_and_parse(@feed.url) + response = @client.get(@feed.url) + @parser.parse(response) end def feed_not_modified diff --git a/app/utils/feed_discovery.rb b/app/utils/feed_discovery.rb index 8c8be46d9..9ae8335be 100644 --- a/app/utils/feed_discovery.rb +++ b/app/utils/feed_discovery.rb @@ -1,20 +1,22 @@ require "feedbag" require "feedjira" +require "httparty" class FeedDiscovery - def discover(url, finder = Feedbag, parser = Feedjira::Feed) - get_feed_for_url(url, parser) do + def discover(url, finder = Feedbag, parser = Feedjira, client = HTTParty) + get_feed_for_url(url, parser, client) do urls = finder.find(url) return false if urls.empty? - get_feed_for_url(urls.first, parser) do + get_feed_for_url(urls.first, parser, client) do return false end end end - def get_feed_for_url(url, parser) - feed = parser.fetch_and_parse(url) + def get_feed_for_url(url, parser, client) + response = client.get(url) + feed = parser.parse(response) feed.feed_url ||= url feed rescue diff --git a/spec/tasks/fetch_feed_spec.rb b/spec/tasks/fetch_feed_spec.rb index 7408e854e..8448bbd12 100644 --- a/spec/tasks/fetch_feed_spec.rb +++ b/spec/tasks/fetch_feed_spec.rb @@ -18,24 +18,26 @@ context "when feed has not been modified" do it "should not try to fetch posts" do - parser = double(fetch_and_parse: 304) + client = class_spy(HTTParty) + parser = class_double(Feedjira, parse: 304) expect(StoryRepository).not_to receive(:add) - FetchFeed.new(daring_fireball, parser: parser) + FetchFeed.new(daring_fireball, parser: parser, client: client) end end context "when no new posts have been added" do it "should not add any new posts" do fake_feed = double(last_modified: Time.new(2012, 12, 31)) - parser = double(fetch_and_parse: fake_feed) + client = class_spy(HTTParty) + parser = class_double(Feedjira, parse: fake_feed) allow_any_instance_of(FindNewStories).to receive(:new_stories).and_return([]) expect(StoryRepository).not_to receive(:add) - FetchFeed.new(daring_fireball, parser: parser).fetch + FetchFeed.new(daring_fireball, parser: parser, client: client).fetch end end @@ -45,7 +47,8 @@ let(:old_story) { double } let(:fake_feed) { double(last_modified: now, entries: [new_story, old_story]) } - let(:fake_parser) { double(fetch_and_parse: fake_feed) } + let(:fake_client) { class_spy(HTTParty) } + let(:fake_parser) { class_double(Feedjira, parse: fake_feed) } before { allow_any_instance_of(FindNewStories).to receive(:new_stories).and_return([new_story]) } @@ -53,35 +56,45 @@ expect(StoryRepository).to receive(:add).with(new_story, daring_fireball) expect(StoryRepository).not_to receive(:add).with(old_story, daring_fireball) - FetchFeed.new(daring_fireball, parser: fake_parser).fetch + FetchFeed.new( + daring_fireball, + parser: fake_parser, + client: fake_client + ).fetch end it "should update the last fetched time for the feed" do expect(FeedRepository).to receive(:update_last_fetched) .with(daring_fireball, now) - FetchFeed.new(daring_fireball, parser: fake_parser).fetch + FetchFeed.new( + daring_fireball, + parser: fake_parser, + client: fake_client + ).fetch end end context "feed status" do it "sets the status to green if things are all good" do fake_feed = double(last_modified: Time.new(2012, 12, 31), entries: []) - parser = double(fetch_and_parse: fake_feed) + client = class_spy(HTTParty) + parser = class_double(Feedjira, parse: fake_feed) expect(FeedRepository).to receive(:set_status) .with(:green, daring_fireball) - FetchFeed.new(daring_fireball, parser: parser).fetch + FetchFeed.new(daring_fireball, parser: parser, client: client).fetch end it "sets the status to red if things go wrong" do - parser = double(fetch_and_parse: 404) + client = class_spy(HTTParty) + parser = class_double(Feedjira, parse: 404) expect(FeedRepository).to receive(:set_status) .with(:red, daring_fireball) - FetchFeed.new(daring_fireball, parser: parser).fetch + FetchFeed.new(daring_fireball, parser: parser, client: client).fetch end end end diff --git a/spec/utils/feed_discovery_spec.rb b/spec/utils/feed_discovery_spec.rb index 1c10286d9..19be6b4eb 100644 --- a/spec/utils/feed_discovery_spec.rb +++ b/spec/utils/feed_discovery_spec.rb @@ -4,7 +4,8 @@ describe FeedDiscovery do let(:finder) { double } - let(:parser) { double } + let(:client) { class_double(HTTParty) } + let(:parser) { class_double(Feedjira) } let(:feed) { double(feed_url: url) } let(:url) { "http://example.com" } @@ -13,38 +14,48 @@ describe "#discover" do it "returns false if url is not a feed and feed url cannot be discovered" do - expect(parser).to receive(:fetch_and_parse).with(url).and_raise(StandardError) + expect(client).to receive(:get).with(url) + expect(parser).to receive(:parse).and_raise(StandardError) expect(finder).to receive(:find).and_return([]) - result = FeedDiscovery.new.discover(url, finder, parser) + result = FeedDiscovery.new.discover(url, finder, parser, client) expect(result).to eq(false) end it "returns a feed if the url provided is parsable" do - expect(parser).to receive(:fetch_and_parse).with(url).and_return(feed) + expect(client).to receive(:get).with(url) + expect(parser).to receive(:parse).and_return(feed) - result = FeedDiscovery.new.discover(url, finder, parser) + result = FeedDiscovery.new.discover(url, finder, parser, client) expect(result).to eq feed end it "returns false if the discovered feed is not parsable" do - expect(parser).to receive(:fetch_and_parse).with(url).and_raise(StandardError) + expect(client).to receive(:get).with(url) + expect(parser).to receive(:parse).and_raise(StandardError) + expect(finder).to receive(:find).and_return([invalid_discovered_url]) - expect(parser).to receive(:fetch_and_parse).with(invalid_discovered_url).and_raise(StandardError) - result = FeedDiscovery.new.discover(url, finder, parser) + expect(client).to receive(:get).with(invalid_discovered_url) + expect(parser).to receive(:parse).and_raise(StandardError) + + result = FeedDiscovery.new.discover(url, finder, parser, client) expect(result).to eq(false) end it "returns the feed if the discovered feed is parsable" do - expect(parser).to receive(:fetch_and_parse).with(url).and_raise(StandardError) + expect(client).to receive(:get).with(url) + expect(parser).to receive(:parse).and_raise(StandardError) + expect(finder).to receive(:find).and_return([valid_discovered_url]) - expect(parser).to receive(:fetch_and_parse).with(valid_discovered_url).and_return(feed) - result = FeedDiscovery.new.discover(url, finder, parser) + expect(client).to receive(:get).with(valid_discovered_url) + expect(parser).to receive(:parse).and_return(feed) + + result = FeedDiscovery.new.discover(url, finder, parser, client) expect(result).to eq feed end From 12a2df1b97ef8bbf4a751d4d1374f57a4e07f6a9 Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 14 Mar 2018 22:56:50 -0600 Subject: [PATCH 28/90] update ruby version, gems --- .ruby-version | 2 +- Gemfile | 10 ++-- Gemfile.lock | 139 +++++++++++++++++++++++++------------------------- 3 files changed, 76 insertions(+), 75 deletions(-) diff --git a/.ruby-version b/.ruby-version index 8e8299dcc..bf080da67 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.4.2 +ruby-2.5.0 diff --git a/Gemfile b/Gemfile index 3476877f6..adccefe64 100644 --- a/Gemfile +++ b/Gemfile @@ -1,16 +1,16 @@ -ruby "2.4.2" +ruby "2.5.0" source "https://rubygems.org" group :production do - gem "pg", "~> 0.21.0" - gem "puma", "~> 3.10.0" + gem "pg", "~> 1.0.0" + gem "puma", "~> 3.11.3" end group :development, :test do gem "capybara", "~> 2.6" gem "coveralls", "~> 0.8.10", require: false gem "faker", "~> 1.6" - gem "rack-test", "~> 0.7.0" + gem "rack-test", "~> 0.8.3" gem "rspec", "~> 3.4" gem "rspec-html-matchers", "~> 0.9.1" gem "rubocop", "~> 0.38", require: false @@ -33,7 +33,7 @@ gem "rack-protection", "~> 2.0.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" -gem "rake", "~> 12.1.0" +gem "rake", "~> 12.3.0" gem "sass" gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index dee603fdb..2412425ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,13 @@ GEM remote: https://rubygems.org/ specs: - activemodel (5.1.4) - activesupport (= 5.1.4) - activerecord (5.1.4) - activemodel (= 5.1.4) - activesupport (= 5.1.4) + activemodel (5.1.5) + activesupport (= 5.1.5) + activerecord (5.1.5) + activemodel (= 5.1.5) + activesupport (= 5.1.5) arel (~> 8.0) - activesupport (5.1.4) + activesupport (5.1.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (~> 0.7) minitest (~> 5.1) @@ -15,16 +15,16 @@ GEM addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) arel (8.0.0) - ast (2.3.0) - backports (3.10.0) + ast (2.4.0) + backports (3.11.1) bcrypt (3.1.11) - capybara (2.15.4) + capybara (2.18.0) addressable mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) - xpath (~> 2.0) + xpath (>= 2.0, < 4.0) concurrent-ruby (1.0.5) coveralls (0.8.21) json (>= 1.8, < 3) @@ -32,8 +32,8 @@ GEM term-ansicolor (~> 1.3) thor (~> 0.19.4) tins (~> 1.6) - crass (1.0.2) - delayed_job (4.1.3) + crass (1.0.3) + delayed_job (4.1.4) activesupport (>= 3.0, < 5.2) delayed_job_active_record (4.1.2) activerecord (>= 3.0, < 5.2) @@ -41,82 +41,83 @@ GEM diff-lcs (1.3) docile (1.1.5) execjs (2.7.0) - faker (1.8.4) - i18n (~> 0.5) - faraday (0.13.1) + faker (1.8.7) + i18n (>= 0.7) + faraday (0.14.0) multipart-post (>= 1.2, < 3) faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) feedbag (0.9.8) nokogiri (~> 1.0) - feedjira (2.1.3) + open_uri_redirections (~> 0.2) + feedjira (2.1.4) faraday (>= 0.9) faraday_middleware (>= 0.9) loofah (>= 2.0) sax-machine (>= 1.0) - i18n (0.7.0) - json (1.8.3) - kgio (2.10.0) - loofah (2.1.1) + ffi (1.9.23) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + json (2.1.0) + loofah (2.2.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - method_source (0.8.2) - mime-types (3.0) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) + mini_mime (1.0.0) mini_portile2 (2.3.0) - minitest (5.8.4) - multi_json (1.12.1) + minitest (5.11.3) + multi_json (1.13.1) multipart-post (2.0.0) - nokogiri (1.8.1) + mustermann (1.0.2) + nokogiri (1.8.2) mini_portile2 (~> 2.3.0) - parser (2.3.0.6) - ast (~> 2.2) - pg (0.21.0) + open_uri_redirections (0.2.1) + parallel (1.12.1) + parser (2.5.0.4) + ast (~> 2.4.0) + pg (1.0.0) powerpack (0.1.1) - public_suffix (3.0.0) - puma (3.10.0) - rack (2.0.3) - rack-protection (2.0.0) + public_suffix (3.0.2) + puma (3.11.3) + rack (2.0.4) + rack-protection (2.0.1) rack rack-ssl (1.4.1) rack - rack-test (0.7.0) + rack-test (0.8.3) rack (>= 1.0, < 3) racksh (1.0.0) rack (>= 1.0) rack-test (>= 0.5) - rainbow (2.2.2) - rake - rake (12.1.0) - rb-fsevent (0.10.2) + rainbow (3.0.0) + rake (12.3.0) + rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) - rspec (3.6.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-core (3.6.0) - rspec-support (~> 3.6.0) - rspec-expectations (3.6.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) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) + rspec-support (~> 3.7.0) rspec-html-matchers (0.9.1) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.6.0) + rspec-mocks (3.7.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-support (3.6.0) - rubocop (0.50.0) + rspec-support (~> 3.7.0) + rspec-support (3.7.1) + rubocop (0.53.0) parallel (~> 1.10) - parser (>= 2.3.3.1, < 3.0) + parser (>= 2.5) powerpack (~> 0.1) - rainbow (>= 2.2.2, < 3.0) + rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.9.0) - sass (3.5.2) + sass (3.5.5) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -127,20 +128,20 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - sinatra (2.0.0) + sinatra (2.0.1) mustermann (~> 1.0) rack (~> 2.0) - rack-protection (= 2.0.0) + rack-protection (= 2.0.1) tilt (~> 2.0) sinatra-activerecord (2.0.13) activerecord (>= 3.2) sinatra (>= 1.0) - sinatra-contrib (2.0.0) + sinatra-contrib (2.0.1) backports (>= 2.0) multi_json mustermann (~> 1.0) - rack-protection (= 2.0.0) - sinatra (= 2.0.0) + rack-protection (= 2.0.1) + sinatra (= 2.0.1) tilt (>= 1.3, < 3) sinatra-flash (0.3.0) sinatra (>= 1.0.0) @@ -157,15 +158,15 @@ GEM thread_safe (0.3.6) tilt (2.0.8) timecop (0.9.1) - tins (1.15.0) - tzinfo (1.2.3) + tins (1.16.3) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (3.2.0) + uglifier (4.1.8) execjs (>= 0.3.0, < 3) unicode-display_width (1.3.0) will_paginate (3.1.6) - xpath (2.1.0) - nokogiri (~> 1.3) + xpath (3.0.0) + nokogiri (~> 1.8) PLATFORMS ruby @@ -183,13 +184,13 @@ DEPENDENCIES i18n loofah (~> 2.0) nokogiri (~> 1.6) - pg (~> 0.21.0) - puma (~> 3.10.0) + pg (~> 1.0.0) + puma (~> 3.11.3) rack-protection (~> 2.0.0) rack-ssl (~> 1.4) - rack-test (~> 0.7.0) + rack-test (~> 0.8.3) racksh (~> 1.0) - rake (~> 12.1.0) + rake (~> 12.3.0) rspec (~> 3.4) rspec-html-matchers (~> 0.9.1) rubocop (~> 0.38) @@ -207,7 +208,7 @@ DEPENDENCIES will_paginate (~> 3.1.0) RUBY VERSION - ruby 2.4.2p198 + ruby 2.5.0p0 BUNDLED WITH 1.16.1 From b8adb13f1b802f0a8181a6170a3f516f26d3cb4a Mon Sep 17 00:00:00 2001 From: David Waite Date: Sat, 16 Jun 2018 00:14:07 -0600 Subject: [PATCH 29/90] Upgrade to latest everything --- Gemfile | 7 ++--- Gemfile.lock | 52 ++++++++++++----------------------- spec/support/active_record.rb | 2 +- 3 files changed, 21 insertions(+), 40 deletions(-) diff --git a/Gemfile b/Gemfile index dfaef5ac8..38bb7bc3a 100644 --- a/Gemfile +++ b/Gemfile @@ -11,17 +11,16 @@ group :development do end group :development, :test do - gem "capybara", "~> 2.6" - gem "coveralls", "~> 0.8.10", require: false + gem "capybara", "~> 3.2.1" gem "faker", "~> 1.6" - gem "rack-test", "~> 0.8.3" + gem "rack-test", "~> 1.0.0" gem "rspec", "~> 3.4" gem "rspec-html-matchers", "~> 0.9.1" gem "rubocop", "~> 0.38", require: false gem "timecop", "~> 0.9.0" end -gem "activerecord", "~> 5.1.1" +gem "activerecord", "~> 5.2.0" gem "bcrypt", "~> 3.1" gem "delayed_job", "~> 4.1" gem "delayed_job_active_record", "~> 4.1" diff --git a/Gemfile.lock b/Gemfile.lock index fa027c619..d1a0a7899 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,37 +1,31 @@ GEM remote: https://rubygems.org/ specs: - activemodel (5.1.6) - activesupport (= 5.1.6) - activerecord (5.1.6) - activemodel (= 5.1.6) - activesupport (= 5.1.6) - arel (~> 8.0) - activesupport (5.1.6) + activemodel (5.2.0) + activesupport (= 5.2.0) + activerecord (5.2.0) + activemodel (= 5.2.0) + activesupport (= 5.2.0) + arel (>= 9.0) + activesupport (5.2.0) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) - arel (8.0.0) + arel (9.0.0) ast (2.4.0) backports (3.11.3) bcrypt (3.1.12) - capybara (2.18.0) + capybara (3.2.1) addressable mini_mime (>= 0.1.3) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (>= 2.0, < 4.0) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + xpath (~> 3.1) concurrent-ruby (1.0.5) - coveralls (0.8.21) - json (>= 1.8, < 3) - simplecov (~> 0.14.1) - term-ansicolor (~> 1.3) - thor (~> 0.19.4) - tins (~> 1.6) crass (1.0.4) delayed_job (4.1.5) activesupport (>= 3.0, < 5.3) @@ -39,7 +33,6 @@ GEM activerecord (>= 3.0, < 5.3) delayed_job (>= 3.0, < 5) diff-lcs (1.3) - docile (1.1.5) execjs (2.7.0) faker (1.8.7) i18n (>= 0.7) @@ -59,7 +52,6 @@ GEM i18n (1.0.1) concurrent-ruby (~> 1.0) jaro_winkler (1.5.1) - json (2.1.0) loofah (2.2.2) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -84,7 +76,7 @@ GEM rack rack-ssl (1.4.1) rack - rack-test (0.8.3) + rack-test (1.0.0) rack (>= 1.0, < 3) racksh (1.0.0) rack (>= 1.0) @@ -125,11 +117,6 @@ GEM rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) sax-machine (1.3.2) - simplecov (0.14.1) - docile (~> 1.1.0) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) sinatra (2.0.3) mustermann (~> 1.0) rack (~> 2.0) @@ -154,14 +141,10 @@ GEM sprockets-helpers (1.2.1) sprockets (>= 2.2) sqlite3 (1.3.13) - term-ansicolor (1.6.0) - tins (~> 1.0) - thor (0.19.4) thread (0.2.2) thread_safe (0.3.6) tilt (2.0.8) timecop (0.9.1) - tins (1.16.3) tzinfo (1.2.5) thread_safe (~> 0.1) uglifier (4.1.11) @@ -175,10 +158,9 @@ PLATFORMS ruby DEPENDENCIES - activerecord (~> 5.1.1) + activerecord (~> 5.2.0) bcrypt (~> 3.1) - capybara (~> 2.6) - coveralls (~> 0.8.10) + capybara (~> 3.2.1) delayed_job (~> 4.1) delayed_job_active_record (~> 4.1) faker (~> 1.6) @@ -191,7 +173,7 @@ DEPENDENCIES puma (~> 3.11.3) rack-protection (~> 2.0.0) rack-ssl (~> 1.4) - rack-test (~> 0.8.3) + rack-test (~> 1.0.0) racksh (~> 1.0) rake (~> 12.3.0) rspec (~> 3.4) diff --git a/spec/support/active_record.rb b/spec/support/active_record.rb index 6e13deec9..9b3556770 100644 --- a/spec/support/active_record.rb +++ b/spec/support/active_record.rb @@ -5,7 +5,7 @@ ActiveRecord::Base.logger = Logger.new("log/test.log") def need_to_migrate? - ActiveRecord::Migrator.new(:up, ActiveRecord::Migrator.migrations("db/migrate")).pending_migrations.any? + ActiveRecord::MigrationContext.new(["db/migrate"]).needs_migration? end ActiveRecord::Migrator.up "db/migrate" if need_to_migrate? From 8395c862f6c6f9981700b1a73bd919f027d71a8b Mon Sep 17 00:00:00 2001 From: David Waite Date: Sat, 16 Jun 2018 00:24:08 -0600 Subject: [PATCH 30/90] Updated migrations --- db/migrate/20130409010818_create_feeds.rb | 2 +- db/migrate/20130409010826_create_stories.rb | 2 +- ...0130412185253_add_new_fields_to_stories.rb | 2 +- db/migrate/20130418221144_add_user_model.rb | 2 +- .../20130423001740_drop_email_from_user.rb | 2 +- ...130423180446_remove_author_from_stories.rb | 2 +- ...130425211008_add_setup_complete_to_user.rb | 2 +- db/migrate/20130425222157_add_delayed_job.rb | 2 +- .../20130429232127_add_status_to_feeds.rb | 2 +- db/migrate/20130504005816_text_url.rb | 2 +- ...504022615_change_story_permalink_column.rb | 2 +- .../20130509131045_add_unique_constraints.rb | 2 +- ...130513025939_add_keep_unread_to_stories.rb | 2 +- ...44029_add_is_starred_status_for_stories.rb | 2 +- .../20130522014405_add_api_key_to_user.rb | 2 +- .../20130730120312_add_entry_id_to_stories.rb | 2 +- ...13712_update_stories_unique_constraints.rb | 2 +- .../20130821020313_update_nil_entry_ids.rb | 2 +- ...se_text_datatype_for_title_and_entry_id.rb | 2 +- ..._groups_table_and_foreign_keys_to_feeds.rb | 2 +- .../20140421224454_fix_invalid_unicode.rb | 2 +- ...nvalid_titles_with_unicode_line_endings.rb | 2 +- db/schema.rb | 85 +++++++++---------- 23 files changed, 62 insertions(+), 67 deletions(-) diff --git a/db/migrate/20130409010818_create_feeds.rb b/db/migrate/20130409010818_create_feeds.rb index c1eec66df..778a138b8 100644 --- a/db/migrate/20130409010818_create_feeds.rb +++ b/db/migrate/20130409010818_create_feeds.rb @@ -1,4 +1,4 @@ -class CreateFeeds < ActiveRecord::Migration +class CreateFeeds < ActiveRecord::Migration[5.1] def change create_table :feeds do |t| t.string :name diff --git a/db/migrate/20130409010826_create_stories.rb b/db/migrate/20130409010826_create_stories.rb index 0d9bcc91e..c5b35aeed 100644 --- a/db/migrate/20130409010826_create_stories.rb +++ b/db/migrate/20130409010826_create_stories.rb @@ -1,4 +1,4 @@ -class CreateStories < ActiveRecord::Migration +class CreateStories < ActiveRecord::Migration[5.1] def change create_table :stories do |t| t.string :title diff --git a/db/migrate/20130412185253_add_new_fields_to_stories.rb b/db/migrate/20130412185253_add_new_fields_to_stories.rb index 58916f7f6..84c31d214 100644 --- a/db/migrate/20130412185253_add_new_fields_to_stories.rb +++ b/db/migrate/20130412185253_add_new_fields_to_stories.rb @@ -1,4 +1,4 @@ -class AddNewFieldsToStories < ActiveRecord::Migration +class AddNewFieldsToStories < ActiveRecord::Migration[5.1] def change add_column :stories, :published, :timestamp add_column :stories, :is_read, :boolean diff --git a/db/migrate/20130418221144_add_user_model.rb b/db/migrate/20130418221144_add_user_model.rb index f454fc12e..54503bd55 100644 --- a/db/migrate/20130418221144_add_user_model.rb +++ b/db/migrate/20130418221144_add_user_model.rb @@ -1,4 +1,4 @@ -class AddUserModel < ActiveRecord::Migration +class AddUserModel < ActiveRecord::Migration[5.1] def change create_table :users do |t| t.string :email diff --git a/db/migrate/20130423001740_drop_email_from_user.rb b/db/migrate/20130423001740_drop_email_from_user.rb index e07e5eda1..f41e2ecd6 100644 --- a/db/migrate/20130423001740_drop_email_from_user.rb +++ b/db/migrate/20130423001740_drop_email_from_user.rb @@ -1,4 +1,4 @@ -class DropEmailFromUser < ActiveRecord::Migration +class DropEmailFromUser < ActiveRecord::Migration[5.1] def up remove_column :users, :email end diff --git a/db/migrate/20130423180446_remove_author_from_stories.rb b/db/migrate/20130423180446_remove_author_from_stories.rb index b38517f6d..2d0107940 100644 --- a/db/migrate/20130423180446_remove_author_from_stories.rb +++ b/db/migrate/20130423180446_remove_author_from_stories.rb @@ -1,4 +1,4 @@ -class RemoveAuthorFromStories < ActiveRecord::Migration +class RemoveAuthorFromStories < ActiveRecord::Migration[5.1] def up remove_column :stories, :author end diff --git a/db/migrate/20130425211008_add_setup_complete_to_user.rb b/db/migrate/20130425211008_add_setup_complete_to_user.rb index 1e5a57f1c..629284d9b 100644 --- a/db/migrate/20130425211008_add_setup_complete_to_user.rb +++ b/db/migrate/20130425211008_add_setup_complete_to_user.rb @@ -1,4 +1,4 @@ -class AddSetupCompleteToUser < ActiveRecord::Migration +class AddSetupCompleteToUser < ActiveRecord::Migration[5.1] def change add_column :users, :setup_complete, :boolean end diff --git a/db/migrate/20130425222157_add_delayed_job.rb b/db/migrate/20130425222157_add_delayed_job.rb index 6c32be2ca..81530e7f2 100644 --- a/db/migrate/20130425222157_add_delayed_job.rb +++ b/db/migrate/20130425222157_add_delayed_job.rb @@ -1,4 +1,4 @@ -class AddDelayedJob < ActiveRecord::Migration +class AddDelayedJob < ActiveRecord::Migration[5.1] def self.up create_table :delayed_jobs, force: true do |table| # Allows some jobs to jump to the front of the queue diff --git a/db/migrate/20130429232127_add_status_to_feeds.rb b/db/migrate/20130429232127_add_status_to_feeds.rb index da45f32bf..c804dc1a7 100644 --- a/db/migrate/20130429232127_add_status_to_feeds.rb +++ b/db/migrate/20130429232127_add_status_to_feeds.rb @@ -1,4 +1,4 @@ -class AddStatusToFeeds < ActiveRecord::Migration +class AddStatusToFeeds < ActiveRecord::Migration[5.1] def change add_column :feeds, :status, :int end diff --git a/db/migrate/20130504005816_text_url.rb b/db/migrate/20130504005816_text_url.rb index a62d7a10d..8de4fd5f3 100644 --- a/db/migrate/20130504005816_text_url.rb +++ b/db/migrate/20130504005816_text_url.rb @@ -1,4 +1,4 @@ -class TextUrl < ActiveRecord::Migration +class TextUrl < ActiveRecord::Migration[5.1] def up change_column :feeds, :url, :text end diff --git a/db/migrate/20130504022615_change_story_permalink_column.rb b/db/migrate/20130504022615_change_story_permalink_column.rb index 69297bc9e..59d21fb55 100644 --- a/db/migrate/20130504022615_change_story_permalink_column.rb +++ b/db/migrate/20130504022615_change_story_permalink_column.rb @@ -1,4 +1,4 @@ -class ChangeStoryPermalinkColumn < ActiveRecord::Migration +class ChangeStoryPermalinkColumn < ActiveRecord::Migration[5.1] def up change_column :stories, :permalink, :text end diff --git a/db/migrate/20130509131045_add_unique_constraints.rb b/db/migrate/20130509131045_add_unique_constraints.rb index fad3d9f2a..db0e3a7de 100644 --- a/db/migrate/20130509131045_add_unique_constraints.rb +++ b/db/migrate/20130509131045_add_unique_constraints.rb @@ -1,4 +1,4 @@ -class AddUniqueConstraints < ActiveRecord::Migration +class AddUniqueConstraints < ActiveRecord::Migration[5.1] def change add_index :stories, [:permalink, :feed_id], unique: true add_index :feeds, :url, unique: true diff --git a/db/migrate/20130513025939_add_keep_unread_to_stories.rb b/db/migrate/20130513025939_add_keep_unread_to_stories.rb index b3311f32c..4244512ff 100644 --- a/db/migrate/20130513025939_add_keep_unread_to_stories.rb +++ b/db/migrate/20130513025939_add_keep_unread_to_stories.rb @@ -1,4 +1,4 @@ -class AddKeepUnreadToStories < ActiveRecord::Migration +class AddKeepUnreadToStories < ActiveRecord::Migration[5.1] def change add_column :stories, :keep_unread, :boolean, default: false end diff --git a/db/migrate/20130513044029_add_is_starred_status_for_stories.rb b/db/migrate/20130513044029_add_is_starred_status_for_stories.rb index 63423ab31..777d44602 100644 --- a/db/migrate/20130513044029_add_is_starred_status_for_stories.rb +++ b/db/migrate/20130513044029_add_is_starred_status_for_stories.rb @@ -1,4 +1,4 @@ -class AddIsStarredStatusForStories < ActiveRecord::Migration +class AddIsStarredStatusForStories < ActiveRecord::Migration[5.1] def change add_column :stories, :is_starred, :boolean, default: false end diff --git a/db/migrate/20130522014405_add_api_key_to_user.rb b/db/migrate/20130522014405_add_api_key_to_user.rb index b76d63c02..a40f73a5d 100644 --- a/db/migrate/20130522014405_add_api_key_to_user.rb +++ b/db/migrate/20130522014405_add_api_key_to_user.rb @@ -1,4 +1,4 @@ -class AddApiKeyToUser < ActiveRecord::Migration +class AddApiKeyToUser < ActiveRecord::Migration[5.1] def change add_column :users, :api_key, :string end diff --git a/db/migrate/20130730120312_add_entry_id_to_stories.rb b/db/migrate/20130730120312_add_entry_id_to_stories.rb index 447e06ca1..af5e77ca5 100644 --- a/db/migrate/20130730120312_add_entry_id_to_stories.rb +++ b/db/migrate/20130730120312_add_entry_id_to_stories.rb @@ -1,4 +1,4 @@ -class AddEntryIdToStories < ActiveRecord::Migration +class AddEntryIdToStories < ActiveRecord::Migration[5.1] def change add_column :stories, :entry_id, :string end diff --git a/db/migrate/20130805113712_update_stories_unique_constraints.rb b/db/migrate/20130805113712_update_stories_unique_constraints.rb index 0cb354727..d20dce176 100644 --- a/db/migrate/20130805113712_update_stories_unique_constraints.rb +++ b/db/migrate/20130805113712_update_stories_unique_constraints.rb @@ -1,4 +1,4 @@ -class UpdateStoriesUniqueConstraints < ActiveRecord::Migration +class UpdateStoriesUniqueConstraints < ActiveRecord::Migration[5.1] def up remove_index :stories, [:permalink, :feed_id] add_index :stories, [:entry_id, :feed_id], unique: true, length: { permalink: 767 } diff --git a/db/migrate/20130821020313_update_nil_entry_ids.rb b/db/migrate/20130821020313_update_nil_entry_ids.rb index 57739f60d..b8441f4e1 100644 --- a/db/migrate/20130821020313_update_nil_entry_ids.rb +++ b/db/migrate/20130821020313_update_nil_entry_ids.rb @@ -1,4 +1,4 @@ -class UpdateNilEntryIds < ActiveRecord::Migration +class UpdateNilEntryIds < ActiveRecord::Migration[5.1] def up Story.where(entry_id: nil).each do |story| story.entry_id = story.permalink || story.id diff --git a/db/migrate/20130905204142_use_text_datatype_for_title_and_entry_id.rb b/db/migrate/20130905204142_use_text_datatype_for_title_and_entry_id.rb index a08210f18..bb2e217de 100644 --- a/db/migrate/20130905204142_use_text_datatype_for_title_and_entry_id.rb +++ b/db/migrate/20130905204142_use_text_datatype_for_title_and_entry_id.rb @@ -1,4 +1,4 @@ -class UseTextDatatypeForTitleAndEntryId < ActiveRecord::Migration +class UseTextDatatypeForTitleAndEntryId < ActiveRecord::Migration[5.1] def up change_column :stories, :title, :text change_column :stories, :entry_id, :text diff --git a/db/migrate/20140413100725_add_groups_table_and_foreign_keys_to_feeds.rb b/db/migrate/20140413100725_add_groups_table_and_foreign_keys_to_feeds.rb index 1ff359975..f23d2c007 100644 --- a/db/migrate/20140413100725_add_groups_table_and_foreign_keys_to_feeds.rb +++ b/db/migrate/20140413100725_add_groups_table_and_foreign_keys_to_feeds.rb @@ -1,4 +1,4 @@ -class AddGroupsTableAndForeignKeysToFeeds < ActiveRecord::Migration +class AddGroupsTableAndForeignKeysToFeeds < ActiveRecord::Migration[5.1] def up create_table :groups do |t| t.string :name, null: false diff --git a/db/migrate/20140421224454_fix_invalid_unicode.rb b/db/migrate/20140421224454_fix_invalid_unicode.rb index d9200cd6c..01ee2822b 100644 --- a/db/migrate/20140421224454_fix_invalid_unicode.rb +++ b/db/migrate/20140421224454_fix_invalid_unicode.rb @@ -1,4 +1,4 @@ -class FixInvalidUnicode < ActiveRecord::Migration +class FixInvalidUnicode < ActiveRecord::Migration[5.1] def up Story.find_each do |story| valid_body = story.body.delete("\u2028").delete("\u2029") diff --git a/db/migrate/20141102103617_fix_invalid_titles_with_unicode_line_endings.rb b/db/migrate/20141102103617_fix_invalid_titles_with_unicode_line_endings.rb index 4202b0bc8..ed912fce8 100644 --- a/db/migrate/20141102103617_fix_invalid_titles_with_unicode_line_endings.rb +++ b/db/migrate/20141102103617_fix_invalid_titles_with_unicode_line_endings.rb @@ -1,4 +1,4 @@ -class FixInvalidTitlesWithUnicodeLineEndings < ActiveRecord::Migration +class FixInvalidTitlesWithUnicodeLineEndings < ActiveRecord::Migration[5.1] def up Story.find_each do |story| unless story.title.nil? diff --git a/db/schema.rb b/db/schema.rb index 3f7ef303d..9bbabcbc3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,67 +10,62 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20141102103617) do +ActiveRecord::Schema.define(version: 2014_11_02_103617) do - # These are extensions that must be enabled in order to support this database - enable_extension "plpgsql" - - create_table "delayed_jobs", force: true do |t| - t.integer "priority", default: 0 - t.integer "attempts", default: 0 - t.text "handler" - t.text "last_error" + create_table "delayed_jobs", force: :cascade do |t| + t.integer "priority", default: 0 + t.integer "attempts", default: 0 + t.text "handler" + t.text "last_error" t.datetime "run_at" t.datetime "locked_at" t.datetime "failed_at" - t.string "locked_by" - t.string "queue" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.string "locked_by" + t.string "queue" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["priority", "run_at"], name: "delayed_jobs_priority" end - add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree - - create_table "feeds", force: true do |t| - t.string "name" - t.text "url" + create_table "feeds", force: :cascade do |t| + t.string "name" + t.text "url" t.datetime "last_fetched" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.integer "status" - t.integer "group_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "status" + t.integer "group_id" + t.index ["url"], name: "index_feeds_on_url", unique: true end - add_index "feeds", ["url"], name: "index_feeds_on_url", unique: true, using: :btree - - create_table "groups", force: true do |t| - t.string "name", null: false + create_table "groups", force: :cascade do |t| + t.string "name", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false end - create_table "stories", force: true do |t| - t.text "title" - t.text "permalink" - t.text "body" - t.integer "feed_id" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + create_table "stories", force: :cascade do |t| + t.text "title" + t.text "permalink" + t.text "body" + t.integer "feed_id" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.datetime "published" - t.boolean "is_read" - t.boolean "keep_unread", default: false - t.boolean "is_starred", default: false - t.text "entry_id" + t.boolean "is_read" + t.boolean "keep_unread", default: false + t.boolean "is_starred", default: false + t.text "entry_id" + t.index ["entry_id", "feed_id"], name: "index_stories_on_entry_id_and_feed_id", unique: true + t.index ["feed_id"], name: "index_stories_on_feed_id" end - add_index "stories", ["entry_id", "feed_id"], name: "index_stories_on_entry_id_and_feed_id", unique: true, using: :btree - - create_table "users", force: true do |t| - t.string "password_digest" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "setup_complete" - t.string "api_key" + create_table "users", force: :cascade do |t| + t.string "password_digest" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.boolean "setup_complete" + t.string "api_key" end end From e6406cfde6df4f7f952177aea1bac6f6a579c74c Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 24 Jul 2018 13:29:45 -0600 Subject: [PATCH 31/90] update to latest versions of dependencies --- Gemfile | 18 +++++++++--------- Gemfile.lock | 40 ++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Gemfile b/Gemfile index 38bb7bc3a..7bea436cc 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" group :production do gem "pg", "~> 1.0.0" - gem "puma", "~> 3.11.3" + gem "puma", "~> 3.12.0" end group :development do @@ -11,12 +11,12 @@ group :development do end group :development, :test do - gem "capybara", "~> 3.2.1" - gem "faker", "~> 1.6" - gem "rack-test", "~> 1.0.0" + gem "capybara", "~> 3.4.1" + gem "faker", "~> 1.9.1" + gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.4" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.38", require: false + gem "rubocop", "~> 0.58.2", require: false gem "timecop", "~> 0.9.0" end @@ -30,21 +30,21 @@ gem "feedjira", "~> 2.1.3" gem "i18n" gem "loofah", "~> 2.0" -gem "nokogiri", "~> 1.6" +gem "nokogiri", "~> 1.8.4" gem "rack-protection", "~> 2.0.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" gem "rake", "~> 12.3.0" -gem "sass" +gem "sass", "~> 3.5.7" gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" gem "sinatra-contrib", "~> 2.0.0" gem "sinatra-flash", "~> 0.3.0" -gem "sprockets", "~> 3.0" +gem "sprockets", "~> 3.7.2" gem "sprockets-helpers" gem "thread", "~> 0.2.2" -gem "uglifier" +gem "uglifier", "~> 4.1.16" gem "will_paginate", "~> 3.1.0" diff --git a/Gemfile.lock b/Gemfile.lock index d1a0a7899..8f1e6a7d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,7 @@ GEM ast (2.4.0) backports (3.11.3) bcrypt (3.1.12) - capybara (3.2.1) + capybara (3.4.1) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -34,7 +34,7 @@ GEM delayed_job (>= 3.0, < 5) diff-lcs (1.3) execjs (2.7.0) - faker (1.8.7) + faker (1.9.1) i18n (>= 0.7) faraday (0.15.2) multipart-post (>= 1.2, < 3) @@ -61,22 +61,22 @@ GEM multi_json (1.13.1) multipart-post (2.0.0) mustermann (1.0.2) - nokogiri (1.8.2) + nokogiri (1.8.4) mini_portile2 (~> 2.3.0) open_uri_redirections (0.2.1) parallel (1.12.1) - parser (2.5.1.0) + parser (2.5.1.2) ast (~> 2.4.0) pg (1.0.0) powerpack (0.1.2) public_suffix (3.0.2) - puma (3.11.4) + puma (3.12.0) rack (2.0.5) rack-protection (2.0.3) rack rack-ssl (1.4.1) rack - rack-test (1.0.0) + rack-test (1.1.0) rack (>= 1.0, < 3) racksh (1.0.0) rack (>= 1.0) @@ -102,16 +102,16 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.7.0) rspec-support (3.7.1) - rubocop (0.57.2) + rubocop (0.58.2) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5) + parser (>= 2.5, != 2.5.1.1) powerpack (~> 0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.9.0) - sass (3.5.6) + sass (3.5.7) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) @@ -135,7 +135,7 @@ GEM tilt (>= 1.3, < 3) sinatra-flash (0.3.0) sinatra (>= 1.0.0) - sprockets (3.7.1) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-helpers (1.2.1) @@ -147,7 +147,7 @@ GEM timecop (0.9.1) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.11) + uglifier (4.1.16) execjs (>= 0.3.0, < 3) unicode-display_width (1.4.0) will_paginate (3.1.6) @@ -160,36 +160,36 @@ PLATFORMS DEPENDENCIES activerecord (~> 5.2.0) bcrypt (~> 3.1) - capybara (~> 3.2.1) + capybara (~> 3.4.1) delayed_job (~> 4.1) delayed_job_active_record (~> 4.1) - faker (~> 1.6) + faker (~> 1.9.1) feedbag (~> 0.9.5) feedjira (~> 2.1.3) i18n loofah (~> 2.0) - nokogiri (~> 1.6) + nokogiri (~> 1.8.4) pg (~> 1.0.0) - puma (~> 3.11.3) + puma (~> 3.12.0) rack-protection (~> 2.0.0) rack-ssl (~> 1.4) - rack-test (~> 1.0.0) + rack-test (~> 1.1.0) racksh (~> 1.0) rake (~> 12.3.0) rspec (~> 3.4) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.38) - sass + rubocop (~> 0.58.2) + sass (~> 3.5.7) sinatra (~> 2.0.0) sinatra-activerecord (~> 2.0) sinatra-contrib (~> 2.0.0) sinatra-flash (~> 0.3.0) - sprockets (~> 3.0) + sprockets (~> 3.7.2) sprockets-helpers sqlite3 (~> 1.3, >= 1.3.8) thread (~> 0.2.2) timecop (~> 0.9.0) - uglifier + uglifier (~> 4.1.16) will_paginate (~> 3.1.0) RUBY VERSION From d8a5cab6912deda170e1cfed7ac803d3cdfdfac1 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 24 Jul 2018 13:35:55 -0600 Subject: [PATCH 32/90] Update to sassc --- Gemfile | 2 +- Gemfile.lock | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 7bea436cc..d7a9fcf3e 100644 --- a/Gemfile +++ b/Gemfile @@ -36,7 +36,7 @@ gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" gem "rake", "~> 12.3.0" -gem "sass", "~> 3.5.7" +gem "sassc", "~> 1.12.1" gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index 8f1e6a7d9..f817cac90 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -116,6 +116,9 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) + sassc (1.12.1) + ffi (~> 1.9.6) + sass (>= 3.3.0) sax-machine (1.3.2) sinatra (2.0.3) mustermann (~> 1.0) @@ -179,7 +182,7 @@ DEPENDENCIES rspec (~> 3.4) rspec-html-matchers (~> 0.9.1) rubocop (~> 0.58.2) - sass (~> 3.5.7) + sassc (~> 1.12.1) sinatra (~> 2.0.0) sinatra-activerecord (~> 2.0) sinatra-contrib (~> 2.0.0) From 12e17f0d2043ccbefeab4f912e8e18fbb1ab3325 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 24 Aug 2018 21:54:45 -0600 Subject: [PATCH 33/90] Update dependencies --- Gemfile | 4 ++-- Gemfile.lock | 56 ++++++++++++++++++++++++++-------------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Gemfile b/Gemfile index d7a9fcf3e..7f62592cd 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ ruby "2.5.1" source "https://rubygems.org" group :production do - gem "pg", "~> 1.0.0" + gem "pg", "~> 1.1.0" gem "puma", "~> 3.12.0" end @@ -11,7 +11,7 @@ group :development do end group :development, :test do - gem "capybara", "~> 3.4.1" + gem "capybara", "~> 3.6.0" gem "faker", "~> 1.9.1" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.4" diff --git a/Gemfile.lock b/Gemfile.lock index f817cac90..2c8170a0d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,13 @@ GEM remote: https://rubygems.org/ specs: - activemodel (5.2.0) - activesupport (= 5.2.0) - activerecord (5.2.0) - activemodel (= 5.2.0) - activesupport (= 5.2.0) + activemodel (5.2.1) + activesupport (= 5.2.1) + activerecord (5.2.1) + activemodel (= 5.2.1) + activesupport (= 5.2.1) arel (>= 9.0) - activesupport (5.2.0) + activesupport (5.2.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -18,7 +18,7 @@ GEM ast (2.4.0) backports (3.11.3) bcrypt (3.1.12) - capybara (3.4.1) + capybara (3.6.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -49,27 +49,27 @@ GEM loofah (>= 2.0) sax-machine (>= 1.0) ffi (1.9.25) - i18n (1.0.1) + i18n (1.1.0) concurrent-ruby (~> 1.0) jaro_winkler (1.5.1) loofah (2.2.2) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mini_mime (1.0.0) + mini_mime (1.0.1) mini_portile2 (2.3.0) minitest (5.11.3) multi_json (1.13.1) multipart-post (2.0.0) - mustermann (1.0.2) + mustermann (1.0.3) nokogiri (1.8.4) mini_portile2 (~> 2.3.0) open_uri_redirections (0.2.1) parallel (1.12.1) parser (2.5.1.2) ast (~> 2.4.0) - pg (1.0.0) + pg (1.1.0) powerpack (0.1.2) - public_suffix (3.0.2) + public_suffix (3.0.3) puma (3.12.0) rack (2.0.5) rack-protection (2.0.3) @@ -86,22 +86,22 @@ GEM rb-fsevent (0.10.3) rb-inotify (0.9.10) ffi (>= 0.5.0, < 2) - 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.8.0) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-core (3.8.0) + rspec-support (~> 3.8.0) + rspec-expectations (3.8.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) + rspec-support (~> 3.8.0) rspec-html-matchers (0.9.1) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.7.0) + rspec-mocks (3.8.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.1) + rspec-support (~> 3.8.0) + rspec-support (3.8.0) rubocop (0.58.2) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -110,7 +110,7 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - ruby-progressbar (1.9.0) + ruby-progressbar (1.10.0) sass (3.5.7) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -150,7 +150,7 @@ GEM timecop (0.9.1) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.16) + uglifier (4.1.18) execjs (>= 0.3.0, < 3) unicode-display_width (1.4.0) will_paginate (3.1.6) @@ -163,7 +163,7 @@ PLATFORMS DEPENDENCIES activerecord (~> 5.2.0) bcrypt (~> 3.1) - capybara (~> 3.4.1) + capybara (~> 3.6.0) delayed_job (~> 4.1) delayed_job_active_record (~> 4.1) faker (~> 1.9.1) @@ -172,7 +172,7 @@ DEPENDENCIES i18n loofah (~> 2.0) nokogiri (~> 1.8.4) - pg (~> 1.0.0) + pg (~> 1.1.0) puma (~> 3.12.0) rack-protection (~> 2.0.0) rack-ssl (~> 1.4) @@ -199,4 +199,4 @@ RUBY VERSION ruby 2.5.1p57 BUNDLED WITH - 1.16.2 + 1.16.4 From 83efa3dbfd580d40e4a72d16e5acce3ac273b8ec Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 27 Sep 2018 13:03:44 -0600 Subject: [PATCH 34/90] updated dependencies --- Gemfile | 8 ++++---- Gemfile.lock | 46 +++++++++++++++++++--------------------------- 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/Gemfile b/Gemfile index 7f62592cd..b7e0ba881 100644 --- a/Gemfile +++ b/Gemfile @@ -11,12 +11,12 @@ group :development do end group :development, :test do - gem "capybara", "~> 3.6.0" + gem "capybara", "~> 3.8.2" gem "faker", "~> 1.9.1" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.4" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.58.2", require: false + gem "rubocop", "~> 0.59.2", require: false gem "timecop", "~> 0.9.0" end @@ -26,7 +26,7 @@ gem "delayed_job", "~> 4.1" gem "delayed_job_active_record", "~> 4.1" gem "feedbag", "~> 0.9.5" -gem "feedjira", "~> 2.1.3" +gem "feedjira", "~> 2.2.0" gem "i18n" gem "loofah", "~> 2.0" @@ -36,7 +36,7 @@ gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" gem "rake", "~> 12.3.0" -gem "sassc", "~> 1.12.1" +gem "sassc", "~> 2.0.0" gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index 2c8170a0d..3977952c5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,9 +16,9 @@ GEM public_suffix (>= 2.0.2, < 4.0) arel (9.0.0) ast (2.4.0) - backports (3.11.3) + backports (3.11.4) bcrypt (3.1.12) - capybara (3.6.0) + capybara (3.8.2) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -36,14 +36,14 @@ GEM execjs (2.7.0) faker (1.9.1) i18n (>= 0.7) - faraday (0.15.2) + faraday (0.15.3) multipart-post (>= 1.2, < 3) faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) feedbag (0.9.8) nokogiri (~> 1.0) open_uri_redirections (~> 0.2) - feedjira (2.1.4) + feedjira (2.2.0) faraday (>= 0.9) faraday_middleware (>= 0.9) loofah (>= 2.0) @@ -67,12 +67,12 @@ GEM parallel (1.12.1) parser (2.5.1.2) ast (~> 2.4.0) - pg (1.1.0) + pg (1.1.3) powerpack (0.1.2) public_suffix (3.0.3) puma (3.12.0) rack (2.0.5) - rack-protection (2.0.3) + rack-protection (2.0.4) rack rack-ssl (1.4.1) rack @@ -83,9 +83,6 @@ GEM rack-test (>= 0.5) rainbow (3.0.0) rake (12.3.1) - rb-fsevent (0.10.3) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) @@ -102,7 +99,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.58.2) + rubocop (0.59.2) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.5, != 2.5.1.1) @@ -111,30 +108,25 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.10.0) - sass (3.5.7) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sassc (1.12.1) + sassc (2.0.0) ffi (~> 1.9.6) - sass (>= 3.3.0) + rake sax-machine (1.3.2) - sinatra (2.0.3) + sinatra (2.0.4) mustermann (~> 1.0) rack (~> 2.0) - rack-protection (= 2.0.3) + rack-protection (= 2.0.4) tilt (~> 2.0) sinatra-activerecord (2.0.13) activerecord (>= 3.2) sinatra (>= 1.0) - sinatra-contrib (2.0.3) + sinatra-contrib (2.0.4) activesupport (>= 4.0.0) backports (>= 2.8.2) multi_json mustermann (~> 1.0) - rack-protection (= 2.0.3) - sinatra (= 2.0.3) + rack-protection (= 2.0.4) + sinatra (= 2.0.4) tilt (>= 1.3, < 3) sinatra-flash (0.3.0) sinatra (>= 1.0.0) @@ -150,7 +142,7 @@ GEM timecop (0.9.1) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.18) + uglifier (4.1.19) execjs (>= 0.3.0, < 3) unicode-display_width (1.4.0) will_paginate (3.1.6) @@ -163,12 +155,12 @@ PLATFORMS DEPENDENCIES activerecord (~> 5.2.0) bcrypt (~> 3.1) - capybara (~> 3.6.0) + capybara (~> 3.8.2) delayed_job (~> 4.1) delayed_job_active_record (~> 4.1) faker (~> 1.9.1) feedbag (~> 0.9.5) - feedjira (~> 2.1.3) + feedjira (~> 2.2.0) i18n loofah (~> 2.0) nokogiri (~> 1.8.4) @@ -181,8 +173,8 @@ DEPENDENCIES rake (~> 12.3.0) rspec (~> 3.4) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.58.2) - sassc (~> 1.12.1) + rubocop (~> 0.59.2) + sassc (~> 2.0.0) sinatra (~> 2.0.0) sinatra-activerecord (~> 2.0) sinatra-contrib (~> 2.0.0) From b3031f59cf3323a745faf9b5e14b91ccf6c434c3 Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 27 Sep 2018 13:30:13 -0600 Subject: [PATCH 35/90] add sass back --- Gemfile | 1 + Gemfile.lock | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/Gemfile b/Gemfile index b7e0ba881..2cb8959d7 100644 --- a/Gemfile +++ b/Gemfile @@ -36,6 +36,7 @@ gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" gem "rake", "~> 12.3.0" +gem "sass" gem "sassc", "~> 2.0.0" gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index 3977952c5..d84d0d628 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,6 +83,9 @@ GEM rack-test (>= 0.5) rainbow (3.0.0) rake (12.3.1) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) @@ -108,6 +111,11 @@ GEM ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) ruby-progressbar (1.10.0) + sass (3.6.0) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) sassc (2.0.0) ffi (~> 1.9.6) rake @@ -174,6 +182,7 @@ DEPENDENCIES rspec (~> 3.4) rspec-html-matchers (~> 0.9.1) rubocop (~> 0.59.2) + sass sassc (~> 2.0.0) sinatra (~> 2.0.0) sinatra-activerecord (~> 2.0) From bcbb84726d1b934a23941157667d872b9ebc453a Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 27 Sep 2018 13:34:28 -0600 Subject: [PATCH 36/90] add sassc-rails --- Gemfile | 3 +-- Gemfile.lock | 46 ++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 2cb8959d7..0828d07cf 100644 --- a/Gemfile +++ b/Gemfile @@ -36,8 +36,7 @@ gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" gem "rake", "~> 12.3.0" -gem "sass" -gem "sassc", "~> 2.0.0" +gem "sassc-rails", "~> 1.3.0" gem "sinatra", "~> 2.0.0" gem "sinatra-activerecord", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index d84d0d628..b120f9a98 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,19 @@ GEM remote: https://rubygems.org/ specs: + actionpack (5.2.1) + actionview (= 5.2.1) + activesupport (= 5.2.1) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.2.1) + activesupport (= 5.2.1) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) activemodel (5.2.1) activesupport (= 5.2.1) activerecord (5.2.1) @@ -18,6 +31,7 @@ GEM ast (2.4.0) backports (3.11.4) bcrypt (3.1.12) + builder (3.2.3) capybara (3.8.2) addressable mini_mime (>= 0.1.3) @@ -33,6 +47,7 @@ GEM activerecord (>= 3.0, < 5.3) delayed_job (>= 3.0, < 5) diff-lcs (1.3) + erubi (1.7.1) execjs (2.7.0) faker (1.9.1) i18n (>= 0.7) @@ -55,6 +70,7 @@ GEM loofah (2.2.2) crass (~> 1.0.2) nokogiri (>= 1.5.9) + method_source (0.9.0) mini_mime (1.0.1) mini_portile2 (2.3.0) minitest (5.11.3) @@ -81,6 +97,17 @@ GEM racksh (1.0.0) rack (>= 1.0) rack-test (>= 0.5) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.0.4) + loofah (~> 2.2, >= 2.2.2) + railties (5.2.1) + actionpack (= 5.2.1) + activesupport (= 5.2.1) + method_source + rake (>= 0.8.7) + thor (>= 0.19.0, < 2.0) rainbow (3.0.0) rake (12.3.1) rb-fsevent (0.10.3) @@ -116,9 +143,16 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sassc (2.0.0) + sassc (1.12.1) ffi (~> 1.9.6) - rake + sass (>= 3.3.0) + sassc-rails (1.3.0) + railties (>= 4.0.0) + sass + sassc (~> 1.9) + sprockets (> 2.11) + sprockets-rails + tilt sax-machine (1.3.2) sinatra (2.0.4) mustermann (~> 1.0) @@ -143,7 +177,12 @@ GEM rack (> 1, < 3) sprockets-helpers (1.2.1) sprockets (>= 2.2) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) sqlite3 (1.3.13) + thor (0.20.0) thread (0.2.2) thread_safe (0.3.6) tilt (2.0.8) @@ -182,8 +221,7 @@ DEPENDENCIES rspec (~> 3.4) rspec-html-matchers (~> 0.9.1) rubocop (~> 0.59.2) - sass - sassc (~> 2.0.0) + sassc-rails (~> 1.3.0) sinatra (~> 2.0.0) sinatra-activerecord (~> 2.0) sinatra-contrib (~> 2.0.0) From ffbde4351321d27e3e7120760e94f16a1bc24486 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 8 Feb 2019 00:39:24 -0700 Subject: [PATCH 37/90] Update ruby and dependencies --- .ruby-version | 2 +- Gemfile | 34 +++++------ Gemfile.lock | 156 ++++++++++++++++++++++++-------------------------- 3 files changed, 92 insertions(+), 100 deletions(-) diff --git a/.ruby-version b/.ruby-version index 6bf7c6fa4..12d9bd053 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.5.1 +ruby-2.6.1 diff --git a/Gemfile b/Gemfile index 0828d07cf..168485caa 100644 --- a/Gemfile +++ b/Gemfile @@ -1,50 +1,50 @@ -ruby "2.5.1" +ruby "2.6.1" source "https://rubygems.org" group :production do - gem "pg", "~> 1.1.0" + gem "pg", "~> 1.1.4" gem "puma", "~> 3.12.0" end group :development do - gem "sqlite3", "~> 1.3", ">= 1.3.8" + gem "sqlite3", "~> 1.3.6" # 1.4 doesn't work with rails 5.2.2 stuffs end group :development, :test do - gem "capybara", "~> 3.8.2" + gem "capybara", "~> 3.13.2" gem "faker", "~> 1.9.1" gem "rack-test", "~> 1.1.0" - gem "rspec", "~> 3.4" + gem "rspec", "~> 3.8.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.59.2", require: false + gem "rubocop", "~> 0.63.1", require: false gem "timecop", "~> 0.9.0" end -gem "activerecord", "~> 5.2.0" +gem "activerecord", "~> 5.2.2" gem "bcrypt", "~> 3.1" gem "delayed_job", "~> 4.1" gem "delayed_job_active_record", "~> 4.1" -gem "feedbag", "~> 0.9.5" +gem "feedbag", "~> 0.10" gem "feedjira", "~> 2.2.0" -gem "i18n" -gem "loofah", "~> 2.0" +gem "i18n", "~> 1.5.3" +gem "loofah", "~> 2.2.3" -gem "nokogiri", "~> 1.8.4" -gem "rack-protection", "~> 2.0.0" +gem "nokogiri", "~> 1.10.1" +gem "rack-protection", "~> 2.0.5" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" -gem "rake", "~> 12.3.0" -gem "sassc-rails", "~> 1.3.0" -gem "sinatra", "~> 2.0.0" +gem "rake", "~> 12.3.2" +gem "sassc-rails", "~> 2.1.0" +gem "sinatra", "~> 2.0.5" gem "sinatra-activerecord", "~> 2.0" -gem "sinatra-contrib", "~> 2.0.0" +gem "sinatra-contrib", "~> 2.0.5" gem "sinatra-flash", "~> 0.3.0" gem "sprockets", "~> 3.7.2" gem "sprockets-helpers" gem "thread", "~> 0.2.2" -gem "uglifier", "~> 4.1.16" +gem "uglifier", "~> 4.1.20" gem "will_paginate", "~> 3.1.0" diff --git a/Gemfile.lock b/Gemfile.lock index b120f9a98..b583f0754 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,45 +1,46 @@ GEM remote: https://rubygems.org/ specs: - actionpack (5.2.1) - actionview (= 5.2.1) - activesupport (= 5.2.1) + actionpack (5.2.2) + actionview (= 5.2.2) + activesupport (= 5.2.2) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.1) - activesupport (= 5.2.1) + actionview (5.2.2) + activesupport (= 5.2.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activemodel (5.2.1) - activesupport (= 5.2.1) - activerecord (5.2.1) - activemodel (= 5.2.1) - activesupport (= 5.2.1) + activemodel (5.2.2) + activesupport (= 5.2.2) + activerecord (5.2.2) + activemodel (= 5.2.2) + activesupport (= 5.2.2) arel (>= 9.0) - activesupport (5.2.1) + activesupport (5.2.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.2) + addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) arel (9.0.0) ast (2.4.0) backports (3.11.4) bcrypt (3.1.12) builder (3.2.3) - capybara (3.8.2) + capybara (3.13.2) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - xpath (~> 3.1) - concurrent-ruby (1.0.5) + regexp_parser (~> 1.2) + xpath (~> 3.2) + concurrent-ruby (1.1.4) crass (1.0.4) delayed_job (4.1.5) activesupport (>= 3.0, < 5.3) @@ -47,16 +48,16 @@ GEM activerecord (>= 3.0, < 5.3) delayed_job (>= 3.0, < 5) diff-lcs (1.3) - erubi (1.7.1) + erubi (1.8.0) execjs (2.7.0) faker (1.9.1) i18n (>= 0.7) - faraday (0.15.3) + faraday (0.15.4) multipart-post (>= 1.2, < 3) - faraday_middleware (0.12.2) + faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) - feedbag (0.9.8) - nokogiri (~> 1.0) + feedbag (0.10) + nokogiri (~> 1.8, >= 1.8.2) open_uri_redirections (~> 0.2) feedjira (2.2.0) faraday (>= 0.9) @@ -64,31 +65,31 @@ GEM loofah (>= 2.0) sax-machine (>= 1.0) ffi (1.9.25) - i18n (1.1.0) + i18n (1.5.3) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.1) - loofah (2.2.2) + jaro_winkler (1.5.2) + loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) - method_source (0.9.0) + method_source (0.9.2) mini_mime (1.0.1) - mini_portile2 (2.3.0) + mini_portile2 (2.4.0) minitest (5.11.3) multi_json (1.13.1) multipart-post (2.0.0) mustermann (1.0.3) - nokogiri (1.8.4) - mini_portile2 (~> 2.3.0) + nokogiri (1.10.1) + mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) - parallel (1.12.1) - parser (2.5.1.2) + parallel (1.13.0) + parser (2.6.0.0) ast (~> 2.4.0) - pg (1.1.3) + pg (1.1.4) powerpack (0.1.2) public_suffix (3.0.3) puma (3.12.0) - rack (2.0.5) - rack-protection (2.0.4) + rack (2.0.6) + rack-protection (2.0.5) rack rack-ssl (1.4.1) rack @@ -102,24 +103,22 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) - railties (5.2.1) - actionpack (= 5.2.1) - activesupport (= 5.2.1) + railties (5.2.2) + actionpack (= 5.2.2) + activesupport (= 5.2.2) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) rainbow (3.0.0) - rake (12.3.1) - rb-fsevent (0.10.3) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) + rake (12.3.2) + regexp_parser (1.3.0) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) rspec-mocks (~> 3.8.0) rspec-core (3.8.0) rspec-support (~> 3.8.0) - rspec-expectations (3.8.1) + rspec-expectations (3.8.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-html-matchers (0.9.1) @@ -129,46 +128,39 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.59.2) + rubocop (0.63.1) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.5, != 2.5.1.1) powerpack (~> 0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.0, >= 1.0.1) + unicode-display_width (~> 1.4.0) ruby-progressbar (1.10.0) - sass (3.6.0) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sassc (1.12.1) + sassc (2.0.0) ffi (~> 1.9.6) - sass (>= 3.3.0) - sassc-rails (1.3.0) + rake + sassc-rails (2.1.0) railties (>= 4.0.0) - sass - sassc (~> 1.9) - sprockets (> 2.11) + sassc (>= 2.0) + sprockets (> 3.0) sprockets-rails tilt sax-machine (1.3.2) - sinatra (2.0.4) + sinatra (2.0.5) mustermann (~> 1.0) rack (~> 2.0) - rack-protection (= 2.0.4) + rack-protection (= 2.0.5) tilt (~> 2.0) sinatra-activerecord (2.0.13) activerecord (>= 3.2) sinatra (>= 1.0) - sinatra-contrib (2.0.4) - activesupport (>= 4.0.0) + sinatra-contrib (2.0.5) backports (>= 2.8.2) multi_json mustermann (~> 1.0) - rack-protection (= 2.0.4) - sinatra (= 2.0.4) + rack-protection (= 2.0.5) + sinatra (= 2.0.5) tilt (>= 1.3, < 3) sinatra-flash (0.3.0) sinatra (>= 1.0.0) @@ -182,60 +174,60 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.13) - thor (0.20.0) + thor (0.20.3) thread (0.2.2) thread_safe (0.3.6) - tilt (2.0.8) + tilt (2.0.9) timecop (0.9.1) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.19) + uglifier (4.1.20) execjs (>= 0.3.0, < 3) - unicode-display_width (1.4.0) + unicode-display_width (1.4.1) will_paginate (3.1.6) - xpath (3.1.0) + xpath (3.2.0) nokogiri (~> 1.8) PLATFORMS ruby DEPENDENCIES - activerecord (~> 5.2.0) + activerecord (~> 5.2.2) bcrypt (~> 3.1) - capybara (~> 3.8.2) + capybara (~> 3.13.2) delayed_job (~> 4.1) delayed_job_active_record (~> 4.1) faker (~> 1.9.1) - feedbag (~> 0.9.5) + feedbag (~> 0.10) feedjira (~> 2.2.0) - i18n - loofah (~> 2.0) - nokogiri (~> 1.8.4) - pg (~> 1.1.0) + i18n (~> 1.5.3) + loofah (~> 2.2.3) + nokogiri (~> 1.10.1) + pg (~> 1.1.4) puma (~> 3.12.0) - rack-protection (~> 2.0.0) + rack-protection (~> 2.0.5) rack-ssl (~> 1.4) rack-test (~> 1.1.0) racksh (~> 1.0) - rake (~> 12.3.0) - rspec (~> 3.4) + rake (~> 12.3.2) + rspec (~> 3.8.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.59.2) - sassc-rails (~> 1.3.0) - sinatra (~> 2.0.0) + rubocop (~> 0.63.1) + sassc-rails (~> 2.1.0) + sinatra (~> 2.0.5) sinatra-activerecord (~> 2.0) - sinatra-contrib (~> 2.0.0) + sinatra-contrib (~> 2.0.5) sinatra-flash (~> 0.3.0) sprockets (~> 3.7.2) sprockets-helpers - sqlite3 (~> 1.3, >= 1.3.8) + sqlite3 (~> 1.3.6) thread (~> 0.2.2) timecop (~> 0.9.0) - uglifier (~> 4.1.16) + uglifier (~> 4.1.20) will_paginate (~> 3.1.0) RUBY VERSION - ruby 2.5.1p57 + ruby 2.6.1p33 BUNDLED WITH - 1.16.4 + 1.17.3 From d8425280638fb640841d0255cb5bceea6cdf57ac Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 21 Apr 2019 19:53:39 -0600 Subject: [PATCH 38/90] update ruby and gems --- .ruby-version | 2 +- Gemfile | 11 +++---- Gemfile.lock | 85 +++++++++++++++++++++++++-------------------------- 3 files changed, 48 insertions(+), 50 deletions(-) diff --git a/.ruby-version b/.ruby-version index 12d9bd053..4560fb912 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.6.1 +ruby-2.6.3 diff --git a/Gemfile b/Gemfile index 168485caa..af71be17b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "2.6.1" +ruby "2.6.3" source "https://rubygems.org" group :production do @@ -7,16 +7,16 @@ group :production do end group :development do - gem "sqlite3", "~> 1.3.6" # 1.4 doesn't work with rails 5.2.2 stuffs + gem "sqlite3", "~> 1.4.0" # 1.4 doesn't work with rails 5.2.2 stuffs end group :development, :test do - gem "capybara", "~> 3.13.2" + gem "capybara", "~> 3.17.0" gem "faker", "~> 1.9.1" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.8.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.63.1", require: false + gem "rubocop", "~> 0.67.2", require: false gem "timecop", "~> 0.9.0" end @@ -27,7 +27,7 @@ gem "delayed_job_active_record", "~> 4.1" gem "feedbag", "~> 0.10" gem "feedjira", "~> 2.2.0" -gem "i18n", "~> 1.5.3" +gem "i18n", "~> 1.6.0" gem "loofah", "~> 2.2.3" gem "nokogiri", "~> 1.10.1" @@ -35,7 +35,6 @@ gem "rack-protection", "~> 2.0.5" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" -gem "rake", "~> 12.3.2" gem "sassc-rails", "~> 2.1.0" gem "sinatra", "~> 2.0.5" gem "sinatra-activerecord", "~> 2.0" diff --git a/Gemfile.lock b/Gemfile.lock index b583f0754..a110f7a78 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,26 +1,26 @@ GEM remote: https://rubygems.org/ specs: - actionpack (5.2.2) - actionview (= 5.2.2) - activesupport (= 5.2.2) + actionpack (5.2.3) + actionview (= 5.2.3) + activesupport (= 5.2.3) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.2) - activesupport (= 5.2.2) + actionview (5.2.3) + activesupport (= 5.2.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activemodel (5.2.2) - activesupport (= 5.2.2) - activerecord (5.2.2) - activemodel (= 5.2.2) - activesupport (= 5.2.2) + activemodel (5.2.3) + activesupport (= 5.2.3) + activerecord (5.2.3) + activemodel (= 5.2.3) + activesupport (= 5.2.3) arel (>= 9.0) - activesupport (5.2.2) + activesupport (5.2.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -29,10 +29,10 @@ GEM public_suffix (>= 2.0.2, < 4.0) arel (9.0.0) ast (2.4.0) - backports (3.11.4) + backports (3.13.0) bcrypt (3.1.12) builder (3.2.3) - capybara (3.13.2) + capybara (3.17.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -40,7 +40,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.2) xpath (~> 3.2) - concurrent-ruby (1.1.4) + concurrent-ruby (1.1.5) crass (1.0.4) delayed_job (4.1.5) activesupport (>= 3.0, < 5.3) @@ -50,7 +50,7 @@ GEM diff-lcs (1.3) erubi (1.8.0) execjs (2.7.0) - faker (1.9.1) + faker (1.9.3) i18n (>= 0.7) faraday (0.15.4) multipart-post (>= 1.2, < 3) @@ -64,8 +64,8 @@ GEM faraday_middleware (>= 0.9) loofah (>= 2.0) sax-machine (>= 1.0) - ffi (1.9.25) - i18n (1.5.3) + ffi (1.10.0) + i18n (1.6.0) concurrent-ruby (~> 1.0) jaro_winkler (1.5.2) loofah (2.2.3) @@ -78,17 +78,17 @@ GEM multi_json (1.13.1) multipart-post (2.0.0) mustermann (1.0.3) - nokogiri (1.10.1) + nokogiri (1.10.2) mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) - parallel (1.13.0) - parser (2.6.0.0) + parallel (1.17.0) + parser (2.6.2.1) ast (~> 2.4.0) pg (1.1.4) - powerpack (0.1.2) + psych (3.1.0) public_suffix (3.0.3) - puma (3.12.0) - rack (2.0.6) + puma (3.12.1) + rack (2.0.7) rack-protection (2.0.5) rack rack-ssl (1.4.1) @@ -103,22 +103,22 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) - railties (5.2.2) - actionpack (= 5.2.2) - activesupport (= 5.2.2) + railties (5.2.3) + actionpack (= 5.2.3) + activesupport (= 5.2.3) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) rainbow (3.0.0) rake (12.3.2) - regexp_parser (1.3.0) + regexp_parser (1.4.0) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) rspec-mocks (~> 3.8.0) rspec-core (3.8.0) rspec-support (~> 3.8.0) - rspec-expectations (3.8.2) + rspec-expectations (3.8.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-html-matchers (0.9.1) @@ -128,17 +128,17 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.63.1) + rubocop (0.67.2) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.5, != 2.5.1.1) - powerpack (~> 0.1) + psych (>= 3.1.0) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.4.0) + unicode-display_width (>= 1.4.0, < 1.6) ruby-progressbar (1.10.0) - sassc (2.0.0) - ffi (~> 1.9.6) + sassc (2.0.1) + ffi (~> 1.9) rake sassc-rails (2.1.0) railties (>= 4.0.0) @@ -173,7 +173,7 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.13) + sqlite3 (1.4.0) thor (0.20.3) thread (0.2.2) thread_safe (0.3.6) @@ -183,8 +183,8 @@ GEM thread_safe (~> 0.1) uglifier (4.1.20) execjs (>= 0.3.0, < 3) - unicode-display_width (1.4.1) - will_paginate (3.1.6) + unicode-display_width (1.5.0) + will_paginate (3.1.7) xpath (3.2.0) nokogiri (~> 1.8) @@ -194,13 +194,13 @@ PLATFORMS DEPENDENCIES activerecord (~> 5.2.2) bcrypt (~> 3.1) - capybara (~> 3.13.2) + capybara (~> 3.17.0) delayed_job (~> 4.1) delayed_job_active_record (~> 4.1) faker (~> 1.9.1) feedbag (~> 0.10) feedjira (~> 2.2.0) - i18n (~> 1.5.3) + i18n (~> 1.6.0) loofah (~> 2.2.3) nokogiri (~> 1.10.1) pg (~> 1.1.4) @@ -209,10 +209,9 @@ DEPENDENCIES rack-ssl (~> 1.4) rack-test (~> 1.1.0) racksh (~> 1.0) - rake (~> 12.3.2) rspec (~> 3.8.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.63.1) + rubocop (~> 0.67.2) sassc-rails (~> 2.1.0) sinatra (~> 2.0.5) sinatra-activerecord (~> 2.0) @@ -220,14 +219,14 @@ DEPENDENCIES sinatra-flash (~> 0.3.0) sprockets (~> 3.7.2) sprockets-helpers - sqlite3 (~> 1.3.6) + sqlite3 (~> 1.4.0) thread (~> 0.2.2) timecop (~> 0.9.0) uglifier (~> 4.1.20) will_paginate (~> 3.1.0) RUBY VERSION - ruby 2.6.1p33 + ruby 2.6.3p62 BUNDLED WITH - 1.17.3 + 2.0.1 From b90e3b4d2ea756b3ca4b9bed9d00755b191f7cc4 Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 15 May 2019 22:25:43 -0600 Subject: [PATCH 39/90] update dependencies --- Gemfile | 4 ++-- Gemfile.lock | 31 +++++++++++++++---------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index af71be17b..846037fdf 100644 --- a/Gemfile +++ b/Gemfile @@ -11,12 +11,12 @@ group :development do end group :development, :test do - gem "capybara", "~> 3.17.0" + gem "capybara", "~> 3.20.0" gem "faker", "~> 1.9.1" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.8.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.67.2", require: false + gem "rubocop", "~> 0.69.0", require: false gem "timecop", "~> 0.9.0" end diff --git a/Gemfile.lock b/Gemfile.lock index a110f7a78..6afe8c0b3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,16 +29,17 @@ GEM public_suffix (>= 2.0.2, < 4.0) arel (9.0.0) ast (2.4.0) - backports (3.13.0) + backports (3.15.0) bcrypt (3.1.12) builder (3.2.3) - capybara (3.17.0) + capybara (3.20.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (~> 1.2) + uglifier xpath (~> 3.2) concurrent-ruby (1.1.5) crass (1.0.4) @@ -76,16 +77,15 @@ GEM mini_portile2 (2.4.0) minitest (5.11.3) multi_json (1.13.1) - multipart-post (2.0.0) + multipart-post (2.1.1) mustermann (1.0.3) - nokogiri (1.10.2) + nokogiri (1.10.3) mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) parallel (1.17.0) - parser (2.6.2.1) + parser (2.6.3.0) ast (~> 2.4.0) pg (1.1.4) - psych (3.1.0) public_suffix (3.0.3) puma (3.12.1) rack (2.0.7) @@ -111,7 +111,7 @@ GEM thor (>= 0.19.0, < 2.0) rainbow (3.0.0) rake (12.3.2) - regexp_parser (1.4.0) + regexp_parser (1.5.0) rspec (3.8.0) rspec-core (~> 3.8.0) rspec-expectations (~> 3.8.0) @@ -128,19 +128,18 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.67.2) + rubocop (0.69.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - psych (>= 3.1.0) + parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.6) + unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.0) sassc (2.0.1) ffi (~> 1.9) rake - sassc-rails (2.1.0) + sassc-rails (2.1.1) railties (>= 4.0.0) sassc (>= 2.0) sprockets (> 3.0) @@ -173,7 +172,7 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.4.0) + sqlite3 (1.4.1) thor (0.20.3) thread (0.2.2) thread_safe (0.3.6) @@ -183,7 +182,7 @@ GEM thread_safe (~> 0.1) uglifier (4.1.20) execjs (>= 0.3.0, < 3) - unicode-display_width (1.5.0) + unicode-display_width (1.6.0) will_paginate (3.1.7) xpath (3.2.0) nokogiri (~> 1.8) @@ -194,7 +193,7 @@ PLATFORMS DEPENDENCIES activerecord (~> 5.2.2) bcrypt (~> 3.1) - capybara (~> 3.17.0) + capybara (~> 3.20.0) delayed_job (~> 4.1) delayed_job_active_record (~> 4.1) faker (~> 1.9.1) @@ -211,7 +210,7 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.8.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.67.2) + rubocop (~> 0.69.0) sassc-rails (~> 2.1.0) sinatra (~> 2.0.5) sinatra-activerecord (~> 2.0) From 905ce145172c925afa703379bd1fd174ed8b3265 Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 16 May 2019 00:57:01 -0600 Subject: [PATCH 40/90] bump --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 846037fdf..0619392a9 100644 --- a/Gemfile +++ b/Gemfile @@ -47,3 +47,4 @@ gem "sprockets-helpers" gem "thread", "~> 0.2.2" gem "uglifier", "~> 4.1.20" gem "will_paginate", "~> 3.1.0" + From ef37a70e55a492197005c658f171962f872fc3b1 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 29 Oct 2019 03:34:15 -0600 Subject: [PATCH 41/90] Update ruby and gems --- .rubocop.yml | 6 - Gemfile | 42 +++--- Gemfile.lock | 232 ++++++++++++++++------------------ spec/models/story_spec.rb | 4 +- spec/support/active_record.rb | 2 +- 5 files changed, 134 insertions(+), 152 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a7403fc37..cb259fecf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -18,14 +18,8 @@ Style/Documentation: Style/DoubleNegation: Enabled: false -Style/IfUnlessModifier: - MaxLineLength: 120 - Style/NumericLiterals: Enabled: false Style/StringLiterals: EnforcedStyle: double_quotes - -Style/WhileUntilModifier: - MaxLineLength: 120 diff --git a/Gemfile b/Gemfile index 0619392a9..b03ac760e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,9 @@ -ruby "2.6.3" +ruby "2.6.5" source "https://rubygems.org" group :production do gem "pg", "~> 1.1.4" - gem "puma", "~> 3.12.0" + gem "puma", "~> 4.2.1" end group :development do @@ -11,40 +11,40 @@ group :development do end group :development, :test do - gem "capybara", "~> 3.20.0" - gem "faker", "~> 1.9.1" + gem "capybara", "~> 3.29.0" + gem "faker", "~> 2.6.0" gem "rack-test", "~> 1.1.0" - gem "rspec", "~> 3.8.0" + gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.69.0", require: false + gem "rubocop", "~> 0.76.0", require: false gem "timecop", "~> 0.9.0" end -gem "activerecord", "~> 5.2.2" -gem "bcrypt", "~> 3.1" -gem "delayed_job", "~> 4.1" -gem "delayed_job_active_record", "~> 4.1" +gem "activerecord", "~> 6.0.0" +gem "bcrypt", "~> 3.1.13" +gem "delayed_job", "~> 4.1.8" +gem "delayed_job_active_record", "~> 4.1.4" gem "feedbag", "~> 0.10" gem "feedjira", "~> 2.2.0" -gem "i18n", "~> 1.6.0" -gem "loofah", "~> 2.2.3" +gem "i18n", "~> 1.7.0" +gem "loofah", "~> 2.3.1" -gem "nokogiri", "~> 1.10.1" -gem "rack-protection", "~> 2.0.5" +gem "nokogiri", "~> 1.10.4" +gem "rack-protection", "~> 2.0.7" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" -gem "sassc-rails", "~> 2.1.0" -gem "sinatra", "~> 2.0.5" -gem "sinatra-activerecord", "~> 2.0" +gem "sassc-rails", "~> 2.1.2" +gem "sinatra", "~> 2.0.7" +gem "sinatra-activerecord", "~> 2.0.14" -gem "sinatra-contrib", "~> 2.0.5" +gem "sinatra-contrib", "~> 2.0.7" gem "sinatra-flash", "~> 0.3.0" -gem "sprockets", "~> 3.7.2" +gem "sprockets", "~> 4.0.0" gem "sprockets-helpers" gem "thread", "~> 0.2.2" -gem "uglifier", "~> 4.1.20" -gem "will_paginate", "~> 3.1.0" +gem "uglifier", "~> 4.2.0" +gem "will_paginate", "~> 3.2.1" diff --git a/Gemfile.lock b/Gemfile.lock index 3bd2a9854..95014fee3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,66 +1,57 @@ GEM remote: https://rubygems.org/ specs: - actionpack (5.2.3) - actionview (= 5.2.3) - activesupport (= 5.2.3) + actionpack (6.0.0) + actionview (= 6.0.0) + activesupport (= 6.0.0) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.3) - activesupport (= 5.2.3) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actionview (6.0.0) + activesupport (= 6.0.0) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activemodel (5.2.3) - activesupport (= 5.2.3) - activerecord (5.2.3) - activemodel (= 5.2.3) - activesupport (= 5.2.3) - arel (>= 9.0) - activesupport (5.2.3) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activemodel (6.0.0) + activesupport (= 6.0.0) + activerecord (6.0.0) + activemodel (= 6.0.0) + activesupport (= 6.0.0) + activesupport (6.0.0) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) - arel (9.0.0) + zeitwerk (~> 2.1, >= 2.1.8) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) ast (2.4.0) backports (3.15.0) - bcrypt (3.1.12) + bcrypt (3.1.13) builder (3.2.3) - capybara (3.20.0) + capybara (3.29.0) addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - coderay (1.1.1) - columnize (0.9.0) + mini_mime (>= 0.1.3) + nokogiri (~> 1.8) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (~> 1.5) + xpath (~> 3.2) concurrent-ruby (1.1.5) - coveralls (0.8.13) - json (~> 1.8) - simplecov (~> 0.11.0) - term-ansicolor (~> 1.3) - thor (~> 0.19.1) - tins (~> 1.6.0) - crass (1.0.3) - debugger-linecache (1.2.0) + crass (1.0.5) delayed_job (4.1.8) activesupport (>= 3.0, < 6.1) - delayed_job_active_record (4.1.0) - activerecord (>= 3.0, < 5) + delayed_job_active_record (4.1.4) + activerecord (>= 3.0, < 6.1) delayed_job (>= 3.0, < 5) diff-lcs (1.3) - erubi (1.8.0) + erubi (1.9.0) execjs (2.7.0) - faker (1.9.3) - i18n (>= 0.7) - faraday (0.15.4) + faker (2.6.0) + i18n (>= 1.6, < 1.8) + faraday (0.17.0) multipart-post (>= 1.2, < 3) faraday_middleware (0.13.1) faraday (>= 0.7.4, < 1.0) @@ -72,36 +63,33 @@ GEM faraday_middleware (>= 0.9) loofah (>= 2.0) sax-machine (>= 1.0) - ffi (1.10.0) - i18n (1.6.0) + ffi (1.11.1) + i18n (1.7.0) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.2) - loofah (2.2.3) + jaro_winkler (1.5.3) + loofah (2.3.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - method_source (0.8.2) - mime-types (3.0) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0221) - mini_portile2 (2.3.0) + method_source (0.9.2) + mini_mime (1.0.2) + mini_portile2 (2.4.0) minitest (5.12.2) - multi_json (1.12.1) - multipart-post (2.0.0) - nokogiri (1.8.2) - mini_portile2 (~> 2.3.0) - parser (2.3.0.6) - ast (~> 2.2) - pg (0.18.4) - powerpack (0.1.1) - pry (0.10.3) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-byebug (1.3.3) - byebug (~> 2.7) - pry (~> 0.10) - rack (1.6.10) - rack-protection (1.5.3) + multi_json (1.14.1) + multipart-post (2.1.1) + mustermann (1.0.3) + nio4r (2.5.2) + nokogiri (1.10.4) + mini_portile2 (~> 2.4.0) + open_uri_redirections (0.2.1) + parallel (1.18.0) + parser (2.6.5.0) + ast (~> 2.4.0) + pg (1.1.4) + public_suffix (4.0.1) + puma (4.2.1) + nio4r (~> 2.0) + rack (2.0.7) + rack-protection (2.0.7) rack rack-ssl (1.4.1) rack @@ -113,69 +101,68 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.2.3) - actionpack (= 5.2.3) - activesupport (= 5.2.3) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) + railties (6.0.0) + actionpack (= 6.0.0) + activesupport (= 6.0.0) method_source rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) + thor (>= 0.20.3, < 2.0) rainbow (3.0.0) - rake (12.3.2) - regexp_parser (1.5.0) - rspec (3.8.0) - rspec-core (~> 3.8.0) - rspec-expectations (~> 3.8.0) - rspec-mocks (~> 3.8.0) - rspec-core (3.8.0) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.3) + rake (13.0.0) + regexp_parser (1.6.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.8.0) + rspec-support (~> 3.9.0) rspec-html-matchers (0.9.1) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.8.0) + rspec-mocks (3.9.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-support (3.8.0) - rubocop (0.69.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.0) + rubocop (0.76.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - ruby-progressbar (1.10.0) - sassc (2.0.1) + ruby-progressbar (1.10.1) + sassc (2.2.1) ffi (~> 1.9) - rake - sassc-rails (2.1.1) + sassc-rails (2.1.2) railties (>= 4.0.0) sassc (>= 2.0) sprockets (> 3.0) sprockets-rails tilt sax-machine (1.3.2) - sinatra (2.0.5) + sinatra (2.0.7) mustermann (~> 1.0) rack (~> 2.0) - rack-protection (= 2.0.5) + rack-protection (= 2.0.7) tilt (~> 2.0) - sinatra-activerecord (2.0.13) + sinatra-activerecord (2.0.14) activerecord (>= 3.2) sinatra (>= 1.0) - sinatra-contrib (2.0.5) + sinatra-contrib (2.0.7) backports (>= 2.8.2) multi_json mustermann (~> 1.0) - rack-protection (= 2.0.5) - sinatra (= 2.0.5) - tilt (>= 1.3, < 3) + rack-protection (= 2.0.7) + sinatra (= 2.0.7) + tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) - sprockets (3.7.2) + sprockets (4.0.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-helpers (1.2.1) @@ -188,56 +175,57 @@ GEM thor (0.20.3) thread (0.2.2) thread_safe (0.3.6) - tilt (2.0.9) + tilt (2.0.10) timecop (0.9.1) tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (4.1.20) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (1.6.0) - will_paginate (3.1.7) + will_paginate (3.2.1) xpath (3.2.0) nokogiri (~> 1.8) + zeitwerk (2.2.0) PLATFORMS ruby DEPENDENCIES - activerecord (~> 5.2.2) - bcrypt (~> 3.1) - capybara (~> 3.20.0) - delayed_job (~> 4.1) - delayed_job_active_record (~> 4.1) - faker (~> 1.9.1) + activerecord (~> 6.0.0) + bcrypt (~> 3.1.13) + capybara (~> 3.29.0) + delayed_job (~> 4.1.8) + delayed_job_active_record (~> 4.1.4) + faker (~> 2.6.0) feedbag (~> 0.10) feedjira (~> 2.2.0) - i18n (~> 1.6.0) - loofah (~> 2.2.3) - nokogiri (~> 1.10.1) + i18n (~> 1.7.0) + loofah (~> 2.3.1) + nokogiri (~> 1.10.4) pg (~> 1.1.4) - puma (~> 3.12.0) - rack-protection (~> 2.0.5) + puma (~> 4.2.1) + rack-protection (~> 2.0.7) rack-ssl (~> 1.4) rack-test (~> 1.1.0) racksh (~> 1.0) - rspec (~> 3.8.0) + rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.69.0) - sassc-rails (~> 2.1.0) - sinatra (~> 2.0.5) - sinatra-activerecord (~> 2.0) - sinatra-contrib (~> 2.0.5) + rubocop (~> 0.76.0) + sassc-rails (~> 2.1.2) + sinatra (~> 2.0.7) + sinatra-activerecord (~> 2.0.14) + sinatra-contrib (~> 2.0.7) sinatra-flash (~> 0.3.0) - sprockets (~> 3.7.2) + sprockets (~> 4.0.0) sprockets-helpers sqlite3 (~> 1.4.0) thread (~> 0.2.2) timecop (~> 0.9.0) - uglifier (~> 4.1.20) - will_paginate (~> 3.1.0) + uglifier (~> 4.2.0) + will_paginate (~> 3.2.1) RUBY VERSION ruby 2.6.5p114 BUNDLED WITH - 1.17.2 + 2.0.2 diff --git a/spec/models/story_spec.rb b/spec/models/story_spec.rb index 3ca12d381..c6d7c8655 100644 --- a/spec/models/story_spec.rb +++ b/spec/models/story_spec.rb @@ -6,8 +6,8 @@ describe "Story" do let(:story) do Story.new( - title: Faker::Lorem.sentence(50), - body: Faker::Lorem.sentence(50) + title: Faker::Lorem.sentence(word_count: 50), + body: Faker::Lorem.sentence(word_count: 50) ) end diff --git a/spec/support/active_record.rb b/spec/support/active_record.rb index 9b3556770..6ecda0632 100644 --- a/spec/support/active_record.rb +++ b/spec/support/active_record.rb @@ -5,7 +5,7 @@ ActiveRecord::Base.logger = Logger.new("log/test.log") def need_to_migrate? - ActiveRecord::MigrationContext.new(["db/migrate"]).needs_migration? + ActiveRecord::MigrationContext.new(["db/migrate"], ActiveRecord::SchemaMigration).needs_migration? end ActiveRecord::Migrator.up "db/migrate" if need_to_migrate? From 3618a7103922572a37322d9d94dd7b39a523fafc Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 1 Nov 2019 22:56:29 -0600 Subject: [PATCH 42/90] Add feedjira 3 (based on PR) --- Gemfile.lock | 8 ++++---- app/tasks/fetch_feed.rb | 2 +- app/utils/feed_discovery.rb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 41ad633eb..0f5615149 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -63,7 +63,7 @@ GEM multi_xml (>= 0.5.2) i18n (1.7.0) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.3) + jaro_winkler (1.5.4) loofah (2.3.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -73,12 +73,12 @@ GEM mime-types-data (3.2019.1009) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.12.2) + minitest (5.13.0) multi_json (1.14.1) multi_xml (0.6.0) mustermann (1.0.3) nio4r (2.5.2) - nokogiri (1.10.4) + nokogiri (1.10.5) mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) parallel (1.18.0) @@ -185,7 +185,7 @@ GEM will_paginate (3.2.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.2.0) + zeitwerk (2.2.1) PLATFORMS ruby diff --git a/app/tasks/fetch_feed.rb b/app/tasks/fetch_feed.rb index cab38975c..a1e8e6f34 100644 --- a/app/tasks/fetch_feed.rb +++ b/app/tasks/fetch_feed.rb @@ -34,7 +34,7 @@ def fetch private def fetch_raw_feed - response = @client.get(@feed.url) + response = @client.get(@feed.url).to_s @parser.parse(response) end diff --git a/app/utils/feed_discovery.rb b/app/utils/feed_discovery.rb index 9ae8335be..f8e01ea90 100644 --- a/app/utils/feed_discovery.rb +++ b/app/utils/feed_discovery.rb @@ -15,7 +15,7 @@ def discover(url, finder = Feedbag, parser = Feedjira, client = HTTParty) end def get_feed_for_url(url, parser, client) - response = client.get(url) + response = client.get(url).to_s feed = parser.parse(response) feed.feed_url ||= url feed From a5f4bbc60f2e4e474ecce9990e0ea0df6a4ce577 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 5 Nov 2019 15:44:54 -0700 Subject: [PATCH 43/90] Update to rails 6.0.1 dependencies --- Gemfile | 2 +- Gemfile.lock | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Gemfile b/Gemfile index cd097733b..886f4baae 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ end group :development, :test do gem "capybara", "~> 3.29.0" - gem "faker", "~> 2.6.0" + gem "faker", "~> 2.7.0" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" diff --git a/Gemfile.lock b/Gemfile.lock index 0f5615149..6a3b651f9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,30 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.0) - actionview (= 6.0.0) - activesupport (= 6.0.0) + actionpack (6.0.1) + actionview (= 6.0.1) + activesupport (= 6.0.1) rack (~> 2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.0) - activesupport (= 6.0.0) + actionview (6.0.1) + activesupport (= 6.0.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.0) - activesupport (= 6.0.0) - activerecord (6.0.0) - activemodel (= 6.0.0) - activesupport (= 6.0.0) - activesupport (6.0.0) + activemodel (6.0.1) + activesupport (= 6.0.1) + activerecord (6.0.1) + activemodel (= 6.0.1) + activesupport (= 6.0.1) + activesupport (6.0.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 2.1, >= 2.1.8) + zeitwerk (~> 2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.0) @@ -49,7 +49,7 @@ GEM diff-lcs (1.3) erubi (1.9.0) execjs (2.7.0) - faker (2.6.0) + faker (2.7.0) i18n (>= 1.6, < 1.8) feedbag (0.10) nokogiri (~> 1.8, >= 1.8.2) @@ -103,9 +103,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.0) - actionpack (= 6.0.0) - activesupport (= 6.0.0) + railties (6.0.1) + actionpack (= 6.0.1) + activesupport (= 6.0.1) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -196,7 +196,7 @@ DEPENDENCIES capybara (~> 3.29.0) delayed_job (~> 4.1.8) delayed_job_active_record (~> 4.1.4) - faker (~> 2.6.0) + faker (~> 2.7.0) feedbag (~> 0.10) feedjira (~> 3.0.0) httparty From a194c5cc1a078a38378ad54ebe932ba70432c760 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 12 Nov 2019 10:32:32 -0700 Subject: [PATCH 44/90] Minor version updates --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 886f4baae..bf4d6a445 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" group :production do gem "pg", "~> 1.1.4" - gem "puma", "~> 4.2.1" + gem "puma", "~> 4.3.0" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 6a3b651f9..d8e626c82 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,7 +57,7 @@ GEM feedjira (3.0.0) loofah (>= 2.2.1) sax-machine (>= 1.0) - ffi (1.11.1) + ffi (1.11.2) httparty (0.17.1) mime-types (~> 3.0) multi_xml (>= 0.5.2) @@ -86,7 +86,7 @@ GEM ast (~> 2.4.0) pg (1.1.4) public_suffix (4.0.1) - puma (4.2.1) + puma (4.3.0) nio4r (~> 2.0) rack (2.0.7) rack-protection (2.0.7) @@ -110,7 +110,7 @@ GEM rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.0.0) - rake (13.0.0) + rake (13.0.1) regexp_parser (1.6.0) rspec (3.9.0) rspec-core (~> 3.9.0) @@ -121,7 +121,7 @@ GEM rspec-expectations (3.9.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-html-matchers (0.9.1) + rspec-html-matchers (0.9.2) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) rspec-mocks (3.9.0) @@ -204,7 +204,7 @@ DEPENDENCIES loofah (~> 2.3.1) nokogiri (~> 1.10.4) pg (~> 1.1.4) - puma (~> 4.2.1) + puma (~> 4.3.0) rack-protection (~> 2.0.7) rack-ssl (~> 1.4) rack-test (~> 1.1.0) From 3d578cdc9966ef0abba010759b4d27936f5c3244 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 4 Feb 2020 11:46:20 +0000 Subject: [PATCH 45/90] update versions --- .ruby-version | 2 +- Gemfile | 16 +++---- Gemfile.lock | 126 +++++++++++++++++++++++++------------------------- 3 files changed, 73 insertions(+), 71 deletions(-) diff --git a/.ruby-version b/.ruby-version index d7edb5686..ccfb6efd9 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.6.5 +ruby-2.7.0 diff --git a/Gemfile b/Gemfile index bf4d6a445..61d6ff094 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ -ruby "2.6.5" +ruby "2.7.0" source "https://rubygems.org" group :production do - gem "pg", "~> 1.1.4" + gem "pg", "~> 1.2.2" gem "puma", "~> 4.3.0" end @@ -11,12 +11,12 @@ group :development do end group :development, :test do - gem "capybara", "~> 3.29.0" - gem "faker", "~> 2.7.0" + gem "capybara", "~> 3.31.0" + gem "faker", "~> 2.10.1" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.76.0", require: false + gem "rubocop", "~> 0.79.0", require: false gem "timecop", "~> 0.9.0" end @@ -26,10 +26,10 @@ gem "delayed_job", "~> 4.1.8" gem "delayed_job_active_record", "~> 4.1.4" gem "feedbag", "~> 0.10" -gem "feedjira", "~> 3.0.0" +gem "feedjira", "~> 3.1.0" gem "httparty" -gem "i18n", "~> 1.7.0" -gem "loofah", "~> 2.3.1" +gem "i18n", "~> 1.8.2" +gem "loofah", "~> 2.4.0" gem "nokogiri", "~> 1.10.4" gem "rack-protection", "~> 2.0.7" diff --git a/Gemfile.lock b/Gemfile.lock index d8e626c82..9befc26f4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.1) - actionview (= 6.0.1) - activesupport (= 6.0.1) - rack (~> 2.0) + actionpack (6.0.2.1) + actionview (= 6.0.2.1) + activesupport (= 6.0.2.1) + rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.1) - activesupport (= 6.0.1) + actionview (6.0.2.1) + activesupport (= 6.0.2.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.1) - activesupport (= 6.0.1) - activerecord (6.0.1) - activemodel (= 6.0.1) - activesupport (= 6.0.1) - activesupport (6.0.1) + activemodel (6.0.2.1) + activesupport (= 6.0.2.1) + activerecord (6.0.2.1) + activemodel (= 6.0.2.1) + activesupport (= 6.0.2.1) + activesupport (6.0.2.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -30,8 +30,8 @@ GEM ast (2.4.0) backports (3.15.0) bcrypt (3.1.13) - builder (3.2.3) - capybara (3.29.0) + builder (3.2.4) + capybara (3.31.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -40,7 +40,7 @@ GEM regexp_parser (~> 1.5) xpath (~> 3.2) concurrent-ruby (1.1.5) - crass (1.0.5) + crass (1.0.6) delayed_job (4.1.8) activesupport (>= 3.0, < 6.1) delayed_job_active_record (4.1.4) @@ -49,47 +49,48 @@ GEM diff-lcs (1.3) erubi (1.9.0) execjs (2.7.0) - faker (2.7.0) - i18n (>= 1.6, < 1.8) + faker (2.10.1) + i18n (>= 1.6, < 2) feedbag (0.10) nokogiri (~> 1.8, >= 1.8.2) open_uri_redirections (~> 0.2) - feedjira (3.0.0) - loofah (>= 2.2.1) + feedjira (3.1.0) + loofah (>= 2.3.1) sax-machine (>= 1.0) - ffi (1.11.2) - httparty (0.17.1) + ffi (1.12.2) + httparty (0.17.3) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.7.0) + i18n (1.8.2) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) - loofah (2.3.1) + loofah (2.4.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) method_source (0.9.2) - mime-types (3.3) + mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2019.1009) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.13.0) + minitest (5.14.0) multi_json (1.14.1) multi_xml (0.6.0) - mustermann (1.0.3) + mustermann (1.1.1) + ruby2_keywords (~> 0.0.1) nio4r (2.5.2) - nokogiri (1.10.5) + nokogiri (1.10.7) mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) - parallel (1.18.0) - parser (2.6.5.0) + parallel (1.19.1) + parser (2.7.0.2) ast (~> 2.4.0) - pg (1.1.4) - public_suffix (4.0.1) - puma (4.3.0) + pg (1.2.2) + public_suffix (4.0.3) + puma (4.3.1) nio4r (~> 2.0) - rack (2.0.7) - rack-protection (2.0.7) + rack (2.1.2) + rack-protection (2.0.8.1) rack rack-ssl (1.4.1) rack @@ -103,9 +104,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.1) - actionpack (= 6.0.1) - activesupport (= 6.0.1) + railties (6.0.2.1) + actionpack (= 6.0.2.1) + activesupport (= 6.0.2.1) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -116,26 +117,27 @@ GEM 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-core (3.9.1) + rspec-support (~> 3.9.1) rspec-expectations (3.9.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-html-matchers (0.9.2) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.9.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-support (3.9.0) - rubocop (0.76.0) + rspec-support (3.9.2) + rubocop (0.79.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.6) + parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.1) + ruby2_keywords (0.0.2) sassc (2.2.1) ffi (~> 1.9) sassc-rails (2.1.2) @@ -145,20 +147,20 @@ GEM sprockets-rails tilt sax-machine (1.3.2) - sinatra (2.0.7) + sinatra (2.0.8.1) mustermann (~> 1.0) rack (~> 2.0) - rack-protection (= 2.0.7) + rack-protection (= 2.0.8.1) tilt (~> 2.0) sinatra-activerecord (2.0.14) activerecord (>= 3.2) sinatra (>= 1.0) - sinatra-contrib (2.0.7) + sinatra-contrib (2.0.8.1) backports (>= 2.8.2) multi_json mustermann (~> 1.0) - rack-protection (= 2.0.7) - sinatra (= 2.0.7) + rack-protection (= 2.0.8.1) + sinatra (= 2.0.8.1) tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) @@ -171,21 +173,21 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.4.1) - thor (0.20.3) + sqlite3 (1.4.2) + thor (1.0.1) thread (0.2.2) thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.1) - tzinfo (1.2.5) + tzinfo (1.2.6) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.6.0) + unicode-display_width (1.6.1) will_paginate (3.2.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.2.1) + zeitwerk (2.2.2) PLATFORMS ruby @@ -193,17 +195,17 @@ PLATFORMS DEPENDENCIES activerecord (~> 6.0.0) bcrypt (~> 3.1.13) - capybara (~> 3.29.0) + capybara (~> 3.31.0) delayed_job (~> 4.1.8) delayed_job_active_record (~> 4.1.4) - faker (~> 2.7.0) + faker (~> 2.10.1) feedbag (~> 0.10) - feedjira (~> 3.0.0) + feedjira (~> 3.1.0) httparty - i18n (~> 1.7.0) - loofah (~> 2.3.1) + i18n (~> 1.8.2) + loofah (~> 2.4.0) nokogiri (~> 1.10.4) - pg (~> 1.1.4) + pg (~> 1.2.2) puma (~> 4.3.0) rack-protection (~> 2.0.7) rack-ssl (~> 1.4) @@ -211,7 +213,7 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.76.0) + rubocop (~> 0.79.0) sassc-rails (~> 2.1.2) sinatra (~> 2.0.7) sinatra-activerecord (~> 2.0.14) @@ -226,7 +228,7 @@ DEPENDENCIES will_paginate (~> 3.2.1) RUBY VERSION - ruby 2.6.5p114 + ruby 2.7.0p0 BUNDLED WITH - 2.0.2 + 2.1.2 From b0a4f40407cd193a02587791e12b061839df4a7f Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 4 Mar 2020 02:00:45 -0700 Subject: [PATCH 46/90] update dependencies --- Gemfile | 4 ++-- Gemfile.lock | 32 +++++++++++++++++--------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Gemfile b/Gemfile index 61d6ff094..582edd9f0 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ group :development, :test do gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.79.0", require: false + gem "rubocop", "~> 0.80.1", require: false gem "timecop", "~> 0.9.0" end @@ -47,5 +47,5 @@ gem "sprockets-helpers" gem "thread", "~> 0.2.2" gem "uglifier", "~> 4.2.0" -gem "will_paginate", "~> 3.2.1" +gem "will_paginate", "~> 3.3.0" diff --git a/Gemfile.lock b/Gemfile.lock index 9befc26f4..b30a34816 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,7 +28,7 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.0) - backports (3.15.0) + backports (3.16.1) bcrypt (3.1.13) builder (3.2.4) capybara (3.31.0) @@ -39,7 +39,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) - concurrent-ruby (1.1.5) + concurrent-ruby (1.1.6) crass (1.0.6) delayed_job (4.1.8) activesupport (>= 3.0, < 6.1) @@ -49,16 +49,16 @@ GEM diff-lcs (1.3) erubi (1.9.0) execjs (2.7.0) - faker (2.10.1) + faker (2.10.2) i18n (>= 1.6, < 2) feedbag (0.10) nokogiri (~> 1.8, >= 1.8.2) open_uri_redirections (~> 0.2) - feedjira (3.1.0) + feedjira (3.1.1) loofah (>= 2.3.1) sax-machine (>= 1.0) ffi (1.12.2) - httparty (0.17.3) + httparty (0.18.0) mime-types (~> 3.0) multi_xml (>= 0.5.2) i18n (1.8.2) @@ -79,17 +79,17 @@ GEM mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.2) - nokogiri (1.10.7) + nokogiri (1.10.9) mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) parallel (1.19.1) - parser (2.7.0.2) + parser (2.7.0.4) ast (~> 2.4.0) pg (1.2.2) public_suffix (4.0.3) - puma (4.3.1) + puma (4.3.3) nio4r (~> 2.0) - rack (2.1.2) + rack (2.2.2) rack-protection (2.0.8.1) rack rack-ssl (1.4.1) @@ -112,7 +112,8 @@ GEM thor (>= 0.20.3, < 2.0) rainbow (3.0.0) rake (13.0.1) - regexp_parser (1.6.0) + regexp_parser (1.7.0) + rexml (3.2.4) rspec (3.9.0) rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) @@ -129,11 +130,12 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.2) - rubocop (0.79.0) + rubocop (0.80.1) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) + rexml ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.1) @@ -184,10 +186,10 @@ GEM uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (1.6.1) - will_paginate (3.2.1) + will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.2.2) + zeitwerk (2.3.0) PLATFORMS ruby @@ -213,7 +215,7 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.79.0) + rubocop (~> 0.80.1) sassc-rails (~> 2.1.2) sinatra (~> 2.0.7) sinatra-activerecord (~> 2.0.14) @@ -225,7 +227,7 @@ DEPENDENCIES thread (~> 0.2.2) timecop (~> 0.9.0) uglifier (~> 4.2.0) - will_paginate (~> 3.2.1) + will_paginate (~> 3.3.0) RUBY VERSION ruby 2.7.0p0 From 8167702e00d31cf56b3978beb32c2c2798027fc8 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 19 May 2020 02:37:23 -0600 Subject: [PATCH 47/90] bump versions again --- .ruby-version | 2 +- Gemfile | 12 +++---- Gemfile.lock | 90 +++++++++++++++++++++++++-------------------------- 3 files changed, 51 insertions(+), 53 deletions(-) diff --git a/.ruby-version b/.ruby-version index ccfb6efd9..bff6ce5c1 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.7.0 +ruby-2.7.1 diff --git a/Gemfile b/Gemfile index 21779df82..21e366dfc 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "2.7.0" +ruby "2.7.1" source "https://rubygems.org" @@ -11,13 +11,14 @@ group :development do gem "sqlite3", "~> 1.4.0" # 1.4 doesn't work with rails 5.2.2 stuffs end + group :development, :test do - gem "capybara", "~> 3.31.0" - gem "faker", "~> 2.10.1" + gem "capybara", "~> 3.32.2" + gem "faker", "~> 2.11.0" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.80.1", require: false + gem "rubocop", "~> 0.83.0", require: false gem "timecop", "~> 0.9.0" end @@ -30,7 +31,7 @@ gem "feedbag", "~> 0.10" gem "feedjira", "~> 3.1.0" gem "httparty" gem "i18n", "~> 1.8.2" -gem "loofah", "~> 2.4.0" +gem "loofah", "~> 2.5.0" gem "nokogiri", "~> 1.10.4" gem "rack-protection", "~> 2.0.7" @@ -49,4 +50,3 @@ gem "sprockets-helpers" gem "thread", "~> 0.2.2" gem "uglifier", "~> 4.2.0" gem "will_paginate", "~> 3.3.0" - diff --git a/Gemfile.lock b/Gemfile.lock index b30a34816..84083270b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,37 +1,37 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.2.1) - actionview (= 6.0.2.1) - activesupport (= 6.0.2.1) + actionpack (6.0.3.1) + actionview (= 6.0.3.1) + activesupport (= 6.0.3.1) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.2.1) - activesupport (= 6.0.2.1) + actionview (6.0.3.1) + activesupport (= 6.0.3.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.2.1) - activesupport (= 6.0.2.1) - activerecord (6.0.2.1) - activemodel (= 6.0.2.1) - activesupport (= 6.0.2.1) - activesupport (6.0.2.1) + activemodel (6.0.3.1) + activesupport (= 6.0.3.1) + activerecord (6.0.3.1) + activemodel (= 6.0.3.1) + activesupport (= 6.0.3.1) + activesupport (6.0.3.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 2.2) + zeitwerk (~> 2.2, >= 2.2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.0) - backports (3.16.1) + backports (3.17.1) bcrypt (3.1.13) builder (3.2.4) - capybara (3.31.0) + capybara (3.32.2) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -49,7 +49,7 @@ GEM diff-lcs (1.3) erubi (1.9.0) execjs (2.7.0) - faker (2.10.2) + faker (2.11.0) i18n (>= 1.6, < 2) feedbag (0.10) nokogiri (~> 1.8, >= 1.8.2) @@ -63,17 +63,16 @@ GEM multi_xml (>= 0.5.2) i18n (1.8.2) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.4) - loofah (2.4.0) + loofah (2.5.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - method_source (0.9.2) + method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2019.1009) + mime-types-data (3.2020.0512) mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.14.0) + minitest (5.14.1) multi_json (1.14.1) multi_xml (0.6.0) mustermann (1.1.1) @@ -83,11 +82,11 @@ GEM mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) parallel (1.19.1) - parser (2.7.0.4) + parser (2.7.1.2) ast (~> 2.4.0) - pg (1.2.2) - public_suffix (4.0.3) - puma (4.3.3) + pg (1.2.3) + public_suffix (4.0.5) + puma (4.3.4) nio4r (~> 2.0) rack (2.2.2) rack-protection (2.0.8.1) @@ -104,9 +103,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.2.1) - actionpack (= 6.0.2.1) - activesupport (= 6.0.2.1) + railties (6.0.3.1) + actionpack (= 6.0.3.1) + activesupport (= 6.0.3.1) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -118,9 +117,9 @@ GEM rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.0) + rspec-core (3.9.2) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-html-matchers (0.9.2) @@ -129,18 +128,17 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-support (3.9.2) - rubocop (0.80.1) - jaro_winkler (~> 1.5.1) + rspec-support (3.9.3) + rubocop (0.83.0) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) rexml ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) + unicode-display_width (>= 1.4.0, < 2.0) ruby-progressbar (1.10.1) ruby2_keywords (0.0.2) - sassc (2.2.1) + sassc (2.3.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -154,8 +152,8 @@ GEM rack (~> 2.0) rack-protection (= 2.0.8.1) tilt (~> 2.0) - sinatra-activerecord (2.0.14) - activerecord (>= 3.2) + sinatra-activerecord (2.0.18) + activerecord (>= 4.1) sinatra (>= 1.0) sinatra-contrib (2.0.8.1) backports (>= 2.8.2) @@ -169,7 +167,7 @@ GEM sprockets (4.0.0) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-helpers (1.2.1) + sprockets-helpers (1.3.0) sprockets (>= 2.2) sprockets-rails (3.2.1) actionpack (>= 4.0) @@ -181,11 +179,11 @@ GEM thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.1) - tzinfo (1.2.6) + tzinfo (1.2.7) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (1.6.1) + unicode-display_width (1.7.0) will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) @@ -197,15 +195,15 @@ PLATFORMS DEPENDENCIES activerecord (~> 6.0.0) bcrypt (~> 3.1.13) - capybara (~> 3.31.0) + capybara (~> 3.32.2) delayed_job (~> 4.1.8) delayed_job_active_record (~> 4.1.4) - faker (~> 2.10.1) + faker (~> 2.11.0) feedbag (~> 0.10) feedjira (~> 3.1.0) httparty i18n (~> 1.8.2) - loofah (~> 2.4.0) + loofah (~> 2.5.0) nokogiri (~> 1.10.4) pg (~> 1.2.2) puma (~> 4.3.0) @@ -215,7 +213,7 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.80.1) + rubocop (~> 0.83.0) sassc-rails (~> 2.1.2) sinatra (~> 2.0.7) sinatra-activerecord (~> 2.0.14) @@ -230,7 +228,7 @@ DEPENDENCIES will_paginate (~> 3.3.0) RUBY VERSION - ruby 2.7.0p0 + ruby 2.7.1p83 BUNDLED WITH - 2.1.2 + 2.1.4 From 77eabdac0d670aba8bc7deab610a37ad36660cf8 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sat, 6 Jun 2020 01:18:34 -0600 Subject: [PATCH 48/90] update dependencies --- Gemfile | 8 ++++---- Gemfile.lock | 36 ++++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Gemfile b/Gemfile index 21e366dfc..e690c74cf 100644 --- a/Gemfile +++ b/Gemfile @@ -14,15 +14,15 @@ end group :development, :test do gem "capybara", "~> 3.32.2" - gem "faker", "~> 2.11.0" + gem "faker", "~> 2.12.0" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.83.0", require: false + gem "rubocop", "~> 0.85.0", require: false gem "timecop", "~> 0.9.0" end -gem "activerecord", "~> 6.0.0" +gem "activerecord", "~> 6.0.3.1" gem "bcrypt", "~> 3.1.13" gem "delayed_job", "~> 4.1.8" gem "delayed_job_active_record", "~> 4.1.4" @@ -33,7 +33,7 @@ gem "httparty" gem "i18n", "~> 1.8.2" gem "loofah", "~> 2.5.0" -gem "nokogiri", "~> 1.10.4" +gem "nokogiri", "~> 1.11.0rc2" gem "rack-protection", "~> 2.0.7" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" diff --git a/Gemfile.lock b/Gemfile.lock index 84083270b..968fdd285 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,7 +28,7 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.0) - backports (3.17.1) + backports (3.17.2) bcrypt (3.1.13) builder (3.2.4) capybara (3.32.2) @@ -49,7 +49,7 @@ GEM diff-lcs (1.3) erubi (1.9.0) execjs (2.7.0) - faker (2.11.0) + faker (2.12.0) i18n (>= 1.6, < 2) feedbag (0.10) nokogiri (~> 1.8, >= 1.8.2) @@ -57,11 +57,11 @@ GEM feedjira (3.1.1) loofah (>= 2.3.1) sax-machine (>= 1.0) - ffi (1.12.2) + ffi (1.13.0) httparty (0.18.0) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.8.2) + i18n (1.8.3) concurrent-ruby (~> 1.0) loofah (2.5.0) crass (~> 1.0.2) @@ -71,22 +71,22 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2020.0512) mini_mime (1.0.2) - mini_portile2 (2.4.0) + mini_portile2 (2.5.0) minitest (5.14.1) multi_json (1.14.1) multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.2) - nokogiri (1.10.9) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.0.rc2) + mini_portile2 (~> 2.5.0) open_uri_redirections (0.2.1) parallel (1.19.1) - parser (2.7.1.2) + parser (2.7.1.3) ast (~> 2.4.0) pg (1.2.3) public_suffix (4.0.5) - puma (4.3.4) + puma (4.3.5) nio4r (~> 2.0) rack (2.2.2) rack-protection (2.0.8.1) @@ -129,16 +129,20 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.3) - rubocop (0.83.0) + rubocop (0.85.0) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.7) rexml + rubocop-ast (>= 0.0.3) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (0.0.3) + parser (>= 2.7.0.1) ruby-progressbar (1.10.1) ruby2_keywords (0.0.2) - sassc (2.3.0) + sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -164,7 +168,7 @@ GEM tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) - sprockets (4.0.0) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-helpers (1.3.0) @@ -193,18 +197,18 @@ PLATFORMS ruby DEPENDENCIES - activerecord (~> 6.0.0) + activerecord (~> 6.0.3.1) bcrypt (~> 3.1.13) capybara (~> 3.32.2) delayed_job (~> 4.1.8) delayed_job_active_record (~> 4.1.4) - faker (~> 2.11.0) + faker (~> 2.12.0) feedbag (~> 0.10) feedjira (~> 3.1.0) httparty i18n (~> 1.8.2) loofah (~> 2.5.0) - nokogiri (~> 1.10.4) + nokogiri (~> 1.11.0rc2) pg (~> 1.2.2) puma (~> 4.3.0) rack-protection (~> 2.0.7) @@ -213,7 +217,7 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.83.0) + rubocop (~> 0.85.0) sassc-rails (~> 2.1.2) sinatra (~> 2.0.7) sinatra-activerecord (~> 2.0.14) From e94e32c741a400c6a1c15b81ae035ffecb533466 Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 10 Jun 2020 02:01:19 -0600 Subject: [PATCH 49/90] update dependencies --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 968fdd285..2538e2dc0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,7 +57,7 @@ GEM feedjira (3.1.1) loofah (>= 2.3.1) sax-machine (>= 1.0) - ffi (1.13.0) + ffi (1.13.1) httparty (0.18.0) mime-types (~> 3.0) multi_xml (>= 0.5.2) @@ -111,7 +111,7 @@ GEM thor (>= 0.20.3, < 2.0) rainbow (3.0.0) rake (13.0.1) - regexp_parser (1.7.0) + regexp_parser (1.7.1) rexml (3.2.4) rspec (3.9.0) rspec-core (~> 3.9.0) @@ -129,7 +129,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.3) - rubocop (0.85.0) + rubocop (0.85.1) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) From 208f963c81cbcda06b85fa3c6341eae4cddfea10 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sat, 27 Jun 2020 15:14:47 -0600 Subject: [PATCH 50/90] Update dependencies --- Gemfile | 8 +++---- Gemfile.lock | 64 ++++++++++++++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Gemfile b/Gemfile index e690c74cf..aa51baaf9 100644 --- a/Gemfile +++ b/Gemfile @@ -13,12 +13,12 @@ end group :development, :test do - gem "capybara", "~> 3.32.2" - gem "faker", "~> 2.12.0" + gem "capybara", "~> 3.33.0" + gem "faker", "~> 2.13.0" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.85.0", require: false + gem "rubocop", "~> 0.86.0", require: false gem "timecop", "~> 0.9.0" end @@ -31,7 +31,7 @@ gem "feedbag", "~> 0.10" gem "feedjira", "~> 3.1.0" gem "httparty" gem "i18n", "~> 1.8.2" -gem "loofah", "~> 2.5.0" +gem "loofah", "~> 2.6.0" gem "nokogiri", "~> 1.11.0rc2" gem "rack-protection", "~> 2.0.7" diff --git a/Gemfile.lock b/Gemfile.lock index 2538e2dc0..020782495 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.3.1) - actionview (= 6.0.3.1) - activesupport (= 6.0.3.1) + actionpack (6.0.3.2) + actionview (= 6.0.3.2) + activesupport (= 6.0.3.2) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.3.1) - activesupport (= 6.0.3.1) + actionview (6.0.3.2) + activesupport (= 6.0.3.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.3.1) - activesupport (= 6.0.3.1) - activerecord (6.0.3.1) - activemodel (= 6.0.3.1) - activesupport (= 6.0.3.1) - activesupport (6.0.3.1) + activemodel (6.0.3.2) + activesupport (= 6.0.3.2) + activerecord (6.0.3.2) + activemodel (= 6.0.3.2) + activesupport (= 6.0.3.2) + activesupport (6.0.3.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -27,11 +27,11 @@ GEM zeitwerk (~> 2.2, >= 2.2.2) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - ast (2.4.0) - backports (3.17.2) + ast (2.4.1) + backports (3.18.1) bcrypt (3.1.13) builder (3.2.4) - capybara (3.32.2) + capybara (3.33.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -46,10 +46,10 @@ GEM delayed_job_active_record (4.1.4) activerecord (>= 3.0, < 6.1) delayed_job (>= 3.0, < 5) - diff-lcs (1.3) + diff-lcs (1.4.2) erubi (1.9.0) execjs (2.7.0) - faker (2.12.0) + faker (2.13.0) i18n (>= 1.6, < 2) feedbag (0.10) nokogiri (~> 1.8, >= 1.8.2) @@ -58,12 +58,12 @@ GEM loofah (>= 2.3.1) sax-machine (>= 1.0) ffi (1.13.1) - httparty (0.18.0) + httparty (0.18.1) mime-types (~> 3.0) multi_xml (>= 0.5.2) i18n (1.8.3) concurrent-ruby (~> 1.0) - loofah (2.5.0) + loofah (2.6.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) method_source (1.0.0) @@ -81,14 +81,14 @@ GEM nokogiri (1.11.0.rc2) mini_portile2 (~> 2.5.0) open_uri_redirections (0.2.1) - parallel (1.19.1) - parser (2.7.1.3) - ast (~> 2.4.0) + parallel (1.19.2) + parser (2.7.1.4) + ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.5) puma (4.3.5) nio4r (~> 2.0) - rack (2.2.2) + rack (2.2.3) rack-protection (2.0.8.1) rack rack-ssl (1.4.1) @@ -103,9 +103,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3.1) - actionpack (= 6.0.3.1) - activesupport (= 6.0.3.1) + railties (6.0.3.2) + actionpack (= 6.0.3.2) + activesupport (= 6.0.3.2) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -129,16 +129,16 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.3) - rubocop (0.85.1) + rubocop (0.86.0) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.7) rexml - rubocop-ast (>= 0.0.3) + rubocop-ast (>= 0.0.3, < 1.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.0.3) + rubocop-ast (0.1.0) parser (>= 2.7.0.1) ruby-progressbar (1.10.1) ruby2_keywords (0.0.2) @@ -199,15 +199,15 @@ PLATFORMS DEPENDENCIES activerecord (~> 6.0.3.1) bcrypt (~> 3.1.13) - capybara (~> 3.32.2) + capybara (~> 3.33.0) delayed_job (~> 4.1.8) delayed_job_active_record (~> 4.1.4) - faker (~> 2.12.0) + faker (~> 2.13.0) feedbag (~> 0.10) feedjira (~> 3.1.0) httparty i18n (~> 1.8.2) - loofah (~> 2.5.0) + loofah (~> 2.6.0) nokogiri (~> 1.11.0rc2) pg (~> 1.2.2) puma (~> 4.3.0) @@ -217,7 +217,7 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.85.0) + rubocop (~> 0.86.0) sassc-rails (~> 2.1.2) sinatra (~> 2.0.7) sinatra-activerecord (~> 2.0.14) From ec9a395416e386997800f871508ae1992edc209d Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 5 Jul 2020 15:51:14 -0600 Subject: [PATCH 51/90] Update dependencies --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 020782495..ea179ec83 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -46,7 +46,7 @@ GEM delayed_job_active_record (4.1.4) activerecord (>= 3.0, < 6.1) delayed_job (>= 3.0, < 5) - diff-lcs (1.4.2) + diff-lcs (1.4.4) erubi (1.9.0) execjs (2.7.0) faker (2.13.0) @@ -191,7 +191,7 @@ GEM will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.3.0) + zeitwerk (2.3.1) PLATFORMS ruby From 21639c64a6a8a6df9a3aaaced344dca50cf9b5e4 Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 19 Aug 2020 15:31:13 -0600 Subject: [PATCH 52/90] Update gems --- Gemfile | 2 +- Gemfile.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index aa51baaf9..ae5746709 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ group :development, :test do gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.86.0", require: false + gem "rubocop", "~> 0.89.1", require: false gem "timecop", "~> 0.9.0" end diff --git a/Gemfile.lock b/Gemfile.lock index ea179ec83..d8fac47e0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ GEM public_suffix (>= 2.0.2, < 5.0) ast (2.4.1) backports (3.18.1) - bcrypt (3.1.13) + bcrypt (3.1.15) builder (3.2.4) capybara (3.33.0) addressable @@ -39,7 +39,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) - concurrent-ruby (1.1.6) + concurrent-ruby (1.1.7) crass (1.0.6) delayed_job (4.1.8) activesupport (>= 3.0, < 6.1) @@ -61,7 +61,7 @@ GEM httparty (0.18.1) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.8.3) + i18n (1.8.5) concurrent-ruby (~> 1.0) loofah (2.6.0) crass (~> 1.0.2) @@ -73,7 +73,7 @@ GEM mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.1) - multi_json (1.14.1) + multi_json (1.15.0) multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) @@ -129,17 +129,17 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.3) - rubocop (0.86.0) + rubocop (0.89.1) parallel (~> 1.10) - parser (>= 2.7.0.1) + parser (>= 2.7.1.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.7) rexml - rubocop-ast (>= 0.0.3, < 1.0) + rubocop-ast (>= 0.3.0, < 1.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.1.0) - parser (>= 2.7.0.1) + rubocop-ast (0.3.0) + parser (>= 2.7.1.4) ruby-progressbar (1.10.1) ruby2_keywords (0.0.2) sassc (2.4.0) @@ -191,7 +191,7 @@ GEM will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.3.1) + zeitwerk (2.4.0) PLATFORMS ruby @@ -217,7 +217,7 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.86.0) + rubocop (~> 0.89.1) sassc-rails (~> 2.1.2) sinatra (~> 2.0.7) sinatra-activerecord (~> 2.0.14) From 94a4ebf3c5b6d53e1c9e40b758ab883638e572f4 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 11 Sep 2020 15:10:34 -0600 Subject: [PATCH 53/90] Update gems --- Gemfile | 10 +++---- Gemfile.lock | 74 +++++++++++++++++++++++++--------------------------- 2 files changed, 41 insertions(+), 43 deletions(-) diff --git a/Gemfile b/Gemfile index ae5746709..b163bacd6 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ group :development, :test do gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.9.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.89.1", require: false + gem "rubocop", "~> 0.90.0", require: false gem "timecop", "~> 0.9.0" end @@ -31,18 +31,18 @@ gem "feedbag", "~> 0.10" gem "feedjira", "~> 3.1.0" gem "httparty" gem "i18n", "~> 1.8.2" -gem "loofah", "~> 2.6.0" +gem "loofah", "~> 2.7.0" gem "nokogiri", "~> 1.11.0rc2" -gem "rack-protection", "~> 2.0.7" +gem "rack-protection", "~> 2.1.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" gem "sassc-rails", "~> 2.1.2" -gem "sinatra", "~> 2.0.7" +gem "sinatra", "~> 2.1.0" gem "sinatra-activerecord", "~> 2.0.14" -gem "sinatra-contrib", "~> 2.0.7" +gem "sinatra-contrib", "~> 2.1.0" gem "sinatra-flash", "~> 0.3.0" gem "sprockets", "~> 4.0.0" gem "sprockets-helpers" diff --git a/Gemfile.lock b/Gemfile.lock index d8fac47e0..68d3c4198 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.3.2) - actionview (= 6.0.3.2) - activesupport (= 6.0.3.2) + actionpack (6.0.3.3) + actionview (= 6.0.3.3) + activesupport (= 6.0.3.3) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.3.2) - activesupport (= 6.0.3.2) + actionview (6.0.3.3) + activesupport (= 6.0.3.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.3.2) - activesupport (= 6.0.3.2) - activerecord (6.0.3.2) - activemodel (= 6.0.3.2) - activesupport (= 6.0.3.2) - activesupport (6.0.3.2) + activemodel (6.0.3.3) + activesupport (= 6.0.3.3) + activerecord (6.0.3.3) + activemodel (= 6.0.3.3) + activesupport (= 6.0.3.3) + activesupport (6.0.3.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -28,8 +28,7 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.1) - backports (3.18.1) - bcrypt (3.1.15) + bcrypt (3.1.16) builder (3.2.4) capybara (3.33.0) addressable @@ -63,7 +62,7 @@ GEM multi_xml (>= 0.5.2) i18n (1.8.5) concurrent-ruby (~> 1.0) - loofah (2.6.0) + loofah (2.7.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) method_source (1.0.0) @@ -72,24 +71,24 @@ GEM mime-types-data (3.2020.0512) mini_mime (1.0.2) mini_portile2 (2.5.0) - minitest (5.14.1) + minitest (5.14.2) multi_json (1.15.0) multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) - nio4r (2.5.2) - nokogiri (1.11.0.rc2) + nio4r (2.5.3) + nokogiri (1.11.0.rc3) mini_portile2 (~> 2.5.0) open_uri_redirections (0.2.1) parallel (1.19.2) parser (2.7.1.4) ast (~> 2.4.1) pg (1.2.3) - public_suffix (4.0.5) - puma (4.3.5) + public_suffix (4.0.6) + puma (4.3.6) nio4r (~> 2.0) rack (2.2.3) - rack-protection (2.0.8.1) + rack-protection (2.1.0) rack rack-ssl (1.4.1) rack @@ -103,9 +102,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3.2) - actionpack (= 6.0.3.2) - activesupport (= 6.0.3.2) + railties (6.0.3.3) + actionpack (= 6.0.3.3) + activesupport (= 6.0.3.3) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) @@ -129,7 +128,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-support (3.9.3) - rubocop (0.89.1) + rubocop (0.90.0) parallel (~> 1.10) parser (>= 2.7.1.1) rainbow (>= 2.2.2, < 4.0) @@ -138,7 +137,7 @@ GEM rubocop-ast (>= 0.3.0, < 1.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.3.0) + rubocop-ast (0.4.0) parser (>= 2.7.1.4) ruby-progressbar (1.10.1) ruby2_keywords (0.0.2) @@ -151,27 +150,26 @@ GEM sprockets-rails tilt sax-machine (1.3.2) - sinatra (2.0.8.1) + sinatra (2.1.0) mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.8.1) + rack (~> 2.2) + rack-protection (= 2.1.0) tilt (~> 2.0) sinatra-activerecord (2.0.18) activerecord (>= 4.1) sinatra (>= 1.0) - sinatra-contrib (2.0.8.1) - backports (>= 2.8.2) + sinatra-contrib (2.1.0) multi_json mustermann (~> 1.0) - rack-protection (= 2.0.8.1) - sinatra (= 2.0.8.1) + rack-protection (= 2.1.0) + sinatra (= 2.1.0) tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-helpers (1.3.0) + sprockets-helpers (1.4.0) sprockets (>= 2.2) sprockets-rails (3.2.1) actionpack (>= 4.0) @@ -207,21 +205,21 @@ DEPENDENCIES feedjira (~> 3.1.0) httparty i18n (~> 1.8.2) - loofah (~> 2.6.0) + loofah (~> 2.7.0) nokogiri (~> 1.11.0rc2) pg (~> 1.2.2) puma (~> 4.3.0) - rack-protection (~> 2.0.7) + rack-protection (~> 2.1.0) rack-ssl (~> 1.4) rack-test (~> 1.1.0) racksh (~> 1.0) rspec (~> 3.9.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.89.1) + rubocop (~> 0.90.0) sassc-rails (~> 2.1.2) - sinatra (~> 2.0.7) + sinatra (~> 2.1.0) sinatra-activerecord (~> 2.0.14) - sinatra-contrib (~> 2.0.7) + sinatra-contrib (~> 2.1.0) sinatra-flash (~> 0.3.0) sprockets (~> 4.0.0) sprockets-helpers From 612a147dbde879389a5aba0a44ad4a4d2b6f3120 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 8 Nov 2020 00:41:32 -0700 Subject: [PATCH 54/90] Update gems and ruby version --- .ruby-version | 2 +- Gemfile | 10 +++--- Gemfile.lock | 96 +++++++++++++++++++++++++-------------------------- 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.ruby-version b/.ruby-version index bff6ce5c1..2eb2fe97a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.7.1 +ruby-2.7.2 diff --git a/Gemfile b/Gemfile index b163bacd6..3b5f6526c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,10 +1,10 @@ -ruby "2.7.1" +ruby "2.7.2" source "https://rubygems.org" group :production do gem "pg", "~> 1.2.2" - gem "puma", "~> 4.3.0" + gem "puma", "~> 5.0.4" end group :development do @@ -14,11 +14,11 @@ end group :development, :test do gem "capybara", "~> 3.33.0" - gem "faker", "~> 2.13.0" + gem "faker", "~> 2.14.0" gem "rack-test", "~> 1.1.0" - gem "rspec", "~> 3.9.0" + gem "rspec", "~> 3.10.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 0.90.0", require: false + gem "rubocop", "~> 1.2.0", require: false gem "timecop", "~> 0.9.0" end diff --git a/Gemfile.lock b/Gemfile.lock index 68d3c4198..f32facf8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.3.3) - actionview (= 6.0.3.3) - activesupport (= 6.0.3.3) + actionpack (6.0.3.4) + actionview (= 6.0.3.4) + activesupport (= 6.0.3.4) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.3.3) - activesupport (= 6.0.3.3) + actionview (6.0.3.4) + activesupport (= 6.0.3.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.3.3) - activesupport (= 6.0.3.3) - activerecord (6.0.3.3) - activemodel (= 6.0.3.3) - activesupport (= 6.0.3.3) - activesupport (6.0.3.3) + activemodel (6.0.3.4) + activesupport (= 6.0.3.4) + activerecord (6.0.3.4) + activemodel (= 6.0.3.4) + activesupport (= 6.0.3.4) + activesupport (6.0.3.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -48,7 +48,7 @@ GEM diff-lcs (1.4.4) erubi (1.9.0) execjs (2.7.0) - faker (2.13.0) + faker (2.14.0) i18n (>= 1.6, < 2) feedbag (0.10) nokogiri (~> 1.8, >= 1.8.2) @@ -68,7 +68,7 @@ GEM method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2020.0512) + mime-types-data (3.2020.1104) mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.2) @@ -76,16 +76,16 @@ GEM multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) - nio4r (2.5.3) + nio4r (2.5.4) nokogiri (1.11.0.rc3) mini_portile2 (~> 2.5.0) open_uri_redirections (0.2.1) - parallel (1.19.2) - parser (2.7.1.4) + parallel (1.20.0) + parser (2.7.2.0) ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.6) - puma (4.3.6) + puma (5.0.4) nio4r (~> 2.0) rack (2.2.3) rack-protection (2.1.0) @@ -102,43 +102,43 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3.3) - actionpack (= 6.0.3.3) - activesupport (= 6.0.3.3) + railties (6.0.3.4) + actionpack (= 6.0.3.4) + activesupport (= 6.0.3.4) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.0.0) rake (13.0.1) - regexp_parser (1.7.1) + regexp_parser (1.8.2) rexml (3.2.4) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) + rspec (3.10.0) + rspec-core (~> 3.10.0) + rspec-expectations (~> 3.10.0) + rspec-mocks (~> 3.10.0) + rspec-core (3.10.0) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-html-matchers (0.9.2) + rspec-support (~> 3.10.0) + rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.9.1) + rspec-mocks (3.10.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.3) - rubocop (0.90.0) + rspec-support (~> 3.10.0) + rspec-support (3.10.0) + rubocop (1.2.0) parallel (~> 1.10) - parser (>= 2.7.1.1) + parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.7) + regexp_parser (>= 1.8) rexml - rubocop-ast (>= 0.3.0, < 1.0) + rubocop-ast (>= 1.0.1) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.4.0) - parser (>= 2.7.1.4) + rubocop-ast (1.1.1) + parser (>= 2.7.1.5) ruby-progressbar (1.10.1) ruby2_keywords (0.0.2) sassc (2.4.0) @@ -155,7 +155,7 @@ GEM rack (~> 2.2) rack-protection (= 2.1.0) tilt (~> 2.0) - sinatra-activerecord (2.0.18) + sinatra-activerecord (2.0.21) activerecord (>= 4.1) sinatra (>= 1.0) sinatra-contrib (2.1.0) @@ -171,7 +171,7 @@ GEM rack (> 1, < 3) sprockets-helpers (1.4.0) sprockets (>= 2.2) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -180,7 +180,7 @@ GEM thread (0.2.2) thread_safe (0.3.6) tilt (2.0.10) - timecop (0.9.1) + timecop (0.9.2) tzinfo (1.2.7) thread_safe (~> 0.1) uglifier (4.2.0) @@ -189,7 +189,7 @@ GEM will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.4.0) + zeitwerk (2.4.1) PLATFORMS ruby @@ -200,7 +200,7 @@ DEPENDENCIES capybara (~> 3.33.0) delayed_job (~> 4.1.8) delayed_job_active_record (~> 4.1.4) - faker (~> 2.13.0) + faker (~> 2.14.0) feedbag (~> 0.10) feedjira (~> 3.1.0) httparty @@ -208,14 +208,14 @@ DEPENDENCIES loofah (~> 2.7.0) nokogiri (~> 1.11.0rc2) pg (~> 1.2.2) - puma (~> 4.3.0) + puma (~> 5.0.4) rack-protection (~> 2.1.0) rack-ssl (~> 1.4) rack-test (~> 1.1.0) racksh (~> 1.0) - rspec (~> 3.9.0) + rspec (~> 3.10.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 0.90.0) + rubocop (~> 1.2.0) sassc-rails (~> 2.1.2) sinatra (~> 2.1.0) sinatra-activerecord (~> 2.0.14) @@ -230,7 +230,7 @@ DEPENDENCIES will_paginate (~> 3.3.0) RUBY VERSION - ruby 2.7.1p83 + ruby 2.7.2p137 BUNDLED WITH 2.1.4 From b5331af2e9386f7d8a681888a4147b253794db3b Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 2 Dec 2020 12:58:06 -0700 Subject: [PATCH 55/90] Update gems, blocked on upgrading rubocop atm because of capybara --- Gemfile | 11 +++++------ Gemfile.lock | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Gemfile b/Gemfile index 3b5f6526c..f13f164cf 100644 --- a/Gemfile +++ b/Gemfile @@ -4,21 +4,20 @@ source "https://rubygems.org" group :production do gem "pg", "~> 1.2.2" - gem "puma", "~> 5.0.4" + gem "puma", "~> 5.1.0" end group :development do gem "sqlite3", "~> 1.4.0" # 1.4 doesn't work with rails 5.2.2 stuffs end - group :development, :test do - gem "capybara", "~> 3.33.0" - gem "faker", "~> 2.14.0" + gem "capybara", "~> 3.34.0" + gem "faker", "~> 2.15.0" gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.10.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 1.2.0", require: false + gem "rubocop", "~> 1.4.0", require: false gem "timecop", "~> 0.9.0" end @@ -31,7 +30,7 @@ gem "feedbag", "~> 0.10" gem "feedjira", "~> 3.1.0" gem "httparty" gem "i18n", "~> 1.8.2" -gem "loofah", "~> 2.7.0" +gem "loofah", "~> 2.8.0" gem "nokogiri", "~> 1.11.0rc2" gem "rack-protection", "~> 2.1.0" diff --git a/Gemfile.lock b/Gemfile.lock index f32facf8b..e8777b76d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,7 +30,7 @@ GEM ast (2.4.1) bcrypt (3.1.16) builder (3.2.4) - capybara (3.33.0) + capybara (3.34.0) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) @@ -46,14 +46,14 @@ GEM activerecord (>= 3.0, < 6.1) delayed_job (>= 3.0, < 5) diff-lcs (1.4.4) - erubi (1.9.0) + erubi (1.10.0) execjs (2.7.0) - faker (2.14.0) + faker (2.15.1) i18n (>= 1.6, < 2) - feedbag (0.10) + feedbag (0.10.1) nokogiri (~> 1.8, >= 1.8.2) open_uri_redirections (~> 0.2) - feedjira (3.1.1) + feedjira (3.1.2) loofah (>= 2.3.1) sax-machine (>= 1.0) ffi (1.13.1) @@ -62,7 +62,7 @@ GEM multi_xml (>= 0.5.2) i18n (1.8.5) concurrent-ruby (~> 1.0) - loofah (2.7.0) + loofah (2.8.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) method_source (1.0.0) @@ -80,12 +80,12 @@ GEM nokogiri (1.11.0.rc3) mini_portile2 (~> 2.5.0) open_uri_redirections (0.2.1) - parallel (1.20.0) + parallel (1.20.1) parser (2.7.2.0) ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.6) - puma (5.0.4) + puma (5.1.0) nio4r (~> 2.0) rack (2.2.3) rack-protection (2.1.0) @@ -128,16 +128,16 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.0) - rubocop (1.2.0) + rubocop (1.4.2) parallel (~> 1.10) parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8) rexml - rubocop-ast (>= 1.0.1) + rubocop-ast (>= 1.1.1) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.1.1) + rubocop-ast (1.3.0) parser (>= 2.7.1.5) ruby-progressbar (1.10.1) ruby2_keywords (0.0.2) @@ -181,7 +181,7 @@ GEM thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.2) - tzinfo (1.2.7) + tzinfo (1.2.8) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) @@ -189,7 +189,7 @@ GEM will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.4.1) + zeitwerk (2.4.2) PLATFORMS ruby @@ -197,25 +197,25 @@ PLATFORMS DEPENDENCIES activerecord (~> 6.0.3.1) bcrypt (~> 3.1.13) - capybara (~> 3.33.0) + capybara (~> 3.34.0) delayed_job (~> 4.1.8) delayed_job_active_record (~> 4.1.4) - faker (~> 2.14.0) + faker (~> 2.15.0) feedbag (~> 0.10) feedjira (~> 3.1.0) httparty i18n (~> 1.8.2) - loofah (~> 2.7.0) + loofah (~> 2.8.0) nokogiri (~> 1.11.0rc2) pg (~> 1.2.2) - puma (~> 5.0.4) + puma (~> 5.1.0) rack-protection (~> 2.1.0) rack-ssl (~> 1.4) rack-test (~> 1.1.0) racksh (~> 1.0) rspec (~> 3.10.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 1.2.0) + rubocop (~> 1.4.0) sassc-rails (~> 2.1.2) sinatra (~> 2.1.0) sinatra-activerecord (~> 2.0.14) From 617a9c3f684a3f28f0b3c675940c79ecc860ce01 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sat, 26 Dec 2020 23:19:18 -0700 Subject: [PATCH 56/90] Update gems and update ruby to 3.0 - Specify the database adapter in development and production environments via inheritance - Pin to 6.0.3.4 of activerecord - there is currently an incompetibility for 6.1 with sinatra-activerecord - Pin to 1.10.10 of nokogiri - bundler was picking up the RC, which is prebuilt for ruby 2.x but not 3.0 yet. --- .ruby-version | 2 +- Gemfile | 10 +++++----- Gemfile.lock | 42 +++++++++++++++++++++--------------------- config/database.yml | 10 ++++++---- 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.ruby-version b/.ruby-version index 2eb2fe97a..85588bebf 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.7.2 +ruby-3.0.0 diff --git a/Gemfile b/Gemfile index f13f164cf..d50ab1498 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "2.7.2" +ruby "3.0.0" source "https://rubygems.org" @@ -17,11 +17,11 @@ group :development, :test do gem "rack-test", "~> 1.1.0" gem "rspec", "~> 3.10.0" gem "rspec-html-matchers", "~> 0.9.1" - gem "rubocop", "~> 1.4.0", require: false + gem "rubocop", ">= 1.4.0", require: false gem "timecop", "~> 0.9.0" end -gem "activerecord", "~> 6.0.3.1" +gem "activerecord", "6.0.3.4" gem "bcrypt", "~> 3.1.13" gem "delayed_job", "~> 4.1.8" gem "delayed_job_active_record", "~> 4.1.4" @@ -32,14 +32,14 @@ gem "httparty" gem "i18n", "~> 1.8.2" gem "loofah", "~> 2.8.0" -gem "nokogiri", "~> 1.11.0rc2" +gem "nokogiri", "1.10.10" gem "rack-protection", "~> 2.1.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" gem "sassc-rails", "~> 2.1.2" gem "sinatra", "~> 2.1.0" -gem "sinatra-activerecord", "~> 2.0.14" +gem "sinatra-activerecord", "~> 2.0.21" gem "sinatra-contrib", "~> 2.1.0" gem "sinatra-flash", "~> 0.3.0" diff --git a/Gemfile.lock b/Gemfile.lock index e8777b76d..71f193f46 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,10 +40,10 @@ GEM xpath (~> 3.2) concurrent-ruby (1.1.7) crass (1.0.6) - delayed_job (4.1.8) - activesupport (>= 3.0, < 6.1) - delayed_job_active_record (4.1.4) - activerecord (>= 3.0, < 6.1) + delayed_job (4.1.9) + activesupport (>= 3.0, < 6.2) + delayed_job_active_record (4.1.5) + activerecord (>= 3.0, < 6.2) delayed_job (>= 3.0, < 5) diff-lcs (1.4.4) erubi (1.10.0) @@ -56,7 +56,7 @@ GEM feedjira (3.1.2) loofah (>= 2.3.1) sax-machine (>= 1.0) - ffi (1.13.1) + ffi (1.14.2) httparty (0.18.1) mime-types (~> 3.0) multi_xml (>= 0.5.2) @@ -70,22 +70,22 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2020.1104) mini_mime (1.0.2) - mini_portile2 (2.5.0) + mini_portile2 (2.4.0) minitest (5.14.2) multi_json (1.15.0) multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.4) - nokogiri (1.11.0.rc3) - mini_portile2 (~> 2.5.0) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) open_uri_redirections (0.2.1) parallel (1.20.1) - parser (2.7.2.0) + parser (3.0.0.0) ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.6) - puma (5.1.0) + puma (5.1.1) nio4r (~> 2.0) rack (2.2.3) rack-protection (2.1.0) @@ -109,7 +109,7 @@ GEM rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) rainbow (3.0.0) - rake (13.0.1) + rake (13.0.3) regexp_parser (1.8.2) rexml (3.2.4) rspec (3.10.0) @@ -128,13 +128,13 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.0) - rubocop (1.4.2) + rubocop (1.7.0) parallel (~> 1.10) parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8) + regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.1.1) + rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) rubocop-ast (1.3.0) @@ -181,7 +181,7 @@ GEM thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.2) - tzinfo (1.2.8) + tzinfo (1.2.9) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) @@ -195,7 +195,7 @@ PLATFORMS ruby DEPENDENCIES - activerecord (~> 6.0.3.1) + activerecord (= 6.0.3.4) bcrypt (~> 3.1.13) capybara (~> 3.34.0) delayed_job (~> 4.1.8) @@ -206,7 +206,7 @@ DEPENDENCIES httparty i18n (~> 1.8.2) loofah (~> 2.8.0) - nokogiri (~> 1.11.0rc2) + nokogiri (= 1.10.10) pg (~> 1.2.2) puma (~> 5.1.0) rack-protection (~> 2.1.0) @@ -215,10 +215,10 @@ DEPENDENCIES racksh (~> 1.0) rspec (~> 3.10.0) rspec-html-matchers (~> 0.9.1) - rubocop (~> 1.4.0) + rubocop (>= 1.4.0) sassc-rails (~> 2.1.2) sinatra (~> 2.1.0) - sinatra-activerecord (~> 2.0.14) + sinatra-activerecord (~> 2.0.21) sinatra-contrib (~> 2.1.0) sinatra-flash (~> 0.3.0) sprockets (~> 4.0.0) @@ -230,7 +230,7 @@ DEPENDENCIES will_paginate (~> 3.3.0) RUBY VERSION - ruby 2.7.2p137 + ruby 3.0.0p0 BUNDLED WITH - 2.1.4 + 2.2.3 diff --git a/config/database.yml b/config/database.yml index f1c394139..0043ffdc5 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,14 +1,16 @@ -development: +default: &default adapter: postgresql - database: stringer_dev encoding: unicode pool: 5 +development: + <<: *default + database: stringer_dev + test: adapter: sqlite3 database: db/stringer_test.sqlite production: + <<: *default url: <%= ENV["DATABASE_URL"] %> - encoding: unicode - pool: 5 From af5683666df088589cf9e13372ad0cbab2b1936a Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 25 Feb 2021 01:01:44 -0700 Subject: [PATCH 57/90] Allow a nokogiri bump --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 93056af68..770b39963 100644 --- a/Gemfile +++ b/Gemfile @@ -34,7 +34,7 @@ gem "httparty" gem "i18n", "~> 1.8.2" gem "loofah", "~> 2.9.0" -gem "nokogiri", "1.10.10" +gem "nokogiri", ">= 1.10.10", "< 2" gem "rack-protection", "~> 2.1.0" gem "rack-ssl", "~> 1.4" gem "racksh", "~> 1.0" diff --git a/Gemfile.lock b/Gemfile.lock index e22e5e863..6417e9e63 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,15 +78,14 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2021.0212) mini_mime (1.0.2) - mini_portile2 (2.4.0) minitest (5.14.4) multi_json (1.15.0) multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.5) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.1-x86_64-darwin) + racc (~> 1.4) open_uri_redirections (0.2.1) parallel (1.20.1) parser (3.0.0.0) @@ -95,6 +94,7 @@ GEM public_suffix (4.0.6) puma (5.2.1) nio4r (~> 2.0) + racc (1.5.2) rack (2.2.3) rack-protection (2.1.0) rack @@ -225,7 +225,7 @@ DEPENDENCIES httparty i18n (~> 1.8.2) loofah (~> 2.9.0) - nokogiri (= 1.10.10) + nokogiri (>= 1.10.10, < 2) pg (~> 1.2.2) puma (~> 5.2.1) rack-protection (~> 2.1.0) From b1f3732f9c5c61c9df29f69f971a6aa911113e76 Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 25 Feb 2021 01:03:27 -0700 Subject: [PATCH 58/90] add x86_64-linux to lockfile --- Gemfile.lock | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 6417e9e63..f00cbf92a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -86,6 +86,8 @@ GEM nio4r (2.5.5) nokogiri (1.11.1-x86_64-darwin) racc (~> 1.4) + nokogiri (1.11.1-x86_64-linux) + racc (~> 1.4) open_uri_redirections (0.2.1) parallel (1.20.1) parser (3.0.0.0) @@ -211,6 +213,7 @@ GEM PLATFORMS x86_64-darwin-20 + x86_64-linux DEPENDENCIES activerecord (= 6.0.3.4) From 25e7f56f037c81ee21584b3b4142c804be23983f Mon Sep 17 00:00:00 2001 From: David Waite Date: Thu, 25 Feb 2021 01:55:27 -0700 Subject: [PATCH 59/90] Update to latest activerecord --- Gemfile | 2 +- Gemfile.lock | 47 +++++++++++++++++++++++------------------------ 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/Gemfile b/Gemfile index 770b39963..a2168f2e9 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ group :development, :test do gem "timecop", "~> 0.9.0" end -gem "activerecord", "6.0.3.4" +gem "activerecord", "~> 6.1" gem "bcrypt", "~> 3.1.13" gem "delayed_job", "~> 4.1.8" gem "delayed_job_active_record", "~> 4.1.4" diff --git a/Gemfile.lock b/Gemfile.lock index f00cbf92a..ee3666c7c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,30 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.3.4) - actionview (= 6.0.3.4) - activesupport (= 6.0.3.4) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.3) + actionview (= 6.1.3) + activesupport (= 6.1.3) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.3.4) - activesupport (= 6.0.3.4) + actionview (6.1.3) + activesupport (= 6.1.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.3.4) - activesupport (= 6.0.3.4) - activerecord (6.0.3.4) - activemodel (= 6.0.3.4) - activesupport (= 6.0.3.4) - activesupport (6.0.3.4) + activemodel (6.1.3) + activesupport (= 6.1.3) + activerecord (6.1.3) + activemodel (= 6.1.3) + activesupport (= 6.1.3) + activesupport (6.1.3) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.2) @@ -112,12 +112,12 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3.4) - actionpack (= 6.0.3.4) - activesupport (= 6.0.3.4) + railties (6.1.3) + actionpack (= 6.1.3) + activesupport (= 6.1.3) method_source rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) + thor (~> 1.0) rainbow (3.0.0) rake (13.0.3) regexp_parser (2.1.1) @@ -196,13 +196,12 @@ GEM tins (~> 1.0) thor (1.1.0) thread (0.2.2) - thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.4) tins (1.28.0) sync - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (2.0.0) @@ -216,7 +215,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - activerecord (= 6.0.3.4) + activerecord (~> 6.1) bcrypt (~> 3.1.13) capybara (~> 3.35.2) coveralls (~> 0.7) From dbf23ccd3c92049848eb23204ba3cf10cf9e06e0 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 7 Jun 2021 04:12:04 -0600 Subject: [PATCH 60/90] add x86_64-linux to lockfile --- Gemfile.lock | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 71caa7ad5..468a51307 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -88,6 +88,8 @@ GEM nio4r (2.5.7) nokogiri (1.11.7-x86_64-darwin) racc (~> 1.4) + nokogiri (1.11.7-x86_64-linux) + racc (~> 1.4) open_uri_redirections (0.2.1) parallel (1.20.1) parser (3.0.1.1) @@ -231,6 +233,7 @@ GEM PLATFORMS x86_64-darwin-20 + x86_64-linux DEPENDENCIES activerecord From 7dd7f4daa48b06d891d4f285b86caa3f005a3752 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 7 Jun 2021 08:22:31 -0600 Subject: [PATCH 61/90] Bump Ruby version to 3.0.1 --- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ruby-version b/.ruby-version index 85588bebf..45418de72 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.0.0 +ruby-3.0.1 diff --git a/Gemfile b/Gemfile index 2f85b7218..ea4b7742a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "3.0.0" +ruby "3.0.1" source "https://rubygems.org" diff --git a/Gemfile.lock b/Gemfile.lock index 468a51307..54f33bc4a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -281,7 +281,7 @@ DEPENDENCIES will_paginate RUBY VERSION - ruby 3.0.0p0 + ruby 3.0.1p64 BUNDLED WITH 2.2.19 From c23e757a314819a3b250edeb0e8a5681373270ff Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 8 Jun 2021 23:52:44 -0600 Subject: [PATCH 62/90] update dependencies --- Gemfile | 5 ++-- Gemfile.lock | 68 +++++++++++++++++++++++++--------------------------- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/Gemfile b/Gemfile index ea4b7742a..396d25868 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,6 @@ source "https://rubygems.org" gem "sassc" gem "sassc-rails" - group :production do gem "pg" gem "puma" @@ -28,7 +27,7 @@ group :development, :test do gem "rspec" gem "rspec-html-matchers" gem "shotgun" - gem "simplecov", "~>0.16.1" + gem "simplecov" gem "timecop" end @@ -61,4 +60,4 @@ gem "thread" gem "uglifier" gem "will_paginate" -gem "webrick", "~> 1.7" +gem "webrick" diff --git a/Gemfile.lock b/Gemfile.lock index 54f33bc4a..87d657d9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,30 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.0.3.7) - actionview (= 6.0.3.7) - activesupport (= 6.0.3.7) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.3.2) + actionview (= 6.1.3.2) + activesupport (= 6.1.3.2) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.0.3.7) - activesupport (= 6.0.3.7) + actionview (6.1.3.2) + activesupport (= 6.1.3.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.0.3.7) - activesupport (= 6.0.3.7) - activerecord (6.0.3.7) - activemodel (= 6.0.3.7) - activesupport (= 6.0.3.7) - activesupport (6.0.3.7) + activemodel (6.1.3.2) + activesupport (= 6.1.3.2) + activerecord (6.1.3.2) + activemodel (= 6.1.3.2) + activesupport (= 6.1.3.2) + activesupport (6.1.3.2) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.2) @@ -41,11 +41,10 @@ GEM xpath (~> 3.2) coderay (1.1.3) concurrent-ruby (1.1.9) - coveralls_reborn (0.12.0) - json (~> 2.1) - simplecov (~> 0.16.1) + coveralls_reborn (0.22.0) + simplecov (>= 0.18.1, < 0.22.0) term-ansicolor (~> 1.6) - thor (~> 0.20.0) + thor (>= 0.20.3, < 2.0) tins (~> 1.16) crass (1.0.6) delayed_job (4.1.9) @@ -71,7 +70,6 @@ GEM multi_xml (>= 0.5.2) i18n (1.8.10) concurrent-ruby (~> 1.0) - json (2.5.1) loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -120,12 +118,12 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3.7) - actionpack (= 6.0.3.7) - activesupport (= 6.0.3.7) + railties (6.1.3.2) + actionpack (= 6.1.3.2) + activesupport (= 6.1.3.2) method_source rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) + thor (~> 1.0) rainbow (3.0.0) rake (13.0.3) regexp_parser (2.1.1) @@ -179,11 +177,12 @@ GEM sax-machine (1.3.2) shotgun (0.9.2) rack (>= 1.0) - simplecov (0.16.1) + simplecov (0.21.2) docile (~> 1.1) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.3) sinatra (2.1.0) mustermann (~> 1.0) rack (~> 2.2) @@ -213,15 +212,14 @@ GEM sync (0.5.0) term-ansicolor (1.7.1) tins (~> 1.0) - thor (0.20.3) + thor (1.1.0) thread (0.2.2) - thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.4) tins (1.29.1) sync - tzinfo (1.2.9) - thread_safe (~> 0.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (2.0.0) @@ -266,7 +264,7 @@ DEPENDENCIES sassc sassc-rails shotgun - simplecov (~> 0.16.1) + simplecov sinatra sinatra-activerecord sinatra-contrib @@ -277,7 +275,7 @@ DEPENDENCIES thread timecop uglifier - webrick (~> 1.7) + webrick will_paginate RUBY VERSION From 2963e497aaa3ea2854830e70a297fc8736c3e484 Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 16 Jun 2021 02:32:43 -0600 Subject: [PATCH 63/90] Update to latest gems; remove pry-byebug since its not being used currently --- Gemfile | 1 - Gemfile.lock | 13 ++----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 396d25868..751c9de68 100644 --- a/Gemfile +++ b/Gemfile @@ -22,7 +22,6 @@ group :development, :test do gem "capybara" gem "coveralls_reborn", require: false gem "faker" - gem "pry-byebug" gem "rack-test" gem "rspec" gem "rspec-html-matchers" diff --git a/Gemfile.lock b/Gemfile.lock index 87d657d9a..86fe1a2e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -30,7 +30,6 @@ GEM ast (2.4.2) bcrypt (3.1.16) builder (3.2.4) - byebug (11.1.3) capybara (3.35.3) addressable mini_mime (>= 0.1.3) @@ -39,7 +38,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - coderay (1.1.3) concurrent-ruby (1.1.9) coveralls_reborn (0.22.0) simplecov (>= 0.18.1, < 0.22.0) @@ -93,12 +91,6 @@ GEM parser (3.0.1.1) ast (~> 2.4.1) pg (1.2.3) - pry (0.13.1) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.9.0) - byebug (~> 11.0) - pry (~> 0.13.0) public_suffix (4.0.6) puma (5.3.2) nio4r (~> 2.0) @@ -144,7 +136,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.2) - rubocop (1.16.0) + rubocop (1.17.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -161,7 +153,7 @@ GEM rubocop (>= 1.7.0, < 2.0) rubocop-rake (0.5.1) rubocop - rubocop-rspec (2.3.0) + rubocop-rspec (2.4.0) rubocop (~> 1.0) rubocop-ast (>= 1.1.0) ruby-progressbar (1.11.0) @@ -248,7 +240,6 @@ DEPENDENCIES loofah nokogiri pg - pry-byebug puma rack-protection rack-ssl From aeca842c64abab28abf5632863a02be2381f2397 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 17 Sep 2021 12:08:40 -0600 Subject: [PATCH 64/90] Update dependencies --- Gemfile | 2 +- Gemfile.lock | 85 ++++++++++++++++++++++++++-------------------------- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/Gemfile b/Gemfile index 751c9de68..1af9a02c9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "3.0.1" +ruby "3.0.2" source "https://rubygems.org" diff --git a/Gemfile.lock b/Gemfile.lock index d7bafca0c..764adb886 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (6.1.3.2) - actionview (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionpack (6.1.4.1) + actionview (= 6.1.4.1) + activesupport (= 6.1.4.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.1.3.2) - activesupport (= 6.1.3.2) + actionview (6.1.4.1) + activesupport (= 6.1.4.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.1.3.2) - activesupport (= 6.1.3.2) - activerecord (6.1.3.2) - activemodel (= 6.1.3.2) - activesupport (= 6.1.3.2) - activesupport (6.1.3.2) + activemodel (6.1.4.1) + activesupport (= 6.1.4.1) + activerecord (6.1.4.1) + activemodel (= 6.1.4.1) + activesupport (= 6.1.4.1) + activesupport (6.1.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -39,7 +39,7 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) concurrent-ruby (1.1.9) - coveralls_reborn (0.22.0) + coveralls_reborn (0.23.0) simplecov (>= 0.18.1, < 0.22.0) term-ansicolor (~> 1.6) thor (>= 0.20.3, < 2.0) @@ -54,45 +54,45 @@ GEM docile (1.4.0) erubi (1.10.0) execjs (2.8.1) - faker (2.18.0) + faker (2.19.0) i18n (>= 1.6, < 2) feedbag (0.10.1) nokogiri (~> 1.8, >= 1.8.2) open_uri_redirections (~> 0.2) - feedjira (3.1.2) + feedjira (3.2.0) loofah (>= 2.3.1) sax-machine (>= 1.0) - ffi (1.15.1) - httparty (0.18.1) + ffi (1.15.4) + httparty (0.19.0) mime-types (~> 3.0) multi_xml (>= 0.5.2) i18n (1.8.10) concurrent-ruby (~> 1.0) - loofah (2.10.0) + loofah (2.12.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) method_source (1.0.0) mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2021.0225) - mini_mime (1.1.0) + mime-types-data (3.2021.0901) + mini_mime (1.1.1) minitest (5.14.4) multi_json (1.15.0) multi_xml (0.6.0) mustermann (1.1.1) ruby2_keywords (~> 0.0.1) - nio4r (2.5.7) - nokogiri (1.11.7-x86_64-darwin) + nio4r (2.5.8) + nokogiri (1.12.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.11.7-x86_64-linux) + nokogiri (1.12.4-x86_64-linux) racc (~> 1.4) open_uri_redirections (0.2.1) - parallel (1.20.1) - parser (3.0.1.1) + parallel (1.21.0) + parser (3.0.2.0) ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.6) - puma (5.3.2) + puma (5.4.0) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) @@ -108,16 +108,16 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.3.2) - actionpack (= 6.1.3.2) - activesupport (= 6.1.3.2) + railties (6.1.4.1) + actionpack (= 6.1.4.1) + activesupport (= 6.1.4.1) method_source - rake (>= 0.8.7) + rake (>= 0.13) thor (~> 1.0) rainbow (3.0.0) - rake (13.0.3) + rake (13.0.6) regexp_parser (2.1.1) rexml (3.2.5) rspec (3.10.0) @@ -136,28 +136,28 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.2) - rubocop (1.17.0) + rubocop (1.21.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.7.0, < 2.0) + rubocop-ast (>= 1.9.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.7.0) + rubocop-ast (1.11.0) parser (>= 3.0.1.1) - rubocop-rails (2.10.1) + rubocop-rails (2.12.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) - rubocop-rake (0.5.1) - rubocop + rubocop-rake (0.6.0) + rubocop (~> 1.0) rubocop-rspec (2.4.0) rubocop (~> 1.0) rubocop-ast (>= 1.1.0) ruby-progressbar (1.11.0) - ruby2_keywords (0.0.4) + ruby2_keywords (0.0.5) sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) @@ -214,15 +214,16 @@ GEM concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (2.0.0) + unicode-display_width (2.1.0) webrick (1.7.0) - will_paginate (3.3.0) + will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.4.2) PLATFORMS x86_64-darwin-20 + x86_64-darwin-21 x86_64-linux DEPENDENCIES @@ -270,7 +271,7 @@ DEPENDENCIES will_paginate RUBY VERSION - ruby 3.0.1p64 + ruby 3.0.2p107 BUNDLED WITH - 2.2.19 + 2.2.27 From d393d1998c7c2fc49a05a06de7c26e439fb475dd Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 17 Sep 2021 12:09:19 -0600 Subject: [PATCH 65/90] Correct tests to not pull various tasks to the 'test' db config --- config/database.yml | 2 +- spec/spec_helper.rb | 2 -- spec/support/active_record.rb | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/database.yml b/config/database.yml index db07a2057..db5853361 100644 --- a/config/database.yml +++ b/config/database.yml @@ -4,7 +4,7 @@ default: &default pool: 5 development: - <<: *default + adapter: sqlite3 database: stringer_dev test: diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 28707b303..4d88eb8fd 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,3 @@ -ENV["RACK_ENV"] = "test" - require "capybara" require "capybara/server" require "rspec" diff --git a/spec/support/active_record.rb b/spec/support/active_record.rb index bac6a0e77..985fdcba4 100644 --- a/spec/support/active_record.rb +++ b/spec/support/active_record.rb @@ -1,7 +1,8 @@ require "active_record" db_config = YAML.safe_load(File.read("config/database.yml"), aliases: true) -ActiveRecord::Base.establish_connection(db_config["test"]) +rack_env = ENV["RACK_ENV"] || "test" +ActiveRecord::Base.establish_connection(db_config[rack_env]) ActiveRecord::Base.logger = Logger.new("log/test.log") def need_to_migrate? From 16eee62fe66ba27cf38ae1e02713f40bad4671de Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 24 Sep 2021 14:51:06 -0600 Subject: [PATCH 66/90] Small version bump --- .ruby-version | 2 +- Gemfile.lock | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.ruby-version b/.ruby-version index 45418de72..4efbd8f75 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.0.1 +ruby-3.0.2 diff --git a/Gemfile.lock b/Gemfile.lock index 764adb886..6667ac3aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,7 +92,7 @@ GEM ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.6) - puma (5.4.0) + puma (5.5.0) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) @@ -153,9 +153,8 @@ GEM rubocop (>= 1.7.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.4.0) - rubocop (~> 1.0) - rubocop-ast (>= 1.1.0) + rubocop-rspec (2.5.0) + rubocop (~> 1.19) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) sassc (2.4.0) @@ -274,4 +273,4 @@ RUBY VERSION ruby 3.0.2p107 BUNDLED WITH - 2.2.27 + 2.2.28 From 9391c29e1c3a55d0c519d1c231fc5e15dbdaa829 Mon Sep 17 00:00:00 2001 From: David Waite Date: Tue, 30 Nov 2021 22:24:41 -0500 Subject: [PATCH 67/90] Update Ruby version and dependencies --- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 23 +++++++++++++---------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.ruby-version b/.ruby-version index 4efbd8f75..e76033ba6 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.0.2 +ruby-3.0.3 diff --git a/Gemfile b/Gemfile index 1af9a02c9..5bda051e3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "3.0.2" +ruby "3.0.3" source "https://rubygems.org" diff --git a/Gemfile.lock b/Gemfile.lock index f722deeae..6ed7dc8a6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,7 +40,7 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) concurrent-ruby (1.1.9) - coveralls_reborn (0.23.0) + coveralls_reborn (0.23.1) simplecov (>= 0.18.1, < 0.22.0) term-ansicolor (~> 1.6) thor (>= 0.20.3, < 2.0) @@ -74,9 +74,9 @@ GEM nokogiri (>= 1.5.9) matrix (0.4.2) method_source (1.0.0) - mime-types (3.3.1) + mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2021.0901) + mime-types-data (3.2021.1115) mini_mime (1.1.2) minitest (5.14.4) multi_json (1.15.0) @@ -84,13 +84,15 @@ GEM mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) + nokogiri (1.12.5-arm64-darwin) + racc (~> 1.4) nokogiri (1.12.5-x86_64-darwin) racc (~> 1.4) nokogiri (1.12.5-x86_64-linux) racc (~> 1.4) open_uri_redirections (0.2.1) parallel (1.21.0) - parser (3.0.2.0) + parser (3.0.3.1) ast (~> 2.4.1) pg (1.2.3) public_suffix (4.0.6) @@ -138,7 +140,7 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-support (3.10.3) - rubocop (1.22.3) + rubocop (1.23.0) parallel (~> 1.10) parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) @@ -197,9 +199,9 @@ GEM rack (> 1, < 3) sprockets-helpers (1.4.0) sprockets (>= 2.2) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.1) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.4.2) sync (0.5.0) @@ -223,6 +225,7 @@ GEM zeitwerk (2.5.1) PLATFORMS + arm64-darwin-21 x86_64-darwin-21 x86_64-linux @@ -271,7 +274,7 @@ DEPENDENCIES will_paginate RUBY VERSION - ruby 3.0.2p107 + ruby 3.0.3p157 BUNDLED WITH - 2.2.30 + 2.2.32 From ead88858d2ec24fe44439a7be0f55fa9904f5734 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 7 Jan 2022 12:18:52 -0700 Subject: [PATCH 68/90] Temporary point to branches to add rails 7 support --- Gemfile | 4 ++-- Gemfile.lock | 60 +++++++++++++++++++++++++++++++--------------------- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/Gemfile b/Gemfile index d4db498e8..a7ec613c0 100644 --- a/Gemfile +++ b/Gemfile @@ -32,8 +32,8 @@ end gem "activerecord" gem "bcrypt" -gem "delayed_job" -gem "delayed_job_active_record" +gem "delayed_job", git: "https://github.com/willnet/delayed_job/", branch: "rails7" +gem "delayed_job_active_record", git: "https://github.com/willnet/delayed_job_active_record", branch: "rails7-for-upstream" gem "feedbag" gem "feedjira" diff --git a/Gemfile.lock b/Gemfile.lock index ef4d234cb..57e7c5fab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,46 @@ +GIT + remote: https://github.com/willnet/delayed_job/ + revision: 562a46064fc6e7a765acf8b76c7aa2c7936ecaac + branch: rails7 + specs: + delayed_job (4.1.9) + activesupport (>= 3.0, < 7.1) + +GIT + remote: https://github.com/willnet/delayed_job_active_record + revision: 3715b87c5e92470310d09d1f8d46a285b77a60c2 + branch: rails7-for-upstream + specs: + delayed_job_active_record (4.1.6) + activerecord (>= 3.0, < 7.1) + delayed_job (>= 3.0, < 5) + GEM remote: https://rubygems.org/ specs: - actionpack (6.1.4.4) - actionview (= 6.1.4.4) - activesupport (= 6.1.4.4) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.1) + actionview (= 7.0.1) + activesupport (= 7.0.1) + rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (6.1.4.4) - activesupport (= 6.1.4.4) + actionview (7.0.1) + activesupport (= 7.0.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (6.1.4.4) - activesupport (= 6.1.4.4) - activerecord (6.1.4.4) - activemodel (= 6.1.4.4) - activesupport (= 6.1.4.4) - activesupport (6.1.4.4) + activemodel (7.0.1) + activesupport (= 7.0.1) + activerecord (7.0.1) + activemodel (= 7.0.1) + activesupport (= 7.0.1) + activesupport (7.0.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.2) @@ -46,11 +62,6 @@ GEM thor (>= 0.20.3, < 2.0) tins (~> 1.16) crass (1.0.6) - delayed_job (4.1.9) - activesupport (>= 3.0, < 6.2) - delayed_job_active_record (4.1.6) - activerecord (>= 3.0, < 6.2) - delayed_job (>= 3.0, < 5) diff-lcs (1.5.0) docile (1.4.0) erubi (1.10.0) @@ -112,12 +123,13 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.4) - actionpack (= 6.1.4.4) - activesupport (= 6.1.4.4) + railties (7.0.1) + actionpack (= 7.0.1) + activesupport (= 7.0.1) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) rainbow (3.0.0) rake (13.0.6) regexp_parser (2.2.0) @@ -231,8 +243,8 @@ DEPENDENCIES bcrypt capybara coveralls_reborn - delayed_job - delayed_job_active_record + delayed_job! + delayed_job_active_record! faker feedbag feedjira From c9beec8627f227a4989125b9daf2eb665d6f4e02 Mon Sep 17 00:00:00 2001 From: David Waite Date: Wed, 12 Jan 2022 01:08:35 -0700 Subject: [PATCH 69/90] Update dependencies --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 57e7c5fab..460504b4f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -74,7 +74,7 @@ GEM feedjira (3.2.1) loofah (>= 2.3.1) sax-machine (>= 1.0) - ffi (1.15.4) + ffi (1.15.5) httparty (0.20.0) mime-types (~> 3.0) multi_xml (>= 0.5.2) @@ -130,7 +130,7 @@ GEM rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) - rainbow (3.0.0) + rainbow (3.1.1) rake (13.0.6) regexp_parser (2.2.0) rexml (3.2.5) @@ -161,7 +161,7 @@ GEM unicode-display_width (>= 1.4.0, < 3.0) rubocop-ast (1.15.1) parser (>= 3.0.1.1) - rubocop-rails (2.13.0) + rubocop-rails (2.13.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) @@ -221,7 +221,7 @@ GEM thread (0.2.2) tilt (2.0.10) timecop (0.9.4) - tins (1.30.0) + tins (1.31.0) sync tzinfo (2.0.4) concurrent-ruby (~> 1.0) From 1f8dbc77b36d8ece28f8512e758c03dfe04f2de2 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 21 Mar 2022 22:11:02 -0600 Subject: [PATCH 70/90] update dependencies (to release versions) --- .ruby-version | 2 +- Gemfile | 6 +-- Gemfile.lock | 140 +++++++++++++++++++++++--------------------------- 3 files changed, 68 insertions(+), 80 deletions(-) diff --git a/.ruby-version b/.ruby-version index 872e12081..2a4974697 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-3.1.0 +ruby-3.1.1 diff --git a/Gemfile b/Gemfile index a7ec613c0..778e24d4a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "3.1.0" +ruby "3.1.1" source "https://rubygems.org" @@ -32,8 +32,8 @@ end gem "activerecord" gem "bcrypt" -gem "delayed_job", git: "https://github.com/willnet/delayed_job/", branch: "rails7" -gem "delayed_job_active_record", git: "https://github.com/willnet/delayed_job_active_record", branch: "rails7-for-upstream" +gem "delayed_job" +gem "delayed_job_active_record" gem "feedbag" gem "feedjira" diff --git a/Gemfile.lock b/Gemfile.lock index 460504b4f..47734f617 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,42 +1,25 @@ -GIT - remote: https://github.com/willnet/delayed_job/ - revision: 562a46064fc6e7a765acf8b76c7aa2c7936ecaac - branch: rails7 - specs: - delayed_job (4.1.9) - activesupport (>= 3.0, < 7.1) - -GIT - remote: https://github.com/willnet/delayed_job_active_record - revision: 3715b87c5e92470310d09d1f8d46a285b77a60c2 - branch: rails7-for-upstream - specs: - delayed_job_active_record (4.1.6) - activerecord (>= 3.0, < 7.1) - delayed_job (>= 3.0, < 5) - GEM remote: https://rubygems.org/ specs: - actionpack (7.0.1) - actionview (= 7.0.1) - activesupport (= 7.0.1) + actionpack (7.0.2.3) + actionview (= 7.0.2.3) + activesupport (= 7.0.2.3) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.1) - activesupport (= 7.0.1) + actionview (7.0.2.3) + activesupport (= 7.0.2.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (7.0.1) - activesupport (= 7.0.1) - activerecord (7.0.1) - activemodel (= 7.0.1) - activesupport (= 7.0.1) - activesupport (7.0.1) + activemodel (7.0.2.3) + activesupport (= 7.0.2.3) + activerecord (7.0.2.3) + activemodel (= 7.0.2.3) + activesupport (= 7.0.2.3) + activesupport (7.0.2.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -44,7 +27,7 @@ GEM addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) ast (2.4.2) - bcrypt (3.1.16) + bcrypt (3.1.17) builder (3.2.4) capybara (3.36.0) addressable @@ -55,19 +38,24 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - concurrent-ruby (1.1.9) - coveralls_reborn (0.23.1) + concurrent-ruby (1.1.10) + coveralls_reborn (0.24.0) simplecov (>= 0.18.1, < 0.22.0) term-ansicolor (~> 1.6) thor (>= 0.20.3, < 2.0) tins (~> 1.16) crass (1.0.6) + delayed_job (4.1.10) + activesupport (>= 3.0, < 8.0) + delayed_job_active_record (4.1.7) + activerecord (>= 3.0, < 8.0) + delayed_job (>= 3.0, < 5) diff-lcs (1.5.0) docile (1.4.0) erubi (1.10.0) execjs (2.8.1) - faker (2.19.0) - i18n (>= 1.6, < 2) + faker (2.20.0) + i18n (>= 1.8.11, < 2) feedbag (0.10.1) nokogiri (~> 1.8, >= 1.8.2) open_uri_redirections (~> 0.2) @@ -78,9 +66,9 @@ GEM httparty (0.20.0) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.8.11) + i18n (1.10.0) concurrent-ruby (~> 1.0) - loofah (2.13.0) + loofah (2.15.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) matrix (0.4.2) @@ -95,21 +83,21 @@ GEM mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) - nokogiri (1.13.0-arm64-darwin) + nokogiri (1.13.3-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.0-x86_64-linux) + nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) open_uri_redirections (0.2.1) - parallel (1.21.0) - parser (3.1.0.0) + parallel (1.22.0) + parser (3.1.1.0) ast (~> 2.4.1) - pg (1.2.3) + pg (1.3.4) public_suffix (4.0.6) - puma (5.5.2) + puma (5.6.2) nio4r (~> 2.0) racc (1.6.0) rack (2.2.3) - rack-protection (2.1.0) + rack-protection (2.2.0) rack rack-ssl (1.4.1) rack @@ -123,51 +111,51 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (7.0.1) - actionpack (= 7.0.1) - activesupport (= 7.0.1) + railties (7.0.2.3) + actionpack (= 7.0.2.3) + activesupport (= 7.0.2.3) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.2.0) + regexp_parser (2.2.1) rexml (3.2.5) - 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) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) + rspec-support (~> 3.11.0) rspec-html-matchers (0.9.4) nokogiri (~> 1) rspec (>= 3.0.0.a, < 4) - rspec-mocks (3.10.2) + rspec-mocks (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-support (3.10.3) - rubocop (1.24.1) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) + rubocop (1.26.0) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.15.1, < 2.0) + rubocop-ast (>= 1.16.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) - parser (>= 3.0.1.1) - rubocop-rails (2.13.1) + rubocop-ast (1.16.0) + parser (>= 3.1.1.0) + rubocop-rails (2.14.2) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.7.0) + rubocop-rspec (2.9.0) rubocop (~> 1.19) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) @@ -187,24 +175,24 @@ GEM simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) - simplecov_json_formatter (0.1.3) - sinatra (2.1.0) + simplecov_json_formatter (0.1.4) + sinatra (2.2.0) mustermann (~> 1.0) rack (~> 2.2) - rack-protection (= 2.1.0) + rack-protection (= 2.2.0) tilt (~> 2.0) sinatra-activerecord (2.0.25) activerecord (>= 4.1) sinatra (>= 1.0) - sinatra-contrib (2.1.0) + sinatra-contrib (2.2.0) multi_json mustermann (~> 1.0) - rack-protection (= 2.1.0) - sinatra (= 2.1.0) + rack-protection (= 2.2.0) + sinatra (= 2.2.0) tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) - sprockets (4.0.2) + sprockets (4.0.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-helpers (1.4.0) @@ -220,7 +208,7 @@ GEM thor (1.2.1) thread (0.2.2) tilt (2.0.10) - timecop (0.9.4) + timecop (0.9.5) tins (1.31.0) sync tzinfo (2.0.4) @@ -232,7 +220,7 @@ GEM will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.5.3) + zeitwerk (2.5.4) PLATFORMS arm64-darwin-21 @@ -243,8 +231,8 @@ DEPENDENCIES bcrypt capybara coveralls_reborn - delayed_job! - delayed_job_active_record! + delayed_job + delayed_job_active_record faker feedbag feedjira @@ -283,7 +271,7 @@ DEPENDENCIES will_paginate RUBY VERSION - ruby 3.1.0p0 + ruby 3.1.1p18 BUNDLED WITH 2.2.32 From 751ba518ef3064e3bcfea7330821b3a757e5ce5d Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 2 May 2022 01:02:28 -0600 Subject: [PATCH 71/90] Update ruby and gem versions --- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 50 +++++++++++++++++++++++++------------------------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.ruby-version b/.ruby-version index 94ff29cc4..ef538c281 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.1 +3.1.2 diff --git a/Gemfile b/Gemfile index bbfc8f0b4..0911c7d90 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "3.1.1" +ruby "3.1.2" source "https://rubygems.org" diff --git a/Gemfile.lock b/Gemfile.lock index 24bcd61f6..ac7e82b88 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (7.0.2.3) - actionview (= 7.0.2.3) - activesupport (= 7.0.2.3) + actionpack (7.0.2.4) + actionview (= 7.0.2.4) + activesupport (= 7.0.2.4) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.2.3) - activesupport (= 7.0.2.3) + actionview (7.0.2.4) + activesupport (= 7.0.2.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (7.0.2.3) - activesupport (= 7.0.2.3) - activerecord (7.0.2.3) - activemodel (= 7.0.2.3) - activesupport (= 7.0.2.3) - activesupport (7.0.2.3) + activemodel (7.0.2.4) + activesupport (= 7.0.2.4) + activerecord (7.0.2.4) + activemodel (= 7.0.2.4) + activesupport (= 7.0.2.4) + activesupport (7.0.2.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -68,7 +68,7 @@ GEM multi_xml (>= 0.5.2) i18n (1.10.0) concurrent-ruby (~> 1.0) - loofah (2.16.0) + loofah (2.17.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) matrix (0.4.2) @@ -83,16 +83,16 @@ GEM mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) - nokogiri (1.13.3-arm64-darwin) + nokogiri (1.13.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.3-x86_64-linux) + nokogiri (1.13.4-x86_64-linux) racc (~> 1.4) open_uri_redirections (0.2.1) parallel (1.22.1) - parser (3.1.1.0) + parser (3.1.2.0) ast (~> 2.4.1) pg (1.3.5) - public_suffix (4.0.6) + public_suffix (4.0.7) puma (5.6.4) nio4r (~> 2.0) racc (1.6.0) @@ -111,16 +111,16 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (7.0.2.3) - actionpack (= 7.0.2.3) - activesupport (= 7.0.2.3) + railties (7.0.2.4) + actionpack (= 7.0.2.4) + activesupport (= 7.0.2.4) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.2.1) + regexp_parser (2.3.1) rexml (3.2.5) rspec (3.11.0) rspec-core (~> 3.11.0) @@ -138,16 +138,16 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.11.0) rspec-support (3.11.0) - rubocop (1.26.1) + rubocop (1.28.2) parallel (~> 1.10) parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.16.0, < 2.0) + rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.16.0) + rubocop-ast (1.17.0) parser (>= 3.1.1.0) rubocop-rails (2.14.2) activesupport (>= 4.2.0) @@ -155,7 +155,7 @@ GEM rubocop (>= 1.7.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.9.0) + rubocop-rspec (2.10.0) rubocop (~> 1.19) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) @@ -269,7 +269,7 @@ DEPENDENCIES will_paginate RUBY VERSION - ruby 3.1.1p18 + ruby 3.1.2p20 BUNDLED WITH 2.3.7 From ff2b458ac410b3cf5211060930a564c141714ced Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 13 May 2022 00:26:21 -0600 Subject: [PATCH 72/90] update gem lock --- Gemfile.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ac7e82b88..b01548382 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (7.0.2.4) - actionview (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionpack (7.0.3) + actionview (= 7.0.3) + activesupport (= 7.0.3) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.2.4) - activesupport (= 7.0.2.4) + actionview (7.0.3) + activesupport (= 7.0.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (7.0.2.4) - activesupport (= 7.0.2.4) - activerecord (7.0.2.4) - activemodel (= 7.0.2.4) - activesupport (= 7.0.2.4) - activesupport (7.0.2.4) + activemodel (7.0.3) + activesupport (= 7.0.3) + activerecord (7.0.3) + activemodel (= 7.0.3) + activesupport (= 7.0.3) + activesupport (7.0.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -29,7 +29,7 @@ GEM ast (2.4.2) bcrypt (3.1.17) builder (3.2.4) - capybara (3.36.0) + capybara (3.37.1) addressable matrix mini_mime (>= 0.1.3) @@ -68,7 +68,7 @@ GEM multi_xml (>= 0.5.2) i18n (1.10.0) concurrent-ruby (~> 1.0) - loofah (2.17.0) + loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) matrix (0.4.2) @@ -83,9 +83,9 @@ GEM mustermann (1.1.1) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) - nokogiri (1.13.4-arm64-darwin) + nokogiri (1.13.6-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.4-x86_64-linux) + nokogiri (1.13.6-x86_64-linux) racc (~> 1.4) open_uri_redirections (0.2.1) parallel (1.22.1) @@ -111,16 +111,16 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (7.0.2.4) - actionpack (= 7.0.2.4) - activesupport (= 7.0.2.4) + railties (7.0.3) + actionpack (= 7.0.3) + activesupport (= 7.0.3) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.3.1) + regexp_parser (2.4.0) rexml (3.2.5) rspec (3.11.0) rspec-core (~> 3.11.0) @@ -138,12 +138,12 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.11.0) rspec-support (3.11.0) - rubocop (1.28.2) + rubocop (1.29.1) parallel (~> 1.10) parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml + rexml (>= 3.2.5, < 4.0) rubocop-ast (>= 1.17.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) @@ -209,7 +209,7 @@ GEM thread (0.2.2) tilt (2.0.10) timecop (0.9.5) - tins (1.31.0) + tins (1.31.1) sync tzinfo (2.0.4) concurrent-ruby (~> 1.0) From 3c54b5a07d8c79b2ad9891ffe5204836f9a01bc3 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 13 May 2022 00:39:51 -0600 Subject: [PATCH 73/90] downgrade to rails 7.0.2.4 - some part of the upgrade broke suppress_warnings in delayed_job_active_record --- Gemfile | 2 +- Gemfile.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 0911c7d90..e06c86862 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,7 @@ group :development, :test do gem "timecop" end -gem "activerecord" +gem "activerecord", "7.0.2.4" gem "bcrypt" gem "delayed_job" gem "delayed_job_active_record" diff --git a/Gemfile.lock b/Gemfile.lock index b01548382..06d69faeb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (7.0.3) - actionview (= 7.0.3) - activesupport (= 7.0.3) + actionpack (7.0.2.4) + actionview (= 7.0.2.4) + activesupport (= 7.0.2.4) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.3) - activesupport (= 7.0.3) + actionview (7.0.2.4) + activesupport (= 7.0.2.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (7.0.3) - activesupport (= 7.0.3) - activerecord (7.0.3) - activemodel (= 7.0.3) - activesupport (= 7.0.3) - activesupport (7.0.3) + activemodel (7.0.2.4) + activesupport (= 7.0.2.4) + activerecord (7.0.2.4) + activemodel (= 7.0.2.4) + activesupport (= 7.0.2.4) + activesupport (7.0.2.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -111,9 +111,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (7.0.3) - actionpack (= 7.0.3) - activesupport (= 7.0.3) + railties (7.0.2.4) + actionpack (= 7.0.2.4) + activesupport (= 7.0.2.4) method_source rake (>= 12.2) thor (~> 1.0) @@ -226,7 +226,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - activerecord + activerecord (= 7.0.2.4) bcrypt capybara coveralls_reborn From 6ee11b38a6d74c02612ccde2fcf8bf7bada2d521 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sat, 14 May 2022 22:08:49 -0600 Subject: [PATCH 74/90] Substitute URL for title if the feed is missing one --- app/commands/feeds/add_new_feed.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/commands/feeds/add_new_feed.rb b/app/commands/feeds/add_new_feed.rb index 2d7502e29..8a5e8de21 100644 --- a/app/commands/feeds/add_new_feed.rb +++ b/app/commands/feeds/add_new_feed.rb @@ -9,6 +9,7 @@ def self.add(url, discoverer = FeedDiscovery.new, repo = Feed) result = discoverer.discover(url) return false unless result + result.title = result.title || result.url repo.create(name: ContentSanitizer.sanitize(result.title), url: result.feed_url, last_fetched: Time.now - ONE_DAY) From c365c8f6efebd4fa3bd4b3383f58dfcd3e797d65 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 31 Oct 2022 22:01:37 -0600 Subject: [PATCH 75/90] schema updated? --- db/schema.rb | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 03197b554..bc9ea7332 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,33 +10,28 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2014_11_02_103617) do - - -# These are extensions that must be enabled in order to support this database -enable_extension "plpgsql" - +ActiveRecord::Schema[7.0].define(version: 2014_11_02_103617) do create_table "delayed_jobs", force: :cascade do |t| t.integer "priority", default: 0 t.integer "attempts", default: 0 t.text "handler" t.text "last_error" - t.datetime "run_at" - t.datetime "locked_at" - t.datetime "failed_at" + t.datetime "run_at", precision: nil + t.datetime "locked_at", precision: nil + t.datetime "failed_at", precision: nil t.string "locked_by" t.string "queue" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.index ["priority", "run_at"], name: "delayed_jobs_priority" end create_table "feeds", force: :cascade do |t| t.string "name" t.text "url" - t.datetime "last_fetched" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "last_fetched", precision: nil + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.integer "status" t.integer "group_id" t.index ["url"], name: "index_feeds_on_url", unique: true @@ -44,8 +39,8 @@ create_table "groups", force: :cascade do |t| t.string "name", null: false - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false end create_table "stories", force: :cascade do |t| @@ -53,9 +48,9 @@ t.text "permalink" t.text "body" t.integer "feed_id" - t.datetime "created_at" - t.datetime "updated_at" - t.datetime "published" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false + t.datetime "published", precision: nil t.boolean "is_read" t.boolean "keep_unread", default: false t.boolean "is_starred", default: false @@ -66,8 +61,8 @@ create_table "users", force: :cascade do |t| t.string "password_digest" - t.datetime "created_at" - t.datetime "updated_at" + t.datetime "created_at", precision: nil, null: false + t.datetime "updated_at", precision: nil, null: false t.boolean "setup_complete" t.string "api_key" end From c3372e7f05a15f78121d95494dda7b57e959cd5f Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 31 Oct 2022 22:20:49 -0600 Subject: [PATCH 76/90] last checkin before migrate --- Gemfile | 2 +- Gemfile.lock | 2 +- app/commands/feeds/add_new_feed.rb | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index e06c86862..c978a6a7e 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem "sassc-rails" group :production do gem "pg" - gem "puma" + gem "puma", "5.6.5" end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 44ec94b07..0f86aba50 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -237,7 +237,7 @@ DEPENDENCIES loofah nokogiri pg - puma + puma (= 5.6.5) rack-protection rack-ssl rack-test diff --git a/app/commands/feeds/add_new_feed.rb b/app/commands/feeds/add_new_feed.rb index 8a5e8de21..2d7502e29 100644 --- a/app/commands/feeds/add_new_feed.rb +++ b/app/commands/feeds/add_new_feed.rb @@ -9,7 +9,6 @@ def self.add(url, discoverer = FeedDiscovery.new, repo = Feed) result = discoverer.discover(url) return false unless result - result.title = result.title || result.url repo.create(name: ContentSanitizer.sanitize(result.title), url: result.feed_url, last_fetched: Time.now - ONE_DAY) From 051828d9c58fb560311a0097c493d0c148793da3 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 31 Oct 2022 22:25:21 -0600 Subject: [PATCH 77/90] add platform --- Gemfile.lock | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 0f86aba50..5e9175276 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -85,6 +85,8 @@ GEM nio4r (2.5.8) nokogiri (1.13.8-arm64-darwin) racc (~> 1.4) + nokogiri (1.13.8-x86_64-linux) + racc (~> 1.4) parallel (1.22.1) parser (3.1.2.1) ast (~> 2.4.1) @@ -200,6 +202,7 @@ GEM activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.5.0-arm64-darwin) + sqlite3 (1.5.0-x86_64-linux) sync (0.5.0) term-ansicolor (1.7.1) tins (~> 1.0) @@ -221,6 +224,7 @@ GEM PLATFORMS arm64-darwin-21 + x86_64-linux DEPENDENCIES activerecord (= 7.0.2.4) From cdb673d3457e36d9a21214f931aff08ca794a0d3 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 31 Oct 2022 22:29:24 -0600 Subject: [PATCH 78/90] bump --- app.json | 1 + 1 file changed, 1 insertion(+) diff --git a/app.json b/app.json index 33f03cdaf..6fea40f18 100644 --- a/app.json +++ b/app.json @@ -1,4 +1,5 @@ { + "name": "Stringer", "description": "A self-hosted, anti-social RSS reader.", "logo": "https://raw.githubusercontent.com/swanson/stringer/master/screenshots/logo.png", From ca0592a7d18cc668d134b3f3df97c3cdc4228367 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 20 Nov 2022 12:24:32 -0500 Subject: [PATCH 79/90] Dockery stuff --- .dockerignore | 20 +++++-- Dockerfile | 126 ++++++++++++++++++++++++++++++++++----------- docker-compose.yml | 10 ++-- 3 files changed, 118 insertions(+), 38 deletions(-) diff --git a/.dockerignore b/.dockerignore index 745841df6..0e34b06de 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,16 @@ -.git/* -.gitignore -log/* -tmp/* +.git +tmp +!tmp/pids +log +public/assets +public/packs +.bundle + +db/*.sqlite3 +db/*.sqlite3-* + +storage +config/master.key +config/credentials/*.key + +node_modules diff --git a/Dockerfile b/Dockerfile index e5952ba18..9bd278803 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,42 +1,108 @@ -FROM ruby:3.1.2 +# syntax = docker/dockerfile:experimental -ENV RACK_ENV=production -ENV PORT=8080 +# Dockerfile used to build a deployable image for a Rails application. +# Adjust as required. +# +# Common adjustments you may need to make over time: +# * Modify version numbers for Ruby, Bundler, and other products. +# * Add library packages needed at build time for your gems, node modules. +# * Add deployment packages needed by your application +# * Add (often fake) secrets needed to compile your assets -EXPOSE 8080 +####################################################################### +# Learn more about the chosen Ruby stack, Fullstaq Ruby, here: +# https://github.com/evilmartians/fullstaq-ruby-docker. +# +# We recommend using the highest patch level for better security and +# performance. + +ARG RUBY_VERSION=3.1.2 +ARG VARIANT=bullseye +FROM ruby:${RUBY_VERSION}-${VARIANT} as base + +LABEL fly_launch_runtime="rails" + +ARG BUNDLER_VERSION=2.3.26 + +ARG RAILS_ENV=production +ENV RAILS_ENV=${RAILS_ENV} + +ENV RAILS_SERVE_STATIC_FILES true +ENV RAILS_LOG_TO_STDOUT true + +ARG BUNDLE_WITHOUT=development:test +ARG BUNDLE_PATH=vendor/bundle +ENV BUNDLE_PATH ${BUNDLE_PATH} +ENV BUNDLE_WITHOUT ${BUNDLE_WITHOUT} + +RUN mkdir /app WORKDIR /app -ADD Gemfile Gemfile.lock /app/ -RUN bundle install +RUN mkdir -p tmp/pids + +####################################################################### + +# install packages only needed at build time + +FROM base as build_deps + +ARG BUILD_PACKAGES="git build-essential libpq-dev wget vim curl gzip xz-utils libsqlite3-dev" +ENV BUILD_PACKAGES ${BUILD_PACKAGES} + +RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \ + --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt \ + apt-get update -qq && \ + apt-get install --no-install-recommends -y ${BUILD_PACKAGES} \ + && rm -rf /var/lib/apt/lists /var/cache/apt/archives + +####################################################################### + +# install gems + +FROM build_deps as gems + +RUN gem update --system --no-document && \ + gem install -N bundler -v ${BUNDLER_VERSION} + +COPY Gemfile* ./ +RUN bundle install && rm -rf vendor/bundle/ruby/*/cache + +####################################################################### + +# install deployment packages + +FROM base -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - supervisor locales nodejs \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +ARG DEPLOY_PACKAGES="postgresql-client file vim curl gzip libsqlite3-0 nodejs" +ENV DEPLOY_PACKAGES=${DEPLOY_PACKAGES} -RUN DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales \ - && locale-gen C.UTF-8 \ - && /usr/sbin/update-locale LANG=C.UTF-8 +RUN --mount=type=cache,id=prod-apt-cache,sharing=locked,target=/var/cache/apt \ + --mount=type=cache,id=prod-apt-lib,sharing=locked,target=/var/lib/apt \ + apt-get update -qq && \ + apt-get install --no-install-recommends -y \ + ${DEPLOY_PACKAGES} \ + && rm -rf /var/lib/apt/lists /var/cache/apt/archives -ENV LC_ALL C.UTF-8 +# copy installed gems +COPY --from=gems /app /app +COPY --from=gems /usr/local/lib/ruby /usr/local/lib/ruby +COPY --from=gems /usr/local/bundle /usr/local/bundle -ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.3/supercronic-linux-amd64 \ - SUPERCRONIC=supercronic-linux-amd64 \ - SUPERCRONIC_SHA1SUM=96960ba3207756bb01e6892c978264e5362e117e +####################################################################### -RUN curl -fsSLO "$SUPERCRONIC_URL" \ - && echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \ - && chmod +x "$SUPERCRONIC" \ - && mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \ - && ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic +# Deploy your application +COPY . . -ADD docker/supervisord.conf /etc/supervisord.conf -ADD docker/start.sh /app/ -ADD . /app -RUN useradd -m stringer -RUN chown -R stringer:stringer /app -USER stringer +ENV SECRET_TOKEN "secret!!" +ENV PORT 8080 +ENV WEB_CONCURRENCY 1 +ENV MAX_THREADS 2 +ENV RACK_ENV production +ENV PUMA_WORKER_TIMEOUT 25 +ENV PUMA_WORKER_SHUTDOWN_TIMEOUT 25 +ENV DATABASE_URL "" +ARG SERVER_COMMAND="bundle exec rackup" -CMD /app/start.sh +ENV SERVER_COMMAND ${SERVER_COMMAND} +CMD ${SERVER_COMMAND} diff --git a/docker-compose.yml b/docker-compose.yml index 8293e4752..1d84546cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,17 +1,17 @@ version: '2' services: postgres: - image: postgres:9.5-alpine + image: postgres:15-alpine restart: always volumes: - - ~/stringer:/var/lib/postgresql/data + - stringer:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=super_secret_password - POSTGRES_USER=db_user - POSTGRES_DB=stringer web: - image: mockdeep/stringer + image: alksol/stringer build: . depends_on: - postgres @@ -19,6 +19,8 @@ services: ports: - 80:8080 environment: - - SECRET_TOKEN=YOUR_SECRET_TOKEN + - SECRET_TOKEN=MY_SECRET_TOKEN - PORT=8080 - DATABASE_URL=postgres://db_user:super_secret_password@postgres:5432/stringer +volumes: + stringer: From 4273f2936c3ee8a4e23bd5f8956dcd26b67bf3c9 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 20 Nov 2022 12:38:17 -0500 Subject: [PATCH 80/90] Update most dependencies. sinatra and sinatra-contrib v 3.0.3 depend on a newer rack-protection which is throwing a crypto error. --- Gemfile | 7 +++--- Gemfile.lock | 66 ++++++++++++++++++++++++++-------------------------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/Gemfile b/Gemfile index c978a6a7e..154ee6cb8 100644 --- a/Gemfile +++ b/Gemfile @@ -42,15 +42,16 @@ gem "i18n" gem "loofah" gem "nokogiri" -gem "rack-protection" +gem "rack-protection", "2.2.2" gem "rack-ssl" gem "rake" gem "racksh" -gem "sinatra" +gem "sinatra", "<3" gem "sinatra-activerecord" -gem "sinatra-contrib" +gem "sinatra-contrib", "<3" + gem "sinatra-flash" gem "sprockets" gem "sprockets-helpers" diff --git a/Gemfile.lock b/Gemfile.lock index 5e9175276..3dd345d89 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -29,7 +29,7 @@ GEM ast (2.4.2) bcrypt (3.1.18) builder (3.2.4) - capybara (3.37.1) + capybara (3.38.0) addressable matrix mini_mime (>= 0.1.3) @@ -45,7 +45,7 @@ GEM thor (>= 0.20.3, < 2.0) tins (~> 1.16) crass (1.0.6) - delayed_job (4.1.10) + delayed_job (4.1.11) activesupport (>= 3.0, < 8.0) delayed_job_active_record (4.1.7) activerecord (>= 3.0, < 8.0) @@ -54,11 +54,11 @@ GEM docile (1.4.0) erubi (1.11.0) execjs (2.8.1) - faker (2.23.0) + faker (3.0.0) i18n (>= 1.8.11, < 2) - feedbag (0.10.3) + feedbag (1.0.0) nokogiri (~> 1.8, >= 1.8.2) - feedjira (3.2.1) + feedjira (3.2.2) loofah (>= 2.3.1) sax-machine (>= 1.0) ffi (1.15.5) @@ -83,14 +83,14 @@ GEM mustermann (2.0.2) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) - nokogiri (1.13.8-arm64-darwin) + nokogiri (1.13.9-arm64-darwin) racc (~> 1.4) - nokogiri (1.13.8-x86_64-linux) + nokogiri (1.13.9-x86_64-linux) racc (~> 1.4) parallel (1.22.1) parser (3.1.2.1) ast (~> 2.4.1) - pg (1.4.3) + pg (1.4.5) public_suffix (5.0.0) puma (5.6.5) nio4r (~> 2.0) @@ -119,43 +119,43 @@ GEM zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.5.0) + regexp_parser (2.6.1) rexml (3.2.5) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.1) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-html-matchers (0.10.0) nokogiri (~> 1) rspec (>= 3.0.0.a) - rspec-mocks (3.11.1) + rspec-mocks (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-support (3.11.1) - rubocop (1.36.0) + rspec-support (~> 3.12.0) + rspec-support (3.12.0) + rubocop (1.39.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.20.1, < 2.0) + rubocop-ast (>= 1.23.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.21.0) + rubocop-ast (1.23.0) parser (>= 3.1.1.0) - rubocop-rails (2.16.0) + rubocop-rails (2.17.3) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.13.1) + rubocop-rspec (2.15.0) rubocop (~> 1.33) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) @@ -181,7 +181,7 @@ GEM rack (~> 2.2) rack-protection (= 2.2.2) tilt (~> 2.0) - sinatra-activerecord (2.0.25) + sinatra-activerecord (2.0.26) activerecord (>= 4.1) sinatra (>= 1.0) sinatra-contrib (2.2.2) @@ -201,8 +201,8 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.5.0-arm64-darwin) - sqlite3 (1.5.0-x86_64-linux) + sqlite3 (1.5.4-arm64-darwin) + sqlite3 (1.5.4-x86_64-linux) sync (0.5.0) term-ansicolor (1.7.1) tins (~> 1.0) @@ -210,7 +210,7 @@ GEM thread (0.2.2) tilt (2.0.11) timecop (0.9.5) - tins (1.31.1) + tins (1.32.0) sync tzinfo (2.0.5) concurrent-ruby (~> 1.0) @@ -220,7 +220,7 @@ GEM will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.0) + zeitwerk (2.6.6) PLATFORMS arm64-darwin-21 @@ -242,7 +242,7 @@ DEPENDENCIES nokogiri pg puma (= 5.6.5) - rack-protection + rack-protection (= 2.2.2) rack-ssl rack-test racksh @@ -257,9 +257,9 @@ DEPENDENCIES sassc-rails shotgun simplecov - sinatra + sinatra (< 3) sinatra-activerecord - sinatra-contrib + sinatra-contrib (< 3) sinatra-flash sprockets sprockets-helpers From b602470a4bec6a275f9e4d131233eeaddbeea993 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 20 Nov 2022 12:50:40 -0500 Subject: [PATCH 81/90] Update to sinatra 3 and corresponding rack-protection SECRET_TOKEN is now expected to be a 64 character hex string of random data, and is necessary to run specs as well as the server. --- Gemfile | 6 +++--- Gemfile.lock | 26 +++++++++++++------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 154ee6cb8..6ec9354d4 100644 --- a/Gemfile +++ b/Gemfile @@ -42,15 +42,15 @@ gem "i18n" gem "loofah" gem "nokogiri" -gem "rack-protection", "2.2.2" +gem "rack-protection" gem "rack-ssl" gem "rake" gem "racksh" -gem "sinatra", "<3" +gem "sinatra" gem "sinatra-activerecord" -gem "sinatra-contrib", "<3" +gem "sinatra-contrib" gem "sinatra-flash" gem "sprockets" diff --git a/Gemfile.lock b/Gemfile.lock index 3dd345d89..937a8c420 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -80,7 +80,7 @@ GEM minitest (5.16.3) multi_json (1.15.0) multi_xml (0.6.0) - mustermann (2.0.2) + mustermann (3.0.0) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) nokogiri (1.13.9-arm64-darwin) @@ -96,7 +96,7 @@ GEM nio4r (~> 2.0) racc (1.6.0) rack (2.2.4) - rack-protection (2.2.2) + rack-protection (3.0.3) rack rack-ssl (1.4.1) rack @@ -176,19 +176,19 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sinatra (2.2.2) - mustermann (~> 2.0) - rack (~> 2.2) - rack-protection (= 2.2.2) + sinatra (3.0.3) + mustermann (~> 3.0) + rack (~> 2.2, >= 2.2.4) + rack-protection (= 3.0.3) tilt (~> 2.0) sinatra-activerecord (2.0.26) activerecord (>= 4.1) sinatra (>= 1.0) - sinatra-contrib (2.2.2) + sinatra-contrib (3.0.3) multi_json - mustermann (~> 2.0) - rack-protection (= 2.2.2) - sinatra (= 2.2.2) + mustermann (~> 3.0) + rack-protection (= 3.0.3) + sinatra (= 3.0.3) tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) @@ -242,7 +242,7 @@ DEPENDENCIES nokogiri pg puma (= 5.6.5) - rack-protection (= 2.2.2) + rack-protection rack-ssl rack-test racksh @@ -257,9 +257,9 @@ DEPENDENCIES sassc-rails shotgun simplecov - sinatra (< 3) + sinatra sinatra-activerecord - sinatra-contrib (< 3) + sinatra-contrib sinatra-flash sprockets sprockets-helpers From c721577d6d53bab449a21baf9f2635aef093d7cd Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 20 Nov 2022 12:52:24 -0500 Subject: [PATCH 82/90] Update puma and activerecord to latest compatible versions --- Gemfile | 4 ++-- Gemfile.lock | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 6ec9354d4..fcaf90101 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem "sassc-rails" group :production do gem "pg" - gem "puma", "5.6.5" + gem "puma" end group :development do @@ -30,7 +30,7 @@ group :development, :test do gem "timecop" end -gem "activerecord", "7.0.2.4" +gem "activerecord" gem "bcrypt" gem "delayed_job" gem "delayed_job_active_record" diff --git a/Gemfile.lock b/Gemfile.lock index 937a8c420..1e8937bd0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,25 +1,25 @@ GEM remote: https://rubygems.org/ specs: - actionpack (7.0.2.4) - actionview (= 7.0.2.4) - activesupport (= 7.0.2.4) + actionpack (7.0.4) + actionview (= 7.0.4) + activesupport (= 7.0.4) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.2.4) - activesupport (= 7.0.2.4) + actionview (7.0.4) + activesupport (= 7.0.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activemodel (7.0.2.4) - activesupport (= 7.0.2.4) - activerecord (7.0.2.4) - activemodel (= 7.0.2.4) - activesupport (= 7.0.2.4) - activesupport (7.0.2.4) + activemodel (7.0.4) + activesupport (= 7.0.4) + activerecord (7.0.4) + activemodel (= 7.0.4) + activesupport (= 7.0.4) + activesupport (7.0.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -92,7 +92,7 @@ GEM ast (~> 2.4.1) pg (1.4.5) public_suffix (5.0.0) - puma (5.6.5) + puma (6.0.0) nio4r (~> 2.0) racc (1.6.0) rack (2.2.4) @@ -110,9 +110,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (7.0.2.4) - actionpack (= 7.0.2.4) - activesupport (= 7.0.2.4) + railties (7.0.4) + actionpack (= 7.0.4) + activesupport (= 7.0.4) method_source rake (>= 12.2) thor (~> 1.0) @@ -227,7 +227,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - activerecord (= 7.0.2.4) + activerecord bcrypt capybara coveralls_reborn @@ -241,7 +241,7 @@ DEPENDENCIES loofah nokogiri pg - puma (= 5.6.5) + puma rack-protection rack-ssl rack-test From a4b58f90ffc92ab26faeee1c81a283f18ee558cb Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 20 Nov 2022 22:27:41 -0500 Subject: [PATCH 83/90] env vars --- Dockerfile | 8 ++++---- docker-compose.yml | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9bd278803..1ef534b7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,15 +26,15 @@ LABEL fly_launch_runtime="rails" ARG BUNDLER_VERSION=2.3.26 ARG RAILS_ENV=production +ARG BUNDLE_WITHOUT=development:test +ARG BUNDLE_PATH=vendor/bundle ENV RAILS_ENV=${RAILS_ENV} +ENV BUNDLE_PATH ${BUNDLE_PATH} +ENV BUNDLE_WITHOUT ${BUNDLE_WITHOUT} ENV RAILS_SERVE_STATIC_FILES true ENV RAILS_LOG_TO_STDOUT true -ARG BUNDLE_WITHOUT=development:test -ARG BUNDLE_PATH=vendor/bundle -ENV BUNDLE_PATH ${BUNDLE_PATH} -ENV BUNDLE_WITHOUT ${BUNDLE_WITHOUT} RUN mkdir /app WORKDIR /app diff --git a/docker-compose.yml b/docker-compose.yml index 1d84546cc..d7d90eb49 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ services: volumes: - stringer:/var/lib/postgresql/data environment: - - POSTGRES_PASSWORD=super_secret_password + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - POSTGRES_USER=db_user - POSTGRES_DB=stringer @@ -19,8 +19,9 @@ services: ports: - 80:8080 environment: - - SECRET_TOKEN=MY_SECRET_TOKEN + - SECRET_TOKEN=${SECRET_TOKEN} - PORT=8080 - - DATABASE_URL=postgres://db_user:super_secret_password@postgres:5432/stringer + - DATABASE_URL=postgres://db_user:${POSTGRES_PASSWORD}@postgres:5432/stringer + - RACK_ENV=${RACK_ENV} volumes: stringer: From d731dd8bab29a4ff7a79b9d84ce59c35687ec1c0 Mon Sep 17 00:00:00 2001 From: David Waite Date: Sun, 20 Nov 2022 23:33:09 -0500 Subject: [PATCH 84/90] bump bundler version --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1e8937bd0..0de2df2d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -273,4 +273,4 @@ RUBY VERSION ruby 3.1.2p20 BUNDLED WITH - 2.3.7 + 2.3.26 From a4c6803d0fdd27eac73f9e43c7c8da65f87ad78f Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 21 Nov 2022 16:01:08 +0000 Subject: [PATCH 85/90] initial deployment changes - need to still get updates working, however --- .dockerignore | 1 + .gitignore | 1 + Dockerfile | 6 ++---- Procfile | 2 -- config.ru | 1 + config/database.yml | 9 +++------ config/puma.rb | 5 +++-- docker-compose.yml | 18 +++++++++++++++--- 8 files changed, 26 insertions(+), 17 deletions(-) delete mode 100644 Procfile diff --git a/.dockerignore b/.dockerignore index 0e34b06de..13f7bad94 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ +secrets.env .git tmp !tmp/pids diff --git a/.gitignore b/.gitignore index 770968993..be818db8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +secrets.env .byebug* *.gem *.rbc diff --git a/Dockerfile b/Dockerfile index 1ef534b7d..2464f321f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,6 @@ ENV BUNDLE_WITHOUT ${BUNDLE_WITHOUT} ENV RAILS_SERVE_STATIC_FILES true ENV RAILS_LOG_TO_STDOUT true - RUN mkdir /app WORKDIR /app RUN mkdir -p tmp/pids @@ -93,16 +92,15 @@ COPY --from=gems /usr/local/bundle /usr/local/bundle # Deploy your application COPY . . +EXPOSE 8080 -ENV SECRET_TOKEN "secret!!" -ENV PORT 8080 ENV WEB_CONCURRENCY 1 ENV MAX_THREADS 2 ENV RACK_ENV production ENV PUMA_WORKER_TIMEOUT 25 ENV PUMA_WORKER_SHUTDOWN_TIMEOUT 25 ENV DATABASE_URL "" -ARG SERVER_COMMAND="bundle exec rackup" +ARG SERVER_COMMAND="bundle exec puma --debug -p 8080 config.ru" ENV SERVER_COMMAND ${SERVER_COMMAND} CMD ${SERVER_COMMAND} diff --git a/Procfile b/Procfile deleted file mode 100644 index cceb33ddf..000000000 --- a/Procfile +++ /dev/null @@ -1,2 +0,0 @@ -web: bundle exec puma -p $PORT -C ./config/puma.rb -console: bundle exec racksh diff --git a/config.ru b/config.ru index 82a4e567e..00364a90d 100644 --- a/config.ru +++ b/config.ru @@ -3,6 +3,7 @@ require "bundler" require "active_support/core_ext/kernel/reporting" Bundler.require + require "./fever_api" map "/fever" do run FeverAPI::Endpoint diff --git a/config/database.yml b/config/database.yml index db5853361..87f34b020 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,8 +1,3 @@ -default: &default - adapter: postgresql - encoding: unicode - pool: 5 - development: adapter: sqlite3 database: stringer_dev @@ -14,5 +9,7 @@ test: pool: 5 production: - <<: *default + adapter: postgresql + encoding: unicode + pool: 5 url: <%= ENV["DATABASE_URL"] %> diff --git a/config/puma.rb b/config/puma.rb index 968c37cf0..5abaa86c8 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -2,8 +2,9 @@ threads_count = Integer(ENV.fetch("MAX_THREADS", 2)) threads threads_count, threads_count -rackup DefaultRackup -port ENV.fetch("PORT", 3000) +# rackup DefaultRackup + +port 8080 environment ENV.fetch("RACK_ENV", "development") worker_timeout Integer(ENV.fetch("PUMA_WORKER_TIMEOUT", 25)) diff --git a/docker-compose.yml b/docker-compose.yml index d7d90eb49..cbdaa50d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,12 +16,24 @@ services: depends_on: - postgres restart: always - ports: - - 80:8080 + labels: + - "traefik.http.routers.stringer.rule=Host(`news.alkaline.solutions`)" + - "traefik.http.routers.stringer.tls.certResolver=default" + - "traefik.http.routers.stringer2.rule=Host(`news.alkaline.solutions`)" + - "traefik.http.routers.stringer2.middlewares=require-ssl@file" + - "traefik.enable=true" + expose: + - 8080 environment: - SECRET_TOKEN=${SECRET_TOKEN} - - PORT=8080 - DATABASE_URL=postgres://db_user:${POSTGRES_PASSWORD}@postgres:5432/stringer - RACK_ENV=${RACK_ENV} + - WORKER_RETRY=${WORKER_RETRY} + - WEB_CONCURRENCY=${WEB_CONCURRENCY} + - MAX_THREADS=${MAX_THREADS} volumes: stringer: +networks: + default: + external: + name: stringer From bcec85d7465081e77a70b7054080d217275e36cb Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 25 Nov 2022 20:32:28 -0500 Subject: [PATCH 86/90] Removed delayed_job due to consistent incompatibilities with non-Rails apps --- .gitignore | 1 + Gemfile | 2 -- Gemfile.lock | 23 +++++-------- Rakefile | 32 ------------------- app.rb | 3 -- app/controllers/debug_controller.rb | 2 -- app/controllers/feeds_controller.rb | 2 -- app/controllers/first_run_controller.rb | 1 - app/tasks/fetch_feeds.rb | 11 ------- app/views/debug.erb | 14 -------- config.ru | 1 - config/puma.rb | 8 ----- db/migrate/20221126005221_drop_delayed_job.rb | 5 +++ db/schema.rb | 17 +--------- spec/controllers/debug_controller_spec.rb | 17 ---------- spec/controllers/feeds_controller_spec.rb | 1 - spec/controllers/first_run_controller_spec.rb | 1 - spec/tasks/fetch_feeds_spec.rb | 25 --------------- 18 files changed, 15 insertions(+), 151 deletions(-) create mode 100644 db/migrate/20221126005221_drop_delayed_job.rb diff --git a/.gitignore b/.gitignore index be818db8f..9313310e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +stringer_dev secrets.env .byebug* *.gem diff --git a/Gemfile b/Gemfile index fcaf90101..3d3f64a80 100644 --- a/Gemfile +++ b/Gemfile @@ -32,8 +32,6 @@ end gem "activerecord" gem "bcrypt" -gem "delayed_job" -gem "delayed_job_active_record" gem "feedbag" gem "feedjira" diff --git a/Gemfile.lock b/Gemfile.lock index 0de2df2d0..856d3bbb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,11 +45,6 @@ GEM thor (>= 0.20.3, < 2.0) tins (~> 1.16) crass (1.0.6) - 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) diff-lcs (1.5.0) docile (1.4.0) erubi (1.11.0) @@ -88,7 +83,7 @@ GEM nokogiri (1.13.9-x86_64-linux) racc (~> 1.4) parallel (1.22.1) - parser (3.1.2.1) + parser (3.1.3.0) ast (~> 2.4.1) pg (1.4.5) public_suffix (5.0.0) @@ -96,7 +91,7 @@ GEM nio4r (~> 2.0) racc (1.6.0) rack (2.2.4) - rack-protection (3.0.3) + rack-protection (3.0.4) rack rack-ssl (1.4.1) rack @@ -176,19 +171,19 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sinatra (3.0.3) + sinatra (3.0.4) mustermann (~> 3.0) rack (~> 2.2, >= 2.2.4) - rack-protection (= 3.0.3) + rack-protection (= 3.0.4) tilt (~> 2.0) sinatra-activerecord (2.0.26) activerecord (>= 4.1) sinatra (>= 1.0) - sinatra-contrib (3.0.3) + sinatra-contrib (3.0.4) multi_json mustermann (~> 3.0) - rack-protection (= 3.0.3) - sinatra (= 3.0.3) + rack-protection (= 3.0.4) + sinatra (= 3.0.4) tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) @@ -210,7 +205,7 @@ GEM thread (0.2.2) tilt (2.0.11) timecop (0.9.5) - tins (1.32.0) + tins (1.32.1) sync tzinfo (2.0.5) concurrent-ruby (~> 1.0) @@ -231,8 +226,6 @@ DEPENDENCIES bcrypt capybara coveralls_reborn - delayed_job - delayed_job_active_record faker feedbag feedjira diff --git a/Rakefile b/Rakefile index 4e4a44a3e..12ac02d7b 100644 --- a/Rakefile +++ b/Rakefile @@ -5,8 +5,6 @@ require "rubygems" require "net/http" require "active_record" require "active_support/core_ext/kernel/reporting" -require "delayed_job" -require "delayed_job_active_record" require "sinatra/activerecord/rake" ActiveRecord::Tasks::DatabaseTasks.db_dir = "db" @@ -22,41 +20,11 @@ task :fetch_feeds do FetchFeeds.new(Feed.all).fetch_all end -desc "Lazily fetch all feeds." -task :lazy_fetch do - if ENV["APP_URL"] - uri = URI(ENV["APP_URL"]) - Net::HTTP.get_response(uri) - end - - FeedRepository.list.each do |feed| - Delayed::Job.enqueue FetchFeedJob.new(feed.id) - end -end - desc "Fetch single feed" task :fetch_feed, :id do |_t, args| FetchFeed.new(Feed.find(args[:id])).fetch end -desc "Clear the delayed_job queue." -task :clear_jobs do - Delayed::Job.delete_all -end - -desc "Work the delayed_job queue." -task :work_jobs do - Delayed::Job.delete_all - - worker_retry = Integer(ENV["WORKER_RETRY"] || 3) - worker_retry.times do - Delayed::Worker.new( - min_priority: ENV["MIN_PRIORITY"], - max_priority: ENV["MAX_PRIORITY"] - ).start - end -end - desc "Change your password" task :change_password do ChangePassword.new.change_password diff --git a/app.rb b/app.rb index 64ed97bbc..55168a1e3 100644 --- a/app.rb +++ b/app.rb @@ -15,9 +15,6 @@ require_relative "app/helpers/authentication_helpers" require_relative "app/repositories/user_repository" require_relative "config/asset_pipeline" -require "delayed_job_active_record" - -Delayed::Worker.backend = :active_record I18n.load_path += Dir[File.join(File.dirname(__FILE__), "config/locales", "*.yml").to_s] I18n.config.enforce_available_locales = false diff --git a/app/controllers/debug_controller.rb b/app/controllers/debug_controller.rb index f38594201..35dd670a5 100644 --- a/app/controllers/debug_controller.rb +++ b/app/controllers/debug_controller.rb @@ -3,8 +3,6 @@ class Stringer < Sinatra::Base get "/debug" do erb :debug, locals: { - queued_jobs_count: Delayed::Job.count, - pending_migrations: MigrationStatus.new.pending_migrations } end diff --git a/app/controllers/feeds_controller.rb b/app/controllers/feeds_controller.rb index 0cbb0edb7..ef23cfe1f 100644 --- a/app/controllers/feeds_controller.rb +++ b/app/controllers/feeds_controller.rb @@ -40,8 +40,6 @@ class Stringer < Sinatra::Base feed = AddNewFeed.add(@feed_url) if feed && feed.valid? - FetchFeeds.enqueue([feed]) - flash[:success] = t("feeds.add.flash.added_successfully") redirect to("/") elsif feed diff --git a/app/controllers/first_run_controller.rb b/app/controllers/first_run_controller.rb index 6be12f769..51607852d 100644 --- a/app/controllers/first_run_controller.rb +++ b/app/controllers/first_run_controller.rb @@ -28,7 +28,6 @@ class Stringer < Sinatra::Base end get "/tutorial" do - FetchFeeds.enqueue(Feed.all) CompleteSetup.complete(current_user) @sample_stories = StoryRepository.samples diff --git a/app/tasks/fetch_feeds.rb b/app/tasks/fetch_feeds.rb index c1c1aab66..23b02ea91 100644 --- a/app/tasks/fetch_feeds.rb +++ b/app/tasks/fetch_feeds.rb @@ -2,7 +2,6 @@ require_relative "fetch_feed" require "active_support/core_ext/kernel/reporting" -require "delayed_job_active_record" class FetchFeeds def initialize(feeds, pool = nil) @@ -26,14 +25,4 @@ def fetch_all @pool.shutdown end - - def prepare_to_delay - @feeds_ids = @feeds.map(&:id) - @feeds = [] - self - end - - def self.enqueue(feeds) - new(feeds).prepare_to_delay.delay.fetch_all - end end diff --git a/app/views/debug.erb b/app/views/debug.erb index 8d010de79..147e4f940 100644 --- a/app/views/debug.erb +++ b/app/views/debug.erb @@ -5,19 +5,5 @@
<%= RUBY_VERSION %>
User Agent
<%= request.user_agent %>
-
Queued Jobs
-
<%= queued_jobs_count %>
-
Pending Migrations
-
- <% if pending_migrations.present? %> -
    - <% pending_migrations.each do |pm| %> -
  • <%= pm %>
  • - <% end %> -
- <% else %> - None - <% end %> -
diff --git a/config.ru b/config.ru index 00364a90d..54f36b213 100644 --- a/config.ru +++ b/config.ru @@ -1,6 +1,5 @@ require "rubygems" require "bundler" -require "active_support/core_ext/kernel/reporting" Bundler.require diff --git a/config/puma.rb b/config/puma.rb index 5abaa86c8..d03d8d9fc 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -11,15 +11,11 @@ worker_shutdown_timeout Integer(ENV.fetch("PUMA_WORKER_SHUTDOWN_TIMEOUT", 25)) preload_app! -@delayed_job_pid = nil - before_fork do # the following is highly recommended for Rails + "preload_app true" # as there's no need for the master process to hold a connection ActiveRecord::Base.connection.disconnect! if defined?(ActiveRecord::Base) - @delayed_job_pid ||= spawn("bundle exec rake work_jobs") unless ENV["WORKER_EMBEDDED"] == "false" - sleep 1 end @@ -30,7 +26,3 @@ ActiveRecord::Base.establish_connection(config) end end - -on_worker_shutdown do - Process.kill("QUIT", @delayed_job_pid) if !ENV["RACK_ENV"] || ENV["RACK_ENV"] == "development" -end diff --git a/db/migrate/20221126005221_drop_delayed_job.rb b/db/migrate/20221126005221_drop_delayed_job.rb new file mode 100644 index 000000000..41bdeaf8c --- /dev/null +++ b/db/migrate/20221126005221_drop_delayed_job.rb @@ -0,0 +1,5 @@ +class DropDelayedJob < ActiveRecord::Migration[7.0] + def change + drop_table :delayed_jobs + end +end diff --git a/db/schema.rb b/db/schema.rb index bc9ea7332..f4dbf8e05 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,22 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2014_11_02_103617) do - create_table "delayed_jobs", force: :cascade do |t| - t.integer "priority", default: 0 - t.integer "attempts", default: 0 - t.text "handler" - t.text "last_error" - t.datetime "run_at", precision: nil - t.datetime "locked_at", precision: nil - t.datetime "failed_at", precision: nil - t.string "locked_by" - t.string "queue" - t.datetime "created_at", precision: nil, null: false - t.datetime "updated_at", precision: nil, null: false - t.index ["priority", "run_at"], name: "delayed_jobs_priority" - end - +ActiveRecord::Schema[7.0].define(version: 2022_11_26_005221) do create_table "feeds", force: :cascade do |t| t.string "name" t.text "url" diff --git a/spec/controllers/debug_controller_spec.rb b/spec/controllers/debug_controller_spec.rb index 3c435ef9a..82630af67 100644 --- a/spec/controllers/debug_controller_spec.rb +++ b/spec/controllers/debug_controller_spec.rb @@ -6,9 +6,6 @@ describe "DebugController" do describe "GET /debug" do before do - delayed_job = double "Delayed::Job" - allow(delayed_job).to receive(:count).and_return(42) - stub_const("Delayed::Job", delayed_job) migration_status_instance = double "migration_status_instance" allow(migration_status_instance).to receive(:pending_migrations).and_return ["Migration B - 2", "Migration C - 3"] @@ -31,20 +28,6 @@ expect(page).to have_tag("dd", text: /test/) end - it "displays the delayed job count" do - get "/debug" - - page = last_response.body - expect(page).to have_tag("dd", text: /42/) - end - - it "displays pending migrations" do - get "/debug" - - page = last_response.body - expect(page).to have_tag("li", text: /Migration B - 2/) - expect(page).to have_tag("li", text: /Migration C - 3/) - end end describe "#heroku" do diff --git a/spec/controllers/feeds_controller_spec.rb b/spec/controllers/feeds_controller_spec.rb index 90c8c3d3d..8f9de9549 100644 --- a/spec/controllers/feeds_controller_spec.rb +++ b/spec/controllers/feeds_controller_spec.rb @@ -85,7 +85,6 @@ it "adds the feed and queues it to be fetched" do expect(AddNewFeed).to receive(:add).with(feed_url).and_return(valid_feed) - expect(FetchFeeds).to receive(:enqueue).with([valid_feed]) post "/feeds", feed_url: feed_url diff --git a/spec/controllers/first_run_controller_spec.rb b/spec/controllers/first_run_controller_spec.rb index 878cc3037..d97f9adca 100644 --- a/spec/controllers/first_run_controller_spec.rb +++ b/spec/controllers/first_run_controller_spec.rb @@ -57,7 +57,6 @@ it "displays the tutorial and completes setup" do expect(CompleteSetup).to receive(:complete).with(user).once - expect(FetchFeeds).to receive(:enqueue).with(feeds).once get "/setup/tutorial" diff --git a/spec/tasks/fetch_feeds_spec.rb b/spec/tasks/fetch_feeds_spec.rb index 9a7ce4ffd..368099d8d 100644 --- a/spec/tasks/fetch_feeds_spec.rb +++ b/spec/tasks/fetch_feeds_spec.rb @@ -20,29 +20,4 @@ FetchFeeds.new(feeds, pool).fetch_all end end - - describe "#prepare_to_delay" do - it "serializes the instance for backgrounding" do - feeds = [create_feed, create_feed] - feeds_ids = feeds.map(&:id) - fetch_feeds = FetchFeeds.new(feeds) - - fetch_feeds.prepare_to_delay - - expect(fetch_feeds.instance_variable_get(:@feeds)).to be_empty - expect(fetch_feeds.instance_variable_get(:@feeds_ids)).to eq(feeds_ids) - end - end - - describe ".enqueue" do - it "enqueues a fetch_all job" do - feeds = [create_feed, create_feed] - feeds_ids = feeds.map(&:id) - - expect { FetchFeeds.enqueue(feeds) }.to change(Delayed::Job, :count).by(1) - - job_object = Delayed::Job.last.payload_object.object - expect(job_object.instance_variable_get(:@feeds_ids)).to eq(feeds_ids) - end - end end From 4fd5d7334559ac76f642e460c8da710059314c12 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 6 Jan 2023 21:54:04 -0700 Subject: [PATCH 87/90] update to ruby 3.2.0 --- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.ruby-version b/.ruby-version index ff365e06b..944880fa1 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.3 +3.2.0 diff --git a/Gemfile b/Gemfile index 711557ef1..ee032e337 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -ruby "3.1.3" +ruby "3.2.0" source "https://rubygems.org" diff --git a/Gemfile.lock b/Gemfile.lock index 856d3bbb7..64be1b0b8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,15 +72,15 @@ GEM mime-types-data (~> 3.2015) mime-types-data (3.2022.0105) mini_mime (1.1.2) + mini_portile2 (2.8.1) minitest (5.16.3) multi_json (1.15.0) multi_xml (0.6.0) mustermann (3.0.0) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) - nokogiri (1.13.9-arm64-darwin) - racc (~> 1.4) - nokogiri (1.13.9-x86_64-linux) + nokogiri (1.13.9) + mini_portile2 (~> 2.8.0) racc (~> 1.4) parallel (1.22.1) parser (3.1.3.0) @@ -196,8 +196,8 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - sqlite3 (1.5.4-arm64-darwin) - sqlite3 (1.5.4-x86_64-linux) + sqlite3 (1.5.4) + mini_portile2 (~> 2.8.0) sync (0.5.0) term-ansicolor (1.7.1) tins (~> 1.0) @@ -219,6 +219,7 @@ GEM PLATFORMS arm64-darwin-21 + arm64-darwin-22 x86_64-linux DEPENDENCIES @@ -263,7 +264,7 @@ DEPENDENCIES will_paginate RUBY VERSION - ruby 3.1.2p20 + ruby 3.2.0p0 BUNDLED WITH 2.3.26 From fc8b97c1ba864c40da66760a9d836b7a5f1e1da2 Mon Sep 17 00:00:00 2001 From: David Waite Date: Fri, 6 Jan 2023 22:00:48 -0700 Subject: [PATCH 88/90] Update other gems --- Gemfile.lock | 79 +++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 64be1b0b8..76a815cc1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,17 +39,17 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) concurrent-ruby (1.1.10) - coveralls_reborn (0.25.0) - simplecov (>= 0.18.1, < 0.22.0) - term-ansicolor (~> 1.6) - thor (>= 0.20.3, < 2.0) - tins (~> 1.16) + coveralls_reborn (0.26.0) + simplecov (~> 0.22.0) + term-ansicolor (~> 1.7) + thor (~> 1.2) + tins (~> 1.32) crass (1.0.6) diff-lcs (1.5.0) docile (1.4.0) - erubi (1.11.0) + erubi (1.12.0) execjs (2.8.1) - faker (3.0.0) + faker (3.1.0) i18n (>= 1.8.11, < 2) feedbag (1.0.0) nokogiri (~> 1.8, >= 1.8.2) @@ -57,41 +57,38 @@ GEM loofah (>= 2.3.1) sax-machine (>= 1.0) ffi (1.15.5) - httparty (0.20.0) - mime-types (~> 3.0) + httparty (0.21.0) + mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) i18n (1.12.0) concurrent-ruby (~> 1.0) - json (2.6.2) - loofah (2.19.0) + json (2.6.3) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) matrix (0.4.2) method_source (1.0.0) - mime-types (3.4.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2022.0105) mini_mime (1.1.2) mini_portile2 (2.8.1) - minitest (5.16.3) + minitest (5.17.0) multi_json (1.15.0) multi_xml (0.6.0) mustermann (3.0.0) ruby2_keywords (~> 0.0.1) nio4r (2.5.8) - nokogiri (1.13.9) + nokogiri (1.13.10) mini_portile2 (~> 2.8.0) racc (~> 1.4) parallel (1.22.1) - parser (3.1.3.0) + parser (3.2.0.0) ast (~> 2.4.1) pg (1.4.5) - public_suffix (5.0.0) - puma (6.0.0) + public_suffix (5.0.1) + puma (6.0.2) nio4r (~> 2.0) - racc (1.6.0) - rack (2.2.4) - rack-protection (3.0.4) + racc (1.6.2) + rack (2.2.5) + rack-protection (3.0.5) rack rack-ssl (1.4.1) rack @@ -103,8 +100,8 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) + rails-html-sanitizer (1.4.4) + loofah (~> 2.19, >= 2.19.1) railties (7.0.4) actionpack (= 7.0.4) activesupport (= 7.0.4) @@ -122,35 +119,35 @@ GEM rspec-mocks (~> 3.12.0) rspec-core (3.12.0) rspec-support (~> 3.12.0) - rspec-expectations (3.12.0) + rspec-expectations (3.12.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-html-matchers (0.10.0) nokogiri (~> 1) rspec (>= 3.0.0.a) - rspec-mocks (3.12.0) + rspec-mocks (3.12.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) - rubocop (1.39.0) + rubocop (1.42.0) json (~> 2.3) parallel (~> 1.10) parser (>= 3.1.2.1) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.23.0, < 2.0) + rubocop-ast (>= 1.24.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.23.0) + rubocop-ast (1.24.1) parser (>= 3.1.1.0) - rubocop-rails (2.17.3) + rubocop-rails (2.17.4) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-rake (0.6.0) rubocop (~> 1.0) - rubocop-rspec (2.15.0) + rubocop-rspec (2.16.0) rubocop (~> 1.33) ruby-progressbar (1.11.0) ruby2_keywords (0.0.5) @@ -165,31 +162,31 @@ GEM sax-machine (1.3.2) shotgun (0.9.2) rack (>= 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.4) - sinatra (3.0.4) + sinatra (3.0.5) mustermann (~> 3.0) rack (~> 2.2, >= 2.2.4) - rack-protection (= 3.0.4) + rack-protection (= 3.0.5) tilt (~> 2.0) sinatra-activerecord (2.0.26) activerecord (>= 4.1) sinatra (>= 1.0) - sinatra-contrib (3.0.4) + sinatra-contrib (3.0.5) multi_json mustermann (~> 3.0) - rack-protection (= 3.0.4) - sinatra (= 3.0.4) + rack-protection (= 3.0.5) + sinatra (= 3.0.5) tilt (~> 2.0) sinatra-flash (0.3.0) sinatra (>= 1.0.0) - sprockets (4.1.1) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-helpers (1.4.0) sprockets (>= 2.2) sprockets-rails (3.4.2) @@ -204,14 +201,14 @@ GEM thor (1.2.1) thread (0.2.2) tilt (2.0.11) - timecop (0.9.5) + timecop (0.9.6) tins (1.32.1) sync tzinfo (2.0.5) concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (2.3.0) + unicode-display_width (2.4.2) will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) From 609800aec711309ed23efc954d7f5ca734363ae2 Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 9 Jan 2023 21:10:53 -0700 Subject: [PATCH 89/90] moor updates --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 76a815cc1..4a925957c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,13 +119,13 @@ GEM rspec-mocks (~> 3.12.0) rspec-core (3.12.0) rspec-support (~> 3.12.0) - rspec-expectations (3.12.1) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-html-matchers (0.10.0) nokogiri (~> 1) rspec (>= 3.0.0.a) - rspec-mocks (3.12.1) + rspec-mocks (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.0) From 8f241852f9854d1a6d937d47251db8354e60899e Mon Sep 17 00:00:00 2001 From: David Waite Date: Mon, 9 Jan 2023 22:08:22 -0700 Subject: [PATCH 90/90] more aggressive error logging --- app/tasks/fetch_feed.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/tasks/fetch_feed.rb b/app/tasks/fetch_feed.rb index 27aede38d..9ba42b113 100644 --- a/app/tasks/fetch_feed.rb +++ b/app/tasks/fetch_feed.rb @@ -34,7 +34,12 @@ def fetch def fetch_raw_feed response = @client.get(@feed.url).to_s - @parser.parse(response) + begin + @parser.parse(response) + rescue => e + @logger&.error "Error fetching feed: #{e}, server response: #{response[...100]}" + raise + end end def feed_not_modified