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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad334021b2ed9f85e6ffe0a9903d1d660271fb25ad66a080fe35679c89d14489
4
- data.tar.gz: 237a9c00566a1bf59f94914047b0f43d51b895a49e1f72c8e33ff97afa9389ed
3
+ metadata.gz: 6413d9e4fbcf10a85178b52289e27bcf94149eb7f0e6867530d1c38f0e5f0c40
4
+ data.tar.gz: 2aba5c875a6a15a88c7d59df2d66682db2333612890c5ff5bc951c87308b9c01
5
5
  SHA512:
6
- metadata.gz: 27845700bf01636bbe3321023d307c46694d697870ced4ecba062d7ebdbc585d15ceead4c329c8f878e3838f9f78c84f1febe3717989b263b972892e683375ad
7
- data.tar.gz: d090756bbffc58cdc438aa7b34ecebfd39ec95a647b7c4ceb404b151f7cd360828c24ee00161c936cd94c7c25b78efedceb4a5f35542f589af5d8cd4bdaae10c
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.10.0')
14
+ requires_redmine_plugin(:redmine_installer, version_or_higher: '0.15.0')
15
15
  end
16
16
  end
@@ -3,4 +3,6 @@
3
3
  set -u
4
4
  set -e
5
5
 
6
+ if bool_r "$SKIP_DATABASE"; then exit 0; fi
7
+
6
8
  programeiro /rails/rake redmine_with_git:rescue
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"
@@ -1,3 +1,3 @@
1
1
  # Task dependencies
2
2
  taskeiro_add_dependency redmine_bundle redmine_with_git_bundle_requirements
3
- taskeiro_add_dependency development redmine_git_hosting
3
+ taskeiro_add_dependency redmine_base redmine_git_hosting
@@ -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/get_setting_value 'enabled_scm'
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/set_setting_value 'enabled_scm' "$(enabled_scm_setting_template)"
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/get_setting_value 'plugin_redmine_git_hosting'
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/set_setting_value 'plugin_redmine_git_hosting' \
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,14 @@
1
+ #!/bin/bash
2
+
3
+ set -u
4
+ set -e
5
+
6
+ PACKAGES=("$SSH_SERVER_PACKAGE")
7
+
8
+ function task_condition {
9
+ programeiro /apt/installed "${PACKAGES[@]}"
10
+ }
11
+
12
+ function task_fix {
13
+ programeiro /apt/assert_installed "${PACKAGES[@]}"
14
+ }
@@ -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/files/rotate'
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::Files::Rotate.new(path, space_limit: space_limit)
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
- env.command(
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
- env.command(
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RedmineWithGit
4
- VERSION = '0.7.0'
4
+ VERSION = '0.7.1'
5
5
  end
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.0
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-05-05 00:00:00.000000000 Z
11
+ date: 2021-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: avm-tools
14
+ name: avm
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.48'
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.48'
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.0.9
140
+ rubygems_version: 3.1.6
139
141
  signing_key:
140
142
  specification_version: 4
141
143
  summary: Additional features for RedmineGitHosting.