From 0ac71ea63554e2c5d248771a31396692bb52fd9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 13 May 2019 17:19:50 +0000 Subject: [PATCH 1/6] Bump rubocop from 0.65.0 to 0.69.0 Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.65.0 to 0.69.0. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.65.0...v0.69.0) Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index d66c2924..f1eb1765 100644 --- a/Gemfile +++ b/Gemfile @@ -61,7 +61,7 @@ end group :development, :test do gem 'byebug' gem 'listen' - gem "rubocop", "~> 0.65", require: false + gem "rubocop", "~> 0.69", require: false end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 0c28b987..86219391 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -142,11 +142,9 @@ GEM mime-types mimemagic (~> 0.3.0) terrapin (~> 0.6.0) - parallel (1.13.0) - parser (2.6.0.0) + parallel (1.17.0) + parser (2.6.3.0) ast (~> 2.4.0) - powerpack (0.1.2) - psych (3.1.0) puma (3.12.1) rack (2.0.7) rack-mini-profiler (1.0.2) @@ -193,15 +191,13 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) - rubocop (0.65.0) + rubocop (0.69.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - powerpack (~> 0.1) - psych (>= 3.1.0) + parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (~> 1.4.0) + unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.0) ruby_dep (1.5.0) rubyzip (1.2.2) @@ -262,7 +258,7 @@ GEM thread_safe (~> 0.1) uglifier (4.1.20) execjs (>= 0.3.0, < 3) - unicode-display_width (1.4.1) + unicode-display_width (1.6.0) uniform_notifier (1.12.1) websocket (1.2.8) websocket-driver (0.7.0) @@ -304,7 +300,7 @@ DEPENDENCIES rails-dom-testing (~> 2.0.0) rails_autolink rspec-expectations - rubocop (~> 0.65) + rubocop (~> 0.69) sanitize (~> 5.0) sass-rails (~> 5.0) selenium-webdriver (~> 2.53) From fc9f8eddd20848e3b96fb0941746c90e6cb7c9cb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 21 May 2019 06:04:42 +0000 Subject: [PATCH 2/6] Bump selenium-webdriver from 2.53.4 to 3.142.3 Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 2.53.4 to 3.142.3. - [Release notes](https://github.com/SeleniumHQ/selenium/releases) - [Changelog](https://github.com/SeleniumHQ/selenium/blob/master/rb/CHANGES) - [Commits](https://github.com/SeleniumHQ/selenium/commits) Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index f1eb1765..7a90ebb1 100644 --- a/Gemfile +++ b/Gemfile @@ -75,7 +75,7 @@ group :test do gem "mocha", :require => false gem "minitest-stub-const" - gem "selenium-webdriver", "~> 2.53" + gem "selenium-webdriver", "~> 3.142" # uncomment to use the webkit option. This depends on Qt being installed # gem "capybara-webkit" diff --git a/Gemfile.lock b/Gemfile.lock index 86219391..ffa2b45d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,8 +66,8 @@ GEM activesupport (>= 3.0.0) uniform_notifier (~> 1.11) byebug (11.0.1) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) + childprocess (1.0.1) + rake (< 13.0) climate_control (0.2.0) codeclimate-test-reporter (1.0.7) simplecov @@ -220,10 +220,9 @@ GEM sassc (2.0.0) ffi (~> 1.9.6) rake - selenium-webdriver (2.53.4) - childprocess (~> 0.5) - rubyzip (~> 1.0) - websocket (~> 1.0) + selenium-webdriver (3.142.3) + childprocess (>= 0.5, < 2.0) + rubyzip (~> 1.2, >= 1.2.2) simplecov (0.16.1) docile (~> 1.1) json (>= 1.8, < 3) @@ -260,7 +259,6 @@ GEM execjs (>= 0.3.0, < 3) unicode-display_width (1.6.0) uniform_notifier (1.12.1) - websocket (1.2.8) websocket-driver (0.7.0) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.3) @@ -303,7 +301,7 @@ DEPENDENCIES rubocop (~> 0.69) sanitize (~> 5.0) sass-rails (~> 5.0) - selenium-webdriver (~> 2.53) + selenium-webdriver (~> 3.142) simplecov spring sqlite3 From d784b1a5ebd63ec6971241c6e7b1e0fdcc8ac2f0 Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Tue, 21 May 2019 15:17:50 +0300 Subject: [PATCH 3/6] #1929: Fix the actions query breaking when querying actions with a non-existent tag --- app/models/todos/undone_todos_query.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/todos/undone_todos_query.rb b/app/models/todos/undone_todos_query.rb index b4980870..18a630ac 100644 --- a/app/models/todos/undone_todos_query.rb +++ b/app/models/todos/undone_todos_query.rb @@ -27,6 +27,9 @@ module Todos if params[:tag] tag = Tag.where(:name => params[:tag]).first + if not tag + return [] + end not_done_todos = not_done_todos.joins(:taggings).where('taggings.tag_id = ?', tag.id) end From 7fc1f1bf9f72c9472e8931e022e4d00090e82a8e Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Tue, 21 May 2019 22:28:37 +0300 Subject: [PATCH 4/6] Update app/models/todos/undone_todos_query.rb Co-Authored-By: Matt Rogers --- app/models/todos/undone_todos_query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/todos/undone_todos_query.rb b/app/models/todos/undone_todos_query.rb index 18a630ac..2ba2571c 100644 --- a/app/models/todos/undone_todos_query.rb +++ b/app/models/todos/undone_todos_query.rb @@ -27,7 +27,7 @@ module Todos if params[:tag] tag = Tag.where(:name => params[:tag]).first - if not tag + return [] if !tag return [] end not_done_todos = not_done_todos.joins(:taggings).where('taggings.tag_id = ?', tag.id) From 644cf0d9e76d62414e8d2b18b992ab54a770a98c Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Tue, 21 May 2019 22:33:21 +0300 Subject: [PATCH 5/6] Fix the syntax --- app/models/todos/undone_todos_query.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/models/todos/undone_todos_query.rb b/app/models/todos/undone_todos_query.rb index 2ba2571c..c6d107ab 100644 --- a/app/models/todos/undone_todos_query.rb +++ b/app/models/todos/undone_todos_query.rb @@ -27,9 +27,7 @@ module Todos if params[:tag] tag = Tag.where(:name => params[:tag]).first - return [] if !tag - return [] - end + return [] if !tag not_done_todos = not_done_todos.joins(:taggings).where('taggings.tag_id = ?', tag.id) end From 43523d819153402189d79b569efff17e6638b9ef Mon Sep 17 00:00:00 2001 From: Jyri-Petteri Paloposki Date: Wed, 22 May 2019 00:40:58 +0300 Subject: [PATCH 6/6] Test the RSS feed of starred, active todos --- test/integration/feed_smoke_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/integration/feed_smoke_test.rb b/test/integration/feed_smoke_test.rb index 6eb762bd..d172cdbd 100644 --- a/test/integration/feed_smoke_test.rb +++ b/test/integration/feed_smoke_test.rb @@ -84,6 +84,10 @@ class FeedSmokeTest < ActionDispatch::IntegrationTest assert_success "/todos.rss?token=#{ users(:admin_user).token }&done=7" end + def test_all_starred_active_actions_rss + assert_success "/todos.rss?token=#{ users(:admin_user).token }&tag=starred" + end + def test_all_actions_completed_in_last_7_days_txt assert_success "/todos.txt?token=#{ users(:admin_user).token }&done=7" end