From 7014008246fd604ab3647353bd315e1f8351f63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Fri, 13 May 2022 08:07:10 +0200 Subject: [PATCH 1/2] IssueRelation.to_s is broken #258 --- .../patches/issue_relation_patch.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/redmine_custom_workflows/patches/issue_relation_patch.rb b/lib/redmine_custom_workflows/patches/issue_relation_patch.rb index 1e67623..ecde0e2 100644 --- a/lib/redmine_custom_workflows/patches/issue_relation_patch.rb +++ b/lib/redmine_custom_workflows/patches/issue_relation_patch.rb @@ -36,7 +36,15 @@ module RedmineCustomWorkflows alias_method :old_to_s, :to_s def to_s(issue=nil) - block_given? ? old_to_s(issue, &Proc.new {}) : old_to_s(issue) + if block_given? + if Gem.ruby_version < Gem::Version.new('3.0') + old_to_s issue, &Proc.new + else + old_to_s issue, &Proc.new {} + end + else + old_to_s issue + end rescue NoMethodError => e if issue_from.present? || issue_to.present? raise e From 083a5474f169f05afdd9e8fb1681614886f86a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Fri, 13 May 2022 13:19:36 +0200 Subject: [PATCH 2/2] v2.0.1 released --- CHANGELOG.md | 8 ++++++++ README.md | 2 +- init.rb | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4359044..1cf3300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changelog for Custom Workflows ============================== +2.0.1 *2022-05-13* +------------------ + + Ruby 2.7 backward compatibility + +* Bug: #257 - IssueRelation.to_s is broken after #257 bug +* Bug: #258 - Tried to create Proc object without a block + 2.0.0 *2022-04-27* ------------------ diff --git a/README.md b/README.md index 18d9fe3..4f08bec 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Custom Workflows plug-in ======================== -The current version of Redmine CustomWorkflows is **2.0.0** +The current version of Redmine CustomWorkflows is **2.0.1** [![pipeline status](https://gitlab.kontron.com/redmine-plugins/redmine_custom_workflows/badges/master/pipeline.svg)](https://gitlab.kontron.com/redmine-plugins/redmine_custom_workflows/-/commits/master) [![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine) diff --git a/init.rb b/init.rb index 9658492..37cef3e 100644 --- a/init.rb +++ b/init.rb @@ -32,7 +32,7 @@ Redmine::Plugin.register :redmine_custom_workflows do end author 'Anton Argirov/Karel Pičman' description 'It allows to create custom workflows for objects, defined in a plain Ruby language' - version '2.0.0' + version '2.0.1' requires_redmine version_or_higher: '4.1.0'