redmine_with_git 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/000_dependencies.rb +1 -1
- data/installer/programs/redmine/installer/triggers/list/redmine_git_hosting_rescue.sh +2 -0
- data/installer/setup.sh +4 -0
- data/installer/tasks/_before_run.sh +1 -1
- data/installer/tasks/gitolite_setup.sh +1 -3
- data/installer/tasks/redmine_enabled_scm_setting.sh +4 -2
- data/installer/tasks/redmine_git_hosting_settings.sh +4 -2
- data/installer/tasks/ssh_server.sh +14 -0
- data/installer/tasks/ssh_server_running.sh +16 -0
- data/lib/redmine_with_git/dump/base.rb +2 -2
- data/lib/redmine_with_git/dump/database.rb +1 -5
- data/lib/redmine_with_git/dump_load/database.rb +9 -0
- data/lib/redmine_with_git/load/database.rb +1 -5
- data/lib/redmine_with_git/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6413d9e4fbcf10a85178b52289e27bcf94149eb7f0e6867530d1c38f0e5f0c40
|
4
|
+
data.tar.gz: 2aba5c875a6a15a88c7d59df2d66682db2333612890c5ff5bc951c87308b9c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13197bfc0ca84c084590fb37b6a193a83fd29dbe75b4b497e5ff16c1cad8b7a2950fc53c613c5ba830cf4744f209a0d1e30719de9d2547090e50ef638247b21f
|
7
|
+
data.tar.gz: 941caaa09a6021caea69040d2388422f729ccc580d5460209ac0e276dab548369fb183b44e3c79628b1eb86c080dbe89f4b5594e03b6ec72187812f135741e7b
|
@@ -11,6 +11,6 @@ Redmine::Plugin.post_register :redmine_with_git do
|
|
11
11
|
|
12
12
|
# Source: https://github.com/esquilo-azul/redmine_installer
|
13
13
|
if ::Redmine::Plugin.registered_plugins.keys.include?(:redmine_installer)
|
14
|
-
requires_redmine_plugin(:redmine_installer, version_or_higher: '0.
|
14
|
+
requires_redmine_plugin(:redmine_installer, version_or_higher: '0.15.0')
|
15
15
|
end
|
16
16
|
end
|
data/installer/setup.sh
CHANGED
@@ -33,3 +33,7 @@ if [ ! -v 'REDMINE_CONFIGURATION_EXTRA' ]; then
|
|
33
33
|
export REDMINE_CONFIGURATION_EXTRA=''
|
34
34
|
fi
|
35
35
|
export REDMINE_CONFIGURATION_EXTRA+=" scm_xiolite_command: /usr/bin/git"
|
36
|
+
|
37
|
+
# SSH Server
|
38
|
+
export SSH_SERVER_PACKAGE="openssh-server"
|
39
|
+
export SSH_SERVER_SERVICE="ssh"
|
@@ -4,7 +4,7 @@ set -u
|
|
4
4
|
set -e
|
5
5
|
|
6
6
|
function task_dependencies {
|
7
|
-
echo gitolite_rc gitolite redmine_git_hosting_ssh_key
|
7
|
+
echo gitolite_rc gitolite redmine_git_hosting_ssh_key ssh_server_running
|
8
8
|
}
|
9
9
|
|
10
10
|
function task_condition {
|
@@ -14,8 +14,6 @@ function task_condition {
|
|
14
14
|
function task_fix {
|
15
15
|
set -u
|
16
16
|
set -e
|
17
|
-
programeiro /apt/assert_installed openssh-server
|
18
|
-
sudo service ssh restart
|
19
17
|
local tempdir=$(sudo -u "$(programeiro /rails/user)" mktemp -d)
|
20
18
|
local publickey_temp="$tempdir/$(basename "$(programeiro /redmine_git_hosting/ssh_key)")".pub
|
21
19
|
sudo -u "$(programeiro /rails/user)" chmod 777 "$tempdir" -R
|
@@ -9,7 +9,7 @@ function enabled_scm_setting_template {
|
|
9
9
|
export -f enabled_scm_setting_template
|
10
10
|
|
11
11
|
function enabled_scm_setting_current {
|
12
|
-
programeiro /redmine/
|
12
|
+
programeiro /redmine/setting/read 'enabled_scm'
|
13
13
|
}
|
14
14
|
export -f enabled_scm_setting_current
|
15
15
|
|
@@ -18,11 +18,13 @@ function task_dependencies {
|
|
18
18
|
}
|
19
19
|
|
20
20
|
function task_condition {
|
21
|
+
if bool_r "$SKIP_DATABASE"; then return 0; fi
|
22
|
+
|
21
23
|
return $(programeiro /text/diff_commands 'enabled_scm_setting_template' 'enabled_scm_setting_current')
|
22
24
|
}
|
23
25
|
|
24
26
|
function task_fix {
|
25
27
|
set -u
|
26
28
|
set -e
|
27
|
-
programeiro /redmine/
|
29
|
+
programeiro /redmine/setting/write 'enabled_scm' "$(enabled_scm_setting_template)"
|
28
30
|
}
|
@@ -10,7 +10,7 @@ function redmine_git_hosting_setting_template {
|
|
10
10
|
export -f redmine_git_hosting_setting_template
|
11
11
|
|
12
12
|
function redmine_git_hosting_setting_current {
|
13
|
-
programeiro /redmine/
|
13
|
+
programeiro /redmine/setting/read 'plugin_redmine_git_hosting'
|
14
14
|
}
|
15
15
|
export -f redmine_git_hosting_setting_current
|
16
16
|
|
@@ -19,11 +19,13 @@ function task_dependencies {
|
|
19
19
|
}
|
20
20
|
|
21
21
|
function task_condition {
|
22
|
+
if bool_r "$SKIP_DATABASE"; then return 0; fi
|
23
|
+
|
22
24
|
return $(programeiro /text/diff_commands 'redmine_git_hosting_setting_template' 'redmine_git_hosting_setting_current')
|
23
25
|
}
|
24
26
|
|
25
27
|
function task_fix {
|
26
|
-
programeiro /redmine/
|
28
|
+
programeiro /redmine/setting/write 'plugin_redmine_git_hosting' \
|
27
29
|
"$(redmine_git_hosting_setting_template)"
|
28
30
|
programeiro /redmine/installer/triggers/set 'redmine_git_hosting_rescue'
|
29
31
|
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
set -u
|
4
|
+
set -e
|
5
|
+
|
6
|
+
function task_condition {
|
7
|
+
programeiro /linux/service_running "$SSH_SERVER_SERVICE"
|
8
|
+
}
|
9
|
+
|
10
|
+
function task_dependencies {
|
11
|
+
echo ssh_server
|
12
|
+
}
|
13
|
+
|
14
|
+
function task_fix {
|
15
|
+
sudo service "$SSH_SERVER_SERVICE" start
|
16
|
+
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'avm/
|
3
|
+
require 'avm/data/rotate'
|
4
4
|
require 'eac_ruby_utils/patches/object/asserts'
|
5
5
|
require 'eac_ruby_utils/listable'
|
6
6
|
|
@@ -61,7 +61,7 @@ module RedmineWithGit
|
|
61
61
|
|
62
62
|
def run_if_rotate
|
63
63
|
if ::File.exist?(path) && overwrite == OVERWRITE_ROTATE
|
64
|
-
rotate = ::Avm::
|
64
|
+
rotate = ::Avm::Data::Rotate.new(path, space_limit: space_limit)
|
65
65
|
::Rails.logger.info "Rotating \"#{rotate.source_path}\"..."
|
66
66
|
rotate.run
|
67
67
|
::Rails.logger.info "Rotated to \"#{rotate.target_path}\""
|
@@ -8,11 +8,7 @@ module RedmineWithGit
|
|
8
8
|
private
|
9
9
|
|
10
10
|
def build_command
|
11
|
-
|
12
|
-
[password_arg, 'pg_dump', '-x', '-c', '-O',
|
13
|
-
'-h', database_schema['host'], '-U', database_schema['username'], '-d',
|
14
|
-
database_schema['database'], '@ESC_|'] + compress_args
|
15
|
-
)
|
11
|
+
build_postgres_command('pg_dump', ['-x', '-c', '-O', '@ESC_|'] + compress_args)
|
16
12
|
end
|
17
13
|
end
|
18
14
|
end
|
@@ -3,6 +3,15 @@
|
|
3
3
|
module RedmineWithGit
|
4
4
|
module DumpLoad
|
5
5
|
module Database
|
6
|
+
def build_postgres_command(command, args = [])
|
7
|
+
env.command(
|
8
|
+
[password_arg, command] + {
|
9
|
+
host: database_schema['host'], port: database_schema['port'],
|
10
|
+
username: database_schema['username'], dbname: database_schema['database']
|
11
|
+
}.flat_map { |k, v| ["--#{k}", v] } + args
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
6
15
|
def database_schema
|
7
16
|
Rails.configuration.database_configuration[Rails.env]
|
8
17
|
end
|
@@ -31,11 +31,7 @@ module RedmineWithGit
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def psql_command
|
34
|
-
|
35
|
-
[password_arg, 'psql',
|
36
|
-
'-h', database_schema['host'], '-U', database_schema['username'], '-d',
|
37
|
-
database_schema['database']]
|
38
|
-
)
|
34
|
+
build_postgres_command('psql')
|
39
35
|
end
|
40
36
|
|
41
37
|
def psql_sql_command(sql)
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_with_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
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: 2021-
|
11
|
+
date: 2021-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: avm
|
14
|
+
name: avm
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.7'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: eac_rails_utils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,6 +93,8 @@ files:
|
|
93
93
|
- installer/tasks/redmine_git_hosting_ssh_key.sh
|
94
94
|
- installer/tasks/redmine_gitolite_sudoer.sh
|
95
95
|
- installer/tasks/redmine_with_git_bundle_requirements.sh
|
96
|
+
- installer/tasks/ssh_server.sh
|
97
|
+
- installer/tasks/ssh_server_running.sh
|
96
98
|
- installer/template/gitolite.rc
|
97
99
|
- installer/template/redmine_enabled_scm_setting_value
|
98
100
|
- installer/template/redmine_git_hosting_setting_value.sql
|
@@ -135,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
137
|
- !ruby/object:Gem::Version
|
136
138
|
version: '0'
|
137
139
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
140
|
+
rubygems_version: 3.1.6
|
139
141
|
signing_key:
|
140
142
|
specification_version: 4
|
141
143
|
summary: Additional features for RedmineGitHosting.
|