diff --git a/.rubocop.yml b/.rubocop.yml index f54f2a7..5385854 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,7 +5,7 @@ require: AllCops: TargetRubyVersion: 2.7 - TargetRailsVersion: 5.2 + TargetRailsVersion: 6.1 NewCops: enable Rails: diff --git a/lib/tasks/redmine_plugin_kit.rake b/lib/tasks/redmine_plugin_kit.rake index d10e251..76c1459 100644 --- a/lib/tasks/redmine_plugin_kit.rake +++ b/lib/tasks/redmine_plugin_kit.rake @@ -45,7 +45,7 @@ namespace :redmine_plugin_kit do if name == 'redmine' Setting[setting.to_sym] = value else - plugin_name = "plugin_#{name}".to_sym + plugin_name = :"plugin_#{name}" plugin_settings = Setting[plugin_name] plugin_settings[setting] = value Setting[plugin_name] = plugin_settings @@ -74,7 +74,7 @@ namespace :redmine_plugin_kit do if name == 'redmine' puts Setting.send(setting) else - plugin_name = "plugin_#{name}".to_sym + plugin_name = :"plugin_#{name}" plugin_settings = Setting[plugin_name] puts plugin_settings[setting] end diff --git a/test/units/loader_test.rb b/test/units/loader_test.rb index a9cddc8..c641c4d 100644 --- a/test/units/loader_test.rb +++ b/test/units/loader_test.rb @@ -144,13 +144,13 @@ def test_do_not_allow_helper_if_controller_patch_exists_as_hash def test_load_model_hooks hooks = RedminePluginKit::Loader.new(plugin_id: @plugin_id).load_model_hooks! - assert hooks.is_a? Module + assert_kind_of Module, hooks end def test_load_hooks hooks = RedminePluginKit::Loader.new(plugin_id: @plugin_id).load_view_hooks! - assert hooks.is_a? Module + assert_kind_of Module, hooks end def test_load_macros