From 20cf1ac85b28e70328987eccfc34ff2a668dd34c Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 26 Oct 2023 06:05:14 +0200 Subject: [PATCH] Fix rubocop nits --- db/migrate/20231026032527_rename_appendable_to_reaction.rb | 4 +++- lib/use_case/data_export/reactions.rb | 4 ++-- spec/lib/use_case/data_export/reactions_spec.rb | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/db/migrate/20231026032527_rename_appendable_to_reaction.rb b/db/migrate/20231026032527_rename_appendable_to_reaction.rb index 5af26242..6a7b5d9d 100644 --- a/db/migrate/20231026032527_rename_appendable_to_reaction.rb +++ b/db/migrate/20231026032527_rename_appendable_to_reaction.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + class RenameAppendableToReaction < ActiveRecord::Migration[7.0] def change rename_table :appendables, :reactions - remove_column :reactions, :type + remove_column :reactions, :type, :string end end diff --git a/lib/use_case/data_export/reactions.rb b/lib/use_case/data_export/reactions.rb index 661592f6..7710f8e7 100644 --- a/lib/use_case/data_export/reactions.rb +++ b/lib/use_case/data_export/reactions.rb @@ -7,8 +7,8 @@ module UseCase "reactions.json" => json_file!( reactions: [ *user.smiles.map(&method(:collect_reaction)) - ] - ) + ], + ), } def collect_reaction(reaction) diff --git a/spec/lib/use_case/data_export/reactions_spec.rb b/spec/lib/use_case/data_export/reactions_spec.rb index cab38f43..2431da77 100644 --- a/spec/lib/use_case/data_export/reactions_spec.rb +++ b/spec/lib/use_case/data_export/reactions_spec.rb @@ -9,7 +9,7 @@ describe UseCase::DataExport::Reactions, :data_export do it "returns an empty set of reactions" do expect(json_file("reactions.json")).to eq( { - reactions: [] + reactions: [], } ) end