redmine_with_git 0.2.1 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80b5993b7f9cd7f4dd77409d32c5307d61c8e71cac324d8a42d8a7ad2d0fd53e
4
- data.tar.gz: 73e37b54440eb12781ab9f01c8f26ce946e09e232452539671331c705f36cc34
3
+ metadata.gz: 25be104e9c0c3b37180b555ca315c6f67823b290dad84ecf39329a7fcf5c6cb3
4
+ data.tar.gz: 0b52c5a42db23a47750b54fdc7fd7751b1392ee861415974fb2a9aa6e38acbec
5
5
  SHA512:
6
- metadata.gz: b9c3d738c11bb03b51c70d8ce9f6f02a44d793378a7019dbc64054bc230d849ef478eebc3fef71544f448ca20a7a34c65cb527dd424dc5b3715f02989da32027
7
- data.tar.gz: d2194b4c8fcb6f7fa0510821263a143409a0b471948189b4ccdaf8629a22ea5bdc57002da0e7098e69384a8330fc160310125a6ac94f1c27383f4966b1ebf33f
6
+ metadata.gz: 24aee9f362034257dc8600ecdcc9d875bea79be1daf7f41ce9416776ce2258fe73928b589ac1fa54cf690b0701d2345b3e508949284472f6d6f1fd4a617b70d2
7
+ data.tar.gz: 55df434025cd75829e68acf441a238449d5ff584d3eb52a7e57711fdb5b72637f9bce29fab54a7f2859ddca6c8db3e038ffbb41f9d6b7f3581bb9ba8a87a299e
@@ -2,7 +2,7 @@
2
2
 
3
3
  Redmine::Plugin.post_register :redmine_with_git do
4
4
  # Source: https://github.com/esquilo-azul/redmine_plugins_helper
5
- requires_redmine_plugin(:redmine_plugins_helper, version_or_higher: '0.5.0')
5
+ requires_redmine_plugin(:redmine_plugins_helper, version_or_higher: '0.5.2')
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')
@@ -25,6 +25,10 @@ module RedmineWithGit
25
25
  v.present? ? v.to_i : OVERWRITE_DENIED
26
26
  end
27
27
 
28
+ def space_limit
29
+ @options[:space_limit]
30
+ end
31
+
28
32
  private
29
33
 
30
34
  def run
@@ -57,7 +61,7 @@ module RedmineWithGit
57
61
 
58
62
  def run_if_rotate
59
63
  if ::File.exist?(path) && overwrite == OVERWRITE_ROTATE
60
- rotate = ::Avm::Files::Rotate.new(path)
64
+ rotate = ::Avm::Files::Rotate.new(path, space_limit: space_limit)
61
65
  ::Rails.logger.info "Rotating \"#{rotate.source_path}\"..."
62
66
  rotate.run
63
67
  ::Rails.logger.info "Rotated to \"#{rotate.target_path}\""
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RedmineWithGit
4
- VERSION = '0.2.1'
4
+ VERSION = '0.3.0'
5
5
  end
@@ -9,9 +9,11 @@ namespace :redmine_with_git do
9
9
  Arguments:
10
10
  * <path>: path to the dump.
11
11
  * [overwrite]: 1: denied, 2: allowed, 3: rotate (Default: 1).
12
+ * [space_limit]: limits the used space by all rotated files.
12
13
  DESCRIPTION
13
- task a, %i[path overwrite] => :environment do |_t, args|
14
- ::RedmineWithGit::Dump.const_get(a.camelize).new(args.path, overwrite: args.overwrite)
14
+ task a, %i[path overwrite space_limit] => :environment do |_t, args|
15
+ ::RedmineWithGit::Dump.const_get(a.camelize).new(args.path, overwrite: args.overwrite,
16
+ space_limit: args.space_limit)
15
17
  end
16
18
  end
17
19
  namespace :load do
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.2.1
4
+ version: 0.3.0
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: 2019-08-16 00:00:00.000000000 Z
11
+ date: 2019-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: avm-tools
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.8'
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.7'
26
+ version: '0.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eac_rails_utils
29
29
  requirement: !ruby/object:Gem::Requirement