update to Redmine 5

This commit is contained in:
Stefan Hirche 2023-02-02 15:44:24 +01:00
parent b045626ab9
commit 230793baf6
3 changed files with 14 additions and 7 deletions

2
after_init.rb Normal file
View File

@ -0,0 +1,2 @@
require 'redmine'
require File.dirname(__FILE__) + '/lib/redmine_git_remote'

View File

@ -2,7 +2,6 @@ require 'redmine/scm/adapters/git_adapter'
require 'pathname'
require 'fileutils'
# require 'open3'
require_dependency 'redmine_git_remote/poor_mans_capture3'
class Repository::GitRemote < Repository::Git

18
init.rb
View File

@ -1,5 +1,3 @@
require 'redmine'
require_dependency "redmine_git_remote/repositories_helper_patch"
Redmine::Scm::Base.add "GitRemote"
@ -9,8 +7,16 @@ Redmine::Plugin.register :redmine_git_remote do
url 'https://github.com/dergachev/redmine_git_remote'
description 'Automatically clone and fetch remote git repositories'
version '0.0.2'
settings :default => {
'git_remote_repo_clone_path' => Pathname.new(__FILE__).join("../").realpath.to_s + "/repos",
}, :partial => 'settings/git_remote_settings'
requires_redmine version_or_higher: '5.0.0'
settings partial: 'settings/git_remote_settings',
default: {
'git_remote_repo_clone_path' => Pathname.new(__FILE__).join("../").realpath.to_s + "/repos"
}
end
unless Redmine::Plugin.installed?(:easy_extensions)
require_relative 'after_init'
end