Añade el plugin Redmine Git Server 0.4
This commit is contained in:
parent
525527a55b
commit
4b46a7472e
30 changed files with 485 additions and 0 deletions
21
plugins/redmine_base_deface/LICENSE
Normal file
21
plugins/redmine_base_deface/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Jean-Baptiste Barth
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
1
plugins/redmine_base_deface/PluginGemfile
Normal file
1
plugins/redmine_base_deface/PluginGemfile
Normal file
|
@ -0,0 +1 @@
|
|||
gem 'deface', '1.5.3'
|
36
plugins/redmine_base_deface/README.md
Normal file
36
plugins/redmine_base_deface/README.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
Redmine base_deface plugin
|
||||
======================
|
||||
|
||||
Integrate with the deface gem to manage view modifications in plugins
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
This plugin is compatible with Redmine 2.1.0+.
|
||||
|
||||
Please apply general instructions for plugins [here](http://www.redmine.org/wiki/redmine/Plugins).
|
||||
|
||||
First download the source or clone the plugin and put it in the "plugins/" directory of your redmine instance. Note that this is crucial that the directory is named redmine_base_deface !
|
||||
|
||||
Then execute from redmine root directory:
|
||||
|
||||
$ bundle install
|
||||
$ rake redmine:plugins
|
||||
|
||||
And finally restart your Redmine instance.
|
||||
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
1. Fork it
|
||||
2. Create your feature branch (`git checkout -b my-new-feature`)
|
||||
3. Commit your changes (`git commit -am 'Add some feature'`)
|
||||
4. Push to the branch (`git push origin my-new-feature`)
|
||||
5. Create new Pull Request
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
This project is released under the MIT license, see LICENSE file.
|
1
plugins/redmine_base_deface/app/overrides/README.txt
Normal file
1
plugins/redmine_base_deface/app/overrides/README.txt
Normal file
|
@ -0,0 +1 @@
|
|||
This directory is only here to ensure the plugin works through unit tests. It is automatically added to Rails.application.paths["app/overrides"]
|
20
plugins/redmine_base_deface/init.rb
Normal file
20
plugins/redmine_base_deface/init.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
Redmine::Plugin.register :redmine_base_deface do
|
||||
name 'Redmine Base Deface plugin'
|
||||
author 'Jean-Baptiste BARTH'
|
||||
description 'This is a plugin for Redmine'
|
||||
version '1.5.3'
|
||||
url 'https://github.com/jbbarth/redmine_base_deface'
|
||||
author_url 'jeanbaptiste.barth@gmail.com'
|
||||
#doesn't work since redmine evaluates dependencies as it loads, and loads in lexical order
|
||||
#TODO: see if it works in Redmine 2.6.x or 3.x when they're released
|
||||
# requires_redmine_plugin :redmine_base_rspec, :version_or_higher => '0.0.3' if Rails.env.test?
|
||||
end
|
||||
|
||||
# Little hack for deface in redmine:
|
||||
# - redmine plugins are not railties nor engines, so deface overrides are not detected automatically
|
||||
# - deface doesn't support direct loading anymore ; it unloads everything at boot so that reload in dev works
|
||||
# - hack consists in adding "app/overrides" path of all plugins in Redmine's main #paths
|
||||
Rails.application.paths["app/overrides"] ||= []
|
||||
Dir.glob("#{Rails.root}/plugins/*/app/overrides").each do |dir|
|
||||
Rails.application.paths["app/overrides"] << dir unless Rails.application.paths["app/overrides"].include?(dir)
|
||||
end
|
10
plugins/redmine_base_deface/spec/models/deface_paths_spec.rb
Normal file
10
plugins/redmine_base_deface/spec/models/deface_paths_spec.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
require "spec_helper"
|
||||
|
||||
describe "DefacePaths" do
|
||||
it "should app overrides paths" do
|
||||
overrides_paths = Rails.application.paths["app/overrides"]
|
||||
this_plugin_paths = Rails.root.join("plugins/redmine_base_deface/app/overrides")
|
||||
assert overrides_paths.include?(this_plugin_paths.to_s),
|
||||
"The init.rb of this very plugin should add every plugins' app/overrides to rails paths for app/overrides"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue