From d230818cfd23d88453f5ba5720cb6762360da047 Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Sun, 17 Oct 2021 11:33:57 +0200 Subject: [PATCH] Ruby 2.5 is unsupported. Use Ruby 2.6 or newer --- .github/workflows/tests.yml | 2 +- .rubocop.yml | 2 +- CHANGELOG.rst | 1 + additionals.gemspec | 2 +- docs/index.rst | 2 +- lib/additionals/wiki_macros/reddit_macro.rb | 2 +- lib/additionals/wiki_macros/redmine_wiki_macro.rb | 2 +- lib/additionals/wiki_macros/twitter_macro.rb | 4 ++-- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dbd5a911..f933f1ef 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - ruby: ['2.7', '2.6', '2.5'] + ruby: ['2.7', '2.6'] redmine: ['4.1-stable', '4.2-stable', 'master'] db: ['postgres', 'mysql'] exclude: diff --git a/.rubocop.yml b/.rubocop.yml index 186d82f3..35f740f3 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,7 +6,7 @@ Rails: Enabled: true AllCops: - TargetRubyVersion: 2.5 + TargetRubyVersion: 2.6 TargetRailsVersion: 5.2 NewCops: enable diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2508e323..2e5c3dc3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ Changelog - Mermaid 8.13.3 support - D3 7.1.1 support +- Ruby 2.6 is required 3.0.3 +++++ diff --git a/additionals.gemspec b/additionals.gemspec index 566d35e6..eeb6c716 100644 --- a/additionals.gemspec +++ b/additionals.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.files = Dir['**/*'] - Dir['test/**/*'] - Dir['Gemfile', 'Gemfile.lock', 'README.rst'] spec.require_paths = ['lib'] - spec.required_ruby_version = '>= 2.5' + spec.required_ruby_version = '>= 2.6' spec.add_runtime_dependency 'deface', '1.8.1' spec.add_runtime_dependency 'gemoji', '~> 3.0.0' diff --git a/docs/index.rst b/docs/index.rst index 6c8d2990..db0fc67e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -37,7 +37,7 @@ Requirements +--------------------+-----------------------------------+ | `Redmine`_ version | >= 4.1.0 | +--------------------+-----------------------------------+ -| `Ruby`_ version | >= 2.5.0 | +| `Ruby`_ version | >= 2.6 | +--------------------+-----------------------------------+ | Database version | MySQL >= 5.7 or PostgreSQL >= 9.6 | +--------------------+-----------------------------------+ diff --git a/lib/additionals/wiki_macros/reddit_macro.rb b/lib/additionals/wiki_macros/reddit_macro.rb index eebbf368..83a8210c 100644 --- a/lib/additionals/wiki_macros/reddit_macro.rb +++ b/lib/additionals/wiki_macros/reddit_macro.rb @@ -21,7 +21,7 @@ module Additionals title: l(:label_reddit_subject) when 'u/' link_to font_awesome_icon('fab_reddit-square', post_text: name), - "https://www.reddit.com/username/#{name[2..-1]}", + "https://www.reddit.com/username/#{name[2..]}", class: 'external reddit', title: l(:label_reddit_user_account) else diff --git a/lib/additionals/wiki_macros/redmine_wiki_macro.rb b/lib/additionals/wiki_macros/redmine_wiki_macro.rb index 9ff6845d..3e6a9560 100644 --- a/lib/additionals/wiki_macros/redmine_wiki_macro.rb +++ b/lib/additionals/wiki_macros/redmine_wiki_macro.rb @@ -19,7 +19,7 @@ module Additionals start_pos = raw_link.index 'redmine.org/projects/redmine/wiki/' raise 'The correct usage is {{redmine_wiki()}}' if start_pos.nil? || start_pos.zero? - options[:name] = raw_link[(start_pos + 34)..-1] if options[:name].blank? + options[:name] = raw_link[(start_pos + 34)..] if options[:name].blank? link = raw_link.gsub 'http://', 'https://' elsif /\w/.match?(raw_link[0]) options[:name] = raw_link if options[:name].blank? diff --git a/lib/additionals/wiki_macros/twitter_macro.rb b/lib/additionals/wiki_macros/twitter_macro.rb index f84bc176..a720dc83 100644 --- a/lib/additionals/wiki_macros/twitter_macro.rb +++ b/lib/additionals/wiki_macros/twitter_macro.rb @@ -15,12 +15,12 @@ module Additionals case name[0] when '@' link_to(font_awesome_icon('fab_twitter', post_text: name), - "https://twitter.com/#{name[1..-1]}", + "https://twitter.com/#{name[1..]}", class: 'external twitter', title: l(:label_twitter_account)) when '#' link_to(font_awesome_icon('fab_twitter-square', post_text: name), - "https://twitter.com/hashtag/#{name[1..-1]}", + "https://twitter.com/hashtag/#{name[1..]}", class: 'external twitter', title: l(:label_twitter_hashtag)) else