From 729e5a2add46fb4e2d8ed092da05a87ebbfcf05b Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 3 Oct 2022 21:20:04 +0100 Subject: [PATCH] DEV: Bump rubocop-discourse (#188) * DEV: Bump rubocop-discourse * Fix rubocop violations --- Gemfile.lock | 22 ++++++++++++---------- spec/requests/query_controller_spec.rb | 2 +- spec/{lib => }/tasks/data_explorer_spec.rb | 8 ++++---- spec/{lib => }/tasks/fix_query_ids_spec.rb | 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) rename spec/{lib => }/tasks/data_explorer_spec.rb (97%) rename spec/{lib => }/tasks/fix_query_ids_spec.rb (99%) diff --git a/Gemfile.lock b/Gemfile.lock index 80f9054..2434c95 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,30 +2,32 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) + json (2.6.2) parallel (1.22.1) - parser (3.1.2.0) + parser (3.1.2.1) ast (~> 2.4.1) rainbow (3.1.1) - regexp_parser (2.5.0) + regexp_parser (2.6.0) rexml (3.2.5) - rubocop (1.30.1) + rubocop (1.36.0) + json (~> 2.3) parallel (~> 1.10) - parser (>= 3.1.0.0) + 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.18.0, < 2.0) + rubocop-ast (>= 1.20.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.18.0) + rubocop-ast (1.21.0) parser (>= 3.1.1.0) - rubocop-discourse (2.5.0) + rubocop-discourse (3.0) rubocop (>= 1.1.0) rubocop-rspec (>= 2.0.0) - rubocop-rspec (2.11.1) - rubocop (~> 1.19) + rubocop-rspec (2.13.2) + rubocop (~> 1.33) ruby-progressbar (1.11.0) - unicode-display_width (2.1.0) + unicode-display_width (2.3.0) PLATFORMS arm64-darwin-20 diff --git a/spec/requests/query_controller_spec.rb b/spec/requests/query_controller_spec.rb index 065a8f9..f322ce9 100644 --- a/spec/requests/query_controller_spec.rb +++ b/spec/requests/query_controller_spec.rb @@ -275,7 +275,7 @@ describe DataExplorer::QueryController do expect(response.status).to eq(200) end - context "`limit` parameter" do + context "with the `limit` parameter" do before do create_post create_post diff --git a/spec/lib/tasks/data_explorer_spec.rb b/spec/tasks/data_explorer_spec.rb similarity index 97% rename from spec/lib/tasks/data_explorer_spec.rb rename to spec/tasks/data_explorer_spec.rb index ad4bf86..9d11178 100644 --- a/spec/lib/tasks/data_explorer_spec.rb +++ b/spec/tasks/data_explorer_spec.rb @@ -55,7 +55,7 @@ describe 'Data Explorer rake tasks' do expect(hidden_queries[2].id).to eq(4) end - context 'query does not exist in PluginStore' do + context 'when query does not exist in PluginStore' do it 'should not hide the query' do DataExplorer::Query.destroy_all make_query('SELECT 1 as value', id: 1, name: 'A') @@ -104,7 +104,7 @@ describe 'Data Explorer rake tasks' do expect(hidden_queries[0].id).to eq(3) end - context 'query does not exist in PluginStore' do + context 'when query does not exist in PluginStore' do it 'should not unhide the query' do DataExplorer::Query.destroy_all make_query('SELECT 1 as value', id: 1, name: 'A', hidden: true) @@ -153,7 +153,7 @@ describe 'Data Explorer rake tasks' do expect(hidden_queries[0].id).to eq(3) end - context 'query does not exist in PluginStore' do + context 'when query does not exist in PluginStore' do it 'should not hard delete the query' do DataExplorer::Query.destroy_all make_query('SELECT 1 as value', id: 1, name: 'A', hidden: true) @@ -168,7 +168,7 @@ describe 'Data Explorer rake tasks' do end end - context 'query is not hidden' do + context 'when query is not hidden' do it 'should not hard delete the query' do DataExplorer::Query.destroy_all make_query('SELECT 1 as value', id: 1, name: 'A') diff --git a/spec/lib/tasks/fix_query_ids_spec.rb b/spec/tasks/fix_query_ids_spec.rb similarity index 99% rename from spec/lib/tasks/fix_query_ids_spec.rb rename to spec/tasks/fix_query_ids_spec.rb index 5e93647..1b2f38f 100644 --- a/spec/lib/tasks/fix_query_ids_spec.rb +++ b/spec/tasks/fix_query_ids_spec.rb @@ -65,7 +65,7 @@ describe 'fix query ids rake task' do expect(find(query_name).id).to eq(additional_conflict.id) end - context 'query groups' do + describe 'query groups' do let(:group) { Fabricate(:group) } it "fixes the query group's query_id" do