Añade plugin Redmine Git Hosting 4.0.2
This commit is contained in:
parent
472cb1ea76
commit
bdd66d941f
494 changed files with 36768 additions and 0 deletions
21
plugins/redmine_git_hosting/app/models/git_cache.rb
Normal file
21
plugins/redmine_git_hosting/app/models/git_cache.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
class GitCache < ActiveRecord::Base
|
||||
include Redmine::SafeAttributes
|
||||
|
||||
CACHE_ADAPTERS = [%w[Database database],
|
||||
%w[Memcached memcached],
|
||||
%w[Redis redis]].freeze
|
||||
|
||||
## Attributes
|
||||
safe_attributes 'repo_identifier', 'command', 'command_output'
|
||||
|
||||
## Validations
|
||||
validates :repo_identifier, presence: true
|
||||
validates :command, presence: true
|
||||
validates :command_output, presence: true
|
||||
|
||||
class << self
|
||||
def adapters
|
||||
CACHE_ADAPTERS.map(&:last)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue