From 3b813c014521089820bed0525471fe039bacb3b6 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sun, 10 Nov 2024 17:33:16 +0100 Subject: [PATCH] Update for redmine 6 --- .rubocop.yml | 11 +++-------- app/models/issue_view_column.rb | 2 +- init.rb | 4 ++-- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index e4c6ba3..e78740c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,8 +4,8 @@ require: - rubocop-minitest AllCops: - TargetRubyVersion: 2.7 - TargetRailsVersion: 6.1 + TargetRubyVersion: 3.1 + TargetRailsVersion: 7.2 NewCops: enable Rails: @@ -86,7 +86,6 @@ Style/AutoResourceCleanup: Style/ExpandPathArguments: Enabled: true Exclude: - - additionals.gemspec - test/**/* Style/FrozenStringLiteralComment: @@ -105,7 +104,7 @@ Style/OptionHash: - parameters - settings Exclude: - - lib/additionals/patches/*.rb + - lib/redmine_issue_view_columns/patches/*.rb # postgresql and mysql are supported # autodetect does not work without database configuration @@ -139,10 +138,6 @@ Naming/VariableNumber: Exclude: - 'test/**/*' -Style/StringConcatenation: - Exclude: - - 'app/views/additionals/_select2_ajax_call.*' - # see https://github.com/rubocop/rubocop-rails/issues/578 # redmine does not use load_defaults: https://rails.rubystyle.guide/#config-defaults Rails/RedundantPresenceValidationOnBelongsTo: diff --git a/app/models/issue_view_column.rb b/app/models/issue_view_column.rb index 93365d6..ca0fa81 100644 --- a/app/models/issue_view_column.rb +++ b/app/models/issue_view_column.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class IssueViewColumn < AdditionalsApplicationRecord +class IssueViewColumn < ApplicationRecord belongs_to :project scope :sorted, -> { order :position } diff --git a/init.rb b/init.rb index 53846f3..9ee1ed4 100644 --- a/init.rb +++ b/init.rb @@ -9,10 +9,10 @@ author_url 'https://alphanodes.com/' description 'Customize shown columns in subtasks and related issues on issue page' version RedmineIssueViewColumns::VERSION - requires_redmine version_or_higher: '5.0' + requires_redmine version_or_higher: '5.1' # redmine 6.0 is required, but version is not set in redmine source yet begin - requires_redmine_plugin :additionals, version_or_higher: '3.2.0' + requires_redmine_plugin :additionals, version_or_higher: '4.0.0' rescue Redmine::PluginNotFound raise 'Please install additionals plugin (https://github.com/alphanodes/additionals)' end