redmine_with_git 0.6.4 → 0.6.9

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: 6e45abb710cdaf2c6dfa3b93b2a57fa64eb92ad237dd9ae0f9ab1424abb0eafb
4
- data.tar.gz: b984dc3e37e842bbdf6e1c5c09622b01da07b57dce46b7a18cad071d188d8c15
3
+ metadata.gz: b43eef6bc04197831758a646547a33e6b05cede8338e4b21b50df8989db4d7ae
4
+ data.tar.gz: 321682d144c93839a38055228e53b914e437cd918673a9a1d27dde5bdc2f5f4f
5
5
  SHA512:
6
- metadata.gz: 99677e6de68a6c3285c110652a75ffa2262de25f95d89a895acb7b943f9ff43aa2ba99e831bb36ef2380f75641d897d64898de73938e26a211f908185d6535b6
7
- data.tar.gz: 6140b05a2c633cadfd6c9ec93aff5835728152905bda82f7e7ba3080797b093ba7c4434a3a3a35304a12a5ade0c6e845a8a7d50b5d466495fae433dedd29df2d
6
+ metadata.gz: 356f4795423a7a23cb9c2d6d2c4440a3a30517fafe6b22952175b8c9e135f31360992a52f94c5cdf1841191c18a19b670530c85ceea952937af2c62774484dd5
7
+ data.tar.gz: fa7026bf5fd45db0658d613492d0a43edaad2e70886a5560040588ce54b7353506d6cd7f48aecd7cc5325c5bcd05a53863409b2750e9b8311a6f44d34cb0bec9
@@ -2,7 +2,7 @@
2
2
 
3
3
  module RedmineWithGit
4
4
  module Tableless
5
- class Load < ::EacRailsUtils::TablelessModel
5
+ class Load < ::EacRailsUtils::Models::Tableless
6
6
  attribute :path, String
7
7
 
8
8
  validates :path, presence: true
@@ -6,11 +6,11 @@ Redmine::Plugin.post_register :redmine_with_git do
6
6
  # Source: https://github.com/jbox-web/redmine_bootstrap_kit.git
7
7
  # Note: redmine_bootstrap_kit is a redmine_git_hosting's dependency.
8
8
  requires_redmine_plugin(:redmine_bootstrap_kit, version_or_higher: '0.2.5')
9
- # Source: https://github.com/jbox-web/redmine_git_hosting.git
10
- requires_redmine_plugin(:redmine_git_hosting, version_or_higher: '1.2.3')
9
+ # Source: https://github.com/esquilo-azul/redmine_git_hosting
10
+ requires_redmine_plugin(:redmine_git_hosting, version_or_higher: '1.2.3.1')
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.9.0')
14
+ requires_redmine_plugin(:redmine_installer, version_or_higher: '0.10.0')
15
15
  end
16
16
  end
@@ -1,4 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ apply_patches_version_limit = ::Gem::Version.new('4.0.0')
4
+ redmine_git_hosting_version = ::Gem::Version.new(
5
+ ::Redmine::Plugin.registered_plugins[:redmine_git_hosting].version
6
+ )
7
+
8
+ return unless redmine_git_hosting_version < apply_patches_version_limit
9
+
3
10
  require 'redmine_with_git/patches/redmine_git_hosting/cache/database_patch'
4
11
  require 'redmine_with_git/patches/redmine_git_hosting/commands/git/git_patch'
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+ set -u
5
+
6
+ if [ $# -lt 1 ]; then
7
+ printf "Usage: $0 <TARGET_FILE>"
8
+ exit 1
9
+ fi
10
+
11
+ if [ $(id -u) -eq 0 ]; then
12
+ TARGET_FILE="$1"
13
+ EDITOR='tee' visudo -f "$TARGET_FILE" <&0
14
+ chmod 440 "$TARGET_FILE"
15
+ else
16
+ sudo "$0" "$@"
17
+ fi
@@ -24,6 +24,5 @@ function task_condition {
24
24
  function task_fix {
25
25
  set -u
26
26
  set -e
27
- local setting_value=$(enabled_scm_setting_template | programeiro /text/escape_single_quotes)
28
- programeiro /redmine/set_setting_value 'enabled_scm' "$setting_value"
27
+ programeiro /redmine/set_setting_value 'enabled_scm' "$(enabled_scm_setting_template)"
29
28
  }
@@ -8,5 +8,5 @@ function task_condition {
8
8
  }
9
9
 
10
10
  function task_dependencies {
11
- echo gitolite_rc redmine_gitolite_sudoer redmine_git_hosting_settings apt_ruby python_two
11
+ echo gitolite_setup redmine_gitolite_sudoer redmine_git_hosting_settings apt_ruby python_two
12
12
  }
@@ -23,7 +23,7 @@ function task_condition {
23
23
  }
24
24
 
25
25
  function task_fix {
26
- local setting_value=$(redmine_git_hosting_setting_template | programeiro /text/escape_single_quotes)
27
- programeiro /redmine/set_setting_value 'plugin_redmine_git_hosting' "$setting_value"
26
+ programeiro /redmine/set_setting_value 'plugin_redmine_git_hosting' \
27
+ "$(redmine_git_hosting_setting_template)"
28
28
  programeiro /redmine/installer/triggers/set 'redmine_git_hosting_rescue'
29
29
  }
@@ -7,13 +7,14 @@ SUFFIX=''
7
7
  if [ -n "$address_path" ]; then
8
8
  SUFFIX="_$(printf "$address_path" | sed -e 's/^\///')"
9
9
  fi
10
- SUDOER_FILE="/etc/sudoers.d/$(programeiro /rails/user)_redmine_with_git${SUFFIX}"
10
+ export SUDOER_FILE_BASENAME="$(programeiro /rails/user)_redmine_with_git${SUFFIX}"
11
+ export SUDOER_FILE="/etc/sudoers.d/${SUDOER_FILE_BASENAME}"
12
+ export SUDOER_TMP_FILE="/tmp/${SUDOER_FILE_BASENAME}"
11
13
 
12
14
  function sudoers_file_copy_file() {
13
- TMPFILE="$(mktemp)"
14
- sudo cp "$SUDOER_FILE" "$TMPFILE"
15
- sudo chmod og+r "$TMPFILE"
16
- printf "$TMPFILE\n"
15
+ sudo cp "$SUDOER_FILE" "$SUDOER_TMP_FILE"
16
+ sudo chmod og+r "$SUDOER_TMP_FILE"
17
+ printf "$SUDOER_TMP_FILE\n"
17
18
  }
18
19
 
19
20
  function task_dependencies {
@@ -43,7 +44,7 @@ function task_fix {
43
44
  set -u
44
45
  set -e
45
46
  export rails_user="$(programeiro /rails/user)"
46
- programeiro /template/apply "$REDMINE_WITH_GIT_TEMPLATE_ROOT/redmine_user_sudoer" | sudo tee "$SUDOER_FILE" > /dev/null
47
- sudo chmod 440 "$SUDOER_FILE"
47
+ programeiro /template/apply "$REDMINE_WITH_GIT_TEMPLATE_ROOT/redmine_user_sudoer" | \
48
+ programeiro /linux/sudo_write "$SUDOER_FILE"
48
49
  }
49
50
  export -f task_fix
@@ -1,2 +1,6 @@
1
1
  Defaults:redmine !requiretty
2
2
  ${rails_user} ALL=(${gitolite_user}) NOPASSWD:ALL
3
+ ${rails_user} ALL=(root) NOPASSWD:/usr/bin/stat
4
+ ${rails_user} ALL=(root) NOPASSWD:/bin/cp ${SUDOER_FILE} ${SUDOER_TMP_FILE}
5
+ ${rails_user} ALL=(root) NOPASSWD:/bin/chmod og+r ${SUDOER_TMP_FILE}
6
+ ${rails_user} ALL=(root) NOPASSWD:/bin/rm -f ${SUDOER_TMP_FILE}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RedmineWithGit
4
- VERSION = '0.6.4'
4
+ VERSION = '0.6.9'
5
5
  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.6.4
4
+ version: 0.6.9
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: 2020-01-27 00:00:00.000000000 Z
11
+ date: 2021-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-tools
@@ -16,48 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.28'
19
+ version: '0.48'
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.28'
26
+ version: '0.48'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eac_rails_utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.7'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 0.7.1
33
+ version: '0.11'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: '0.7'
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 0.7.1
40
+ version: '0.11'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: eac_ruby_utils
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '0.17'
47
+ version: '0.35'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
52
  - - "~>"
59
53
  - !ruby/object:Gem::Version
60
- version: '0.17'
54
+ version: '0.35'
61
55
  description:
62
56
  email:
63
57
  executables: []
@@ -80,6 +74,7 @@ files:
80
74
  - init.rb
81
75
  - installer/default_settings.sh
82
76
  - installer/programs/linux/sudo_file_exists.sh
77
+ - installer/programs/linux/sudo_write.sh
83
78
  - installer/programs/rails/user.sh
84
79
  - installer/programs/redmine/installer/triggers/list/redmine_git_hosting_rescue.sh
85
80
  - installer/programs/redmine_git_hosting/ssh_key.sh
@@ -141,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
136
  - !ruby/object:Gem::Version
142
137
  version: '0'
143
138
  requirements: []
144
- rubyforge_project:
145
- rubygems_version: 2.7.7
139
+ rubygems_version: 3.0.8
146
140
  signing_key:
147
141
  specification_version: 4
148
142
  summary: Additional features for RedmineGitHosting.