update to Redmine 5
This commit is contained in:
parent
b045626ab9
commit
230793baf6
2
after_init.rb
Normal file
2
after_init.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
require 'redmine'
|
||||||
|
require File.dirname(__FILE__) + '/lib/redmine_git_remote'
|
@ -2,7 +2,6 @@ require 'redmine/scm/adapters/git_adapter'
|
|||||||
require 'pathname'
|
require 'pathname'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
# require 'open3'
|
# require 'open3'
|
||||||
require_dependency 'redmine_git_remote/poor_mans_capture3'
|
|
||||||
|
|
||||||
class Repository::GitRemote < Repository::Git
|
class Repository::GitRemote < Repository::Git
|
||||||
|
|
||||||
|
16
init.rb
16
init.rb
@ -1,5 +1,3 @@
|
|||||||
require 'redmine'
|
|
||||||
require_dependency "redmine_git_remote/repositories_helper_patch"
|
|
||||||
|
|
||||||
Redmine::Scm::Base.add "GitRemote"
|
Redmine::Scm::Base.add "GitRemote"
|
||||||
|
|
||||||
@ -10,7 +8,15 @@ Redmine::Plugin.register :redmine_git_remote do
|
|||||||
description 'Automatically clone and fetch remote git repositories'
|
description 'Automatically clone and fetch remote git repositories'
|
||||||
version '0.0.2'
|
version '0.0.2'
|
||||||
|
|
||||||
settings :default => {
|
requires_redmine version_or_higher: '5.0.0'
|
||||||
'git_remote_repo_clone_path' => Pathname.new(__FILE__).join("../").realpath.to_s + "/repos",
|
|
||||||
}, :partial => 'settings/git_remote_settings'
|
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
|
end
|
Loading…
Reference in New Issue
Block a user