From 6871d5d8f06aae0468bd5a364dd6b0d8c5dcafd8 Mon Sep 17 00:00:00 2001 From: Liane Hampe Date: Thu, 26 Jan 2023 09:44:34 +0100 Subject: [PATCH 1/3] Fixes common mark support The helper for supporting common mark was prepared but not loaded. Therefore, the wikitool bar does not extend with the required drawio buttons. By requiring the helper file in lib/redmine_drawio.rb the code will be executed now. --- lib/redmine_drawio.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/redmine_drawio.rb b/lib/redmine_drawio.rb index 933270d6..32219659 100644 --- a/lib/redmine_drawio.rb +++ b/lib/redmine_drawio.rb @@ -7,6 +7,7 @@ require File.expand_path('../redmine_drawio/patches/rbpdf_patch', __FILE__) # Helpers +require File.expand_path('../redmine_drawio/helpers/common_mark_helper', __FILE__) require File.expand_path('../redmine_drawio/helpers/drawio_dmsf_helper', __FILE__) require File.expand_path('../redmine_drawio/helpers/drawio_settings_helper', __FILE__) require File.expand_path('../redmine_drawio/helpers/textile_helper', __FILE__) From 36a51cd64c0a72d92d966d7e4214f81f247aede5 Mon Sep 17 00:00:00 2001 From: Liane Hampe Date: Thu, 26 Jan 2023 09:52:03 +0100 Subject: [PATCH 2/3] Fixes some tests Since Ruby 3 passing method argumentes changed. A Hash won't be converted to a keyword argument anymore. Therefore, keyword argumentes needs to be entered explicitly by default. To keep the behaviour double splat needs to be added to hash arguments. See https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ --- test/integration/macro_dialog_test.rb | 4 ++-- test/unit/drawio_settings_helper_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/macro_dialog_test.rb b/test/integration/macro_dialog_test.rb index 8325c634..55d94d01 100644 --- a/test/integration/macro_dialog_test.rb +++ b/test/integration/macro_dialog_test.rb @@ -25,14 +25,14 @@ def teardown end test 'render macro diaglog without svg' do - with_settings(redmine_drawio({ drawio_svg_enabled: false })) do + with_settings(redmine_drawio(**{ drawio_svg_enabled: false })) do render_marcro_dialog assert_select 'input[value=?]', 'svg', 0 end end test 'render macro diaglog with svg' do - with_settings(redmine_drawio({ drawio_svg_enabled: true })) do + with_settings(redmine_drawio(**{ drawio_svg_enabled: true })) do render_marcro_dialog assert_select 'input[value=?]', 'svg' end diff --git a/test/unit/drawio_settings_helper_test.rb b/test/unit/drawio_settings_helper_test.rb index 25f6edb7..278bb97b 100644 --- a/test/unit/drawio_settings_helper_test.rb +++ b/test/unit/drawio_settings_helper_test.rb @@ -14,13 +14,13 @@ def teardown end def test_svg_disabled - with_settings(redmine_drawio({ drawio_svg_enabled: false })) do + with_settings(redmine_drawio(**{ drawio_svg_enabled: false })) do assert_not svg_enabled? end end def test_svg_enabled - with_settings(redmine_drawio({ drawio_svg_enabled: true })) do + with_settings(redmine_drawio(**{ drawio_svg_enabled: true })) do assert svg_enabled? end end From b2e1d82c5fdd631724047fde42aa90b7d9e13cc9 Mon Sep 17 00:00:00 2001 From: Michele Tessaro Date: Sat, 28 Jan 2023 10:55:14 +0100 Subject: [PATCH 3/3] chg: pkg: prepared for the new release --- CHANGELOG.md | 25 ++++++++++++++++++++++++- init.rb | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd2ae850..58f4147f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,30 @@ ## development (unreleased) -### v1.4.5 (2022-12-09) +### Fix + +* Fixes some tests. [Liane Hampe] + + Since Ruby 3 passing method argumentes changed. A Hash won't be + converted to a keyword argument anymore. Therefore, keyword argumentes + needs to be entered explicitly by default. To keep the behaviour double + splat needs to be added to hash arguments. + + See https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/ + +* Fixes common mark support. [Liane Hampe] + + The helper for supporting common mark was prepared but not loaded. + Therefore, the wikitool bar does not extend with the required + drawio buttons. + + By requiring the helper file in lib/redmine_drawio.rb the code will + be executed now. + + +## v1.4.5 (2022-12-09) + +### Other * Fix mail sending error. [Hunt Lin] diff --git a/init.rb b/init.rb index b8775e02..9cf2cd68 100644 --- a/init.rb +++ b/init.rb @@ -4,7 +4,7 @@ name 'Redmine Drawio plugin' author 'Michele Tessaro' description 'Wiki macro plugin for inserting drawio diagrams into Wiki pages and Issues' - version '1.4.5' + version '1.4.6' url 'https://github.com/mikitex70/redmine_drawio' author_url 'https://github.com/mikitex70'