redmine_with_git 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/backup_controller.rb +1 -1
- data/config/initializers/000_dependencies.rb +2 -2
- data/config/initializers/001_patches.rb +3 -3
- data/init.rb +5 -1
- data/lib/redmine_with_git/dump/base.rb +2 -2
- data/lib/redmine_with_git/patches/redmine_git_hosting/cache/database_patch.rb +2 -2
- data/lib/redmine_with_git/patches/redmine_git_hosting/commands/git/git_patch.rb +2 -2
- data/lib/redmine_with_git/patches/redmine_git_hosting/gitolite_hook_patch.rb +5 -6
- data/lib/redmine_with_git/version.rb +4 -1
- data/lib/tasks/redmine_with_git.rake +5 -5
- metadata +13 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9a7e705894ab5d534e838caf0bdf76c06122cf5ae7aa0a54eda43d47ab606d5
|
4
|
+
data.tar.gz: d436351020e89b80bc51b7971645be35c23783ccaf5db7ae808b07a6c768027a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2201cf619173b8041e330270187af8adab5f5fea2374f68bd6cc41a4f272ea7d216deac449e05fcf28fd2e493cf637ff94f1d0e50202bc2d082d18552bcf353c
|
7
|
+
data.tar.gz: 6faed2e163451517351e8c1d8ed89ff73b3d0e5dc82142d208dd057c08a6d62f6e9d69960f19d4d57ece8d2bc7d3e6e35850d1fbf1e447119d9d0fd76617abe0
|
@@ -43,7 +43,7 @@ class BackupController < ApplicationController
|
|
43
43
|
|
44
44
|
def import_respond_to_html
|
45
45
|
if @load.errors.empty?
|
46
|
-
redirect_to backup_path, notice: 'Backup imported'
|
46
|
+
redirect_to backup_path, notice: 'Backup imported' # rubocop:disable Rails/I18nLocaleTexts
|
47
47
|
else
|
48
48
|
render :index
|
49
49
|
end
|
@@ -4,7 +4,7 @@ Redmine::Plugin.post_register :redmine_with_git do
|
|
4
4
|
# Source: https://github.com/esquilo-azul/redmine_nonproject_modules
|
5
5
|
requires_redmine_plugin(:redmine_nonproject_modules, version_or_higher: '0.3.1')
|
6
6
|
|
7
|
-
if
|
7
|
+
if Redmine::VERSION.to_s < '4'
|
8
8
|
# Source: https://github.com/jbox-web/redmine_bootstrap_kit.git
|
9
9
|
# Note: redmine_bootstrap_kit is a redmine_git_hosting's dependency.
|
10
10
|
requires_redmine_plugin(:redmine_bootstrap_kit, version_or_higher: '0.2.5')
|
@@ -19,7 +19,7 @@ Redmine::Plugin.post_register :redmine_with_git do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# Source: https://github.com/esquilo-azul/redmine_installer
|
22
|
-
if
|
22
|
+
if Redmine::Plugin.registered_plugins.keys.include?(:redmine_installer)
|
23
23
|
requires_redmine_plugin(:redmine_installer, version_or_higher: '0.21.0')
|
24
24
|
end
|
25
25
|
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'redmine_with_git/patches/redmine_git_hosting/gitolite_hook_patch'
|
4
4
|
|
5
|
-
apply_patches_version_limit =
|
6
|
-
redmine_git_hosting_version =
|
7
|
-
|
5
|
+
apply_patches_version_limit = Gem::Version.new('4.0.0')
|
6
|
+
redmine_git_hosting_version = Gem::Version.new(
|
7
|
+
Redmine::Plugin.registered_plugins[:redmine_git_hosting].version
|
8
8
|
)
|
9
9
|
|
10
10
|
return unless redmine_git_hosting_version < apply_patches_version_limit
|
data/init.rb
CHANGED
@@ -7,7 +7,11 @@ Redmine::Plugin.register :redmine_with_git do
|
|
7
7
|
name 'RedmineWithGit'
|
8
8
|
author 'Esquilo Azul Company'
|
9
9
|
description 'Utilities for Redmine + plugin redmine_git_hosting.'
|
10
|
-
version
|
10
|
+
version RedmineWithGit::VERSION
|
11
11
|
url 'https://github.com/esquilo-azul/redmine_with_git'
|
12
12
|
author_url 'https://github.com/esquilo-azul'
|
13
13
|
end
|
14
|
+
|
15
|
+
Rails.autoloaders.each do |loader|
|
16
|
+
loader.ignore File.join(__dir__, 'lib/redmine_with_git/patches')
|
17
|
+
end
|
@@ -50,7 +50,7 @@ module RedmineWithGit
|
|
50
50
|
Rails.logger.info("#{path}: #{number_to_human_size(::File.size(path))}, #{path_type}")
|
51
51
|
end
|
52
52
|
|
53
|
-
def run_if_overwrite_denied
|
53
|
+
def run_if_overwrite_denied # rubocop:disable Naming/PredicateMethod
|
54
54
|
if ::File.exist?(path) && overwrite == OVERWRITE_DENIED
|
55
55
|
Rails.logger.warn "File \"#{path}\" already exists"
|
56
56
|
false
|
@@ -59,7 +59,7 @@ module RedmineWithGit
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
def run_if_rotate
|
62
|
+
def run_if_rotate # rubocop:disable Naming/PredicateMethod
|
63
63
|
if ::File.exist?(path) && overwrite == OVERWRITE_ROTATE
|
64
64
|
rotate = ::Avm::Data::Rotate.new(path, space_limit: space_limit)
|
65
65
|
::Rails.logger.info "Rotating \"#{rotate.source_path}\"..."
|
@@ -18,6 +18,6 @@ module RedmineGitHosting
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
patch =
|
22
|
-
target =
|
21
|
+
patch = RedmineGitHosting::Cache::DatabasePatch
|
22
|
+
target = RedmineGitHosting::Cache::Database
|
23
23
|
target.send(:include, patch) unless target.included_modules.include? patch
|
@@ -23,6 +23,6 @@ module RedmineWithGit
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
patch =
|
27
|
-
target =
|
26
|
+
patch = RedmineWithGit::Patches::RedmineGitHosting::Commands::GitPatch
|
27
|
+
target = RedmineGitHosting::Commands::Git
|
28
28
|
target.send(:include, patch) unless target.included_modules.include?(patch)
|
@@ -13,8 +13,7 @@ module RedmineWithGit
|
|
13
13
|
end
|
14
14
|
|
15
15
|
module InstanceMethods
|
16
|
-
SHEBANG_PATTERNS = [:ruby].
|
17
|
-
.to_h
|
16
|
+
SHEBANG_PATTERNS = [:ruby].index_with { |k| /^\#!.+\s+#{::Regexp.quote(k)}\s*$/ }
|
18
17
|
|
19
18
|
def hook_file_has_changed?
|
20
19
|
on_content_replaced { super }
|
@@ -64,7 +63,7 @@ module RedmineWithGit
|
|
64
63
|
|
65
64
|
# @return [String]
|
66
65
|
def shebang_to
|
67
|
-
"
|
66
|
+
"#!#{send("#{shebang_replacement}_shebang")}\n"
|
68
67
|
end
|
69
68
|
|
70
69
|
# @return [String]
|
@@ -87,7 +86,7 @@ module RedmineWithGit
|
|
87
86
|
end
|
88
87
|
end
|
89
88
|
|
90
|
-
|
91
|
-
|
92
|
-
|
89
|
+
EacRubyUtils.patch_module(
|
90
|
+
RedmineGitHosting::GitoliteHook,
|
91
|
+
RedmineWithGit::Patches::RedmineGitHosting::GitoliteHookPatch
|
93
92
|
)
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
namespace :redmine_with_git do
|
3
|
+
namespace :redmine_with_git do # rubocop:disable Metrics/BlockLength
|
4
4
|
%w[database files git all].each do |a|
|
5
5
|
namespace :dump do
|
6
6
|
desc <<~DESCRIPTION
|
7
|
-
Dump backup file for
|
7
|
+
Dump backup file for "#{a}" resource(s).
|
8
8
|
|
9
9
|
Arguments:
|
10
10
|
* <path>: path to the dump.
|
@@ -12,14 +12,14 @@ namespace :redmine_with_git do
|
|
12
12
|
* [space_limit]: limits the used space by all rotated files.
|
13
13
|
DESCRIPTION
|
14
14
|
task a, %i[path overwrite space_limit] => :environment do |_t, args|
|
15
|
-
|
16
|
-
|
15
|
+
RedmineWithGit::Dump.const_get(a.camelize).new(args.path, overwrite: args.overwrite,
|
16
|
+
space_limit: args.space_limit)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
namespace :load do
|
20
20
|
desc "Load backup file for \"#{a}\" resource(s)"
|
21
21
|
task a, [:path] => :environment do |_t, args|
|
22
|
-
|
22
|
+
RedmineWithGit::Load.const_get(a.camelize).new(args.path)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_with_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Esquilo Azul Company
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avm
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.98'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 0.
|
22
|
+
version: 0.98.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.98'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 0.
|
32
|
+
version: 0.98.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: eac_rails_utils
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '0.26'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.26.
|
42
|
+
version: 0.26.2
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '0.26'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 0.26.
|
52
|
+
version: 0.26.2
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: eac_ruby_utils
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '0.128'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.128.
|
62
|
+
version: 0.128.4
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,27 +69,21 @@ dependencies:
|
|
69
69
|
version: '0.128'
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 0.128.
|
72
|
+
version: 0.128.4
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
|
-
name:
|
74
|
+
name: eac_rails_gem_support
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '0.
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.5.1
|
79
|
+
version: '0.11'
|
83
80
|
type: :development
|
84
81
|
prerelease: false
|
85
82
|
version_requirements: !ruby/object:Gem::Requirement
|
86
83
|
requirements:
|
87
84
|
- - "~>"
|
88
85
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 0.5.1
|
86
|
+
version: '0.11'
|
93
87
|
description:
|
94
88
|
email:
|
95
89
|
executables: []
|