From 70ac21518d322f70e5e80f925de954ce1ae04071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Wed, 19 Dec 2018 16:27:02 +0100 Subject: [PATCH] Redmine 3.x support --- Gemfile | 8 ++++++-- init.rb | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 13946ec..4c47cb1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,8 @@ source 'https://rubygems.org' -gem 'acts_as_list' -gem 'activemodel-serializers-xml' \ No newline at end of file +require 'rails' + +if Gem::Version.new(Rails.gem_version) >= Gem::Version.new('5.0.0') + gem 'acts_as_list' + gem 'activemodel-serializers-xml' +end \ No newline at end of file diff --git a/init.rb b/init.rb index 9ac4cf2..8dac7da 100644 --- a/init.rb +++ b/init.rb @@ -7,7 +7,7 @@ Redmine::Plugin.register :redmine_custom_workflows do version '0.1.6' url 'http://www.redmine.org/plugins/custom-workflows' - requires_redmine version_or_higher: '4.0.0' + requires_redmine version_or_higher: '3.0.0' menu :admin_menu, :custom_workflows, {:controller => 'custom_workflows', :action => 'index'}, :if => Proc.new { User.current.admin? }, :caption => :label_custom_workflow_plural,