redmine_with_git 0.1.4 → 0.1.5
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 180c030aca85081dfee8c238bd41483d38635843330381e7ca83684d6c486516
|
|
4
|
+
data.tar.gz: e24239fb73c7e0d4d23f2526104c89c1b29b0b4e4744249ef26e07a1020ec3a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97b5072b4f3bf68f9e3113cc5e1704546065c3fcefb171cc4cbfd141d81e1d98c9a99a51b70220522a2532010af639851631dc4c4442dfff8f3226391b26e27a
|
|
7
|
+
data.tar.gz: a49321b8ed13fbe126260dffe6ba063a5177e441a89fbeb58e1985acaecdf05f8f1d86cf61961dc018351e70e1ad06cf5947168042eb4e68c66319075d843727
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module RedmineGitHosting
|
|
4
|
+
module Cache
|
|
5
|
+
module DatabasePatch
|
|
6
|
+
def self.included(base)
|
|
7
|
+
base.include(InstanceMethods)
|
|
8
|
+
base.class_eval do
|
|
9
|
+
alias_method_chain :apply_cache_limit, :redmine_with_git
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
module InstanceMethods
|
|
14
|
+
def apply_cache_limit_with_redmine_with_git
|
|
15
|
+
return unless max_cache_elements >= 0 && GitCache.count > max_cache_elements
|
|
16
|
+
|
|
17
|
+
GitCache.order(created_at: :desc).last.destroy
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
patch = ::RedmineGitHosting::Cache::DatabasePatch
|
|
25
|
+
target = ::RedmineGitHosting::Cache::Database
|
|
26
|
+
target.send(:include, patch) unless target.included_modules.include? patch
|
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.1.
|
|
4
|
+
version: 0.1.5
|
|
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-
|
|
11
|
+
date: 2019-06-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: eac_rails_utils
|
|
@@ -58,6 +58,7 @@ files:
|
|
|
58
58
|
- app/views/redmine_with_git/_import.html.erb
|
|
59
59
|
- app/views/redmine_with_git/index.html.erb
|
|
60
60
|
- config/initializers/000_dependencies.rb
|
|
61
|
+
- config/initializers/001_patches.rb
|
|
61
62
|
- config/locales/en.yml
|
|
62
63
|
- config/locales/pt-BR.yml
|
|
63
64
|
- config/routes.rb
|
|
@@ -77,6 +78,7 @@ files:
|
|
|
77
78
|
- lib/redmine_with_git/load/database.rb
|
|
78
79
|
- lib/redmine_with_git/load/files.rb
|
|
79
80
|
- lib/redmine_with_git/load/git.rb
|
|
81
|
+
- lib/redmine_with_git/patches/redmine_git_hosting/cache/database_patch.rb
|
|
80
82
|
- lib/redmine_with_git/version.rb
|
|
81
83
|
- lib/tasks/redmine_with_git.rake
|
|
82
84
|
homepage:
|