diff --git a/plugins/redmine_base_deface/LICENSE b/plugins/redmine_base_deface/LICENSE deleted file mode 100644 index 5010104..0000000 --- a/plugins/redmine_base_deface/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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. diff --git a/plugins/redmine_base_deface/PluginGemfile b/plugins/redmine_base_deface/PluginGemfile deleted file mode 100644 index 811428d..0000000 --- a/plugins/redmine_base_deface/PluginGemfile +++ /dev/null @@ -1 +0,0 @@ -gem 'deface', '1.5.3' diff --git a/plugins/redmine_base_deface/README.md b/plugins/redmine_base_deface/README.md deleted file mode 100644 index cea4bcd..0000000 --- a/plugins/redmine_base_deface/README.md +++ /dev/null @@ -1,36 +0,0 @@ -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. diff --git a/plugins/redmine_base_deface/app/overrides/README.txt b/plugins/redmine_base_deface/app/overrides/README.txt deleted file mode 100644 index f1ea528..0000000 --- a/plugins/redmine_base_deface/app/overrides/README.txt +++ /dev/null @@ -1 +0,0 @@ -This directory is only here to ensure the plugin works through unit tests. It is automatically added to Rails.application.paths["app/overrides"] diff --git a/plugins/redmine_base_deface/init.rb b/plugins/redmine_base_deface/init.rb deleted file mode 100644 index 018d869..0000000 --- a/plugins/redmine_base_deface/init.rb +++ /dev/null @@ -1,20 +0,0 @@ -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 diff --git a/plugins/redmine_base_deface/spec/models/deface_paths_spec.rb b/plugins/redmine_base_deface/spec/models/deface_paths_spec.rb deleted file mode 100644 index 00b62a2..0000000 --- a/plugins/redmine_base_deface/spec/models/deface_paths_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -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 diff --git a/plugins/redmine_git_server/Gemfile b/plugins/redmine_git_server/Gemfile deleted file mode 100644 index ae94895..0000000 --- a/plugins/redmine_git_server/Gemfile +++ /dev/null @@ -1 +0,0 @@ -gem 'grack', '0.1.1' diff --git a/plugins/redmine_git_server/LICENSE b/plugins/redmine_git_server/LICENSE deleted file mode 100644 index 48a575d..0000000 --- a/plugins/redmine_git_server/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Romain Lalaut - -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. diff --git a/plugins/redmine_git_server/README.md b/plugins/redmine_git_server/README.md deleted file mode 100644 index 1422d28..0000000 --- a/plugins/redmine_git_server/README.md +++ /dev/null @@ -1,52 +0,0 @@ -Redmine plugin - Git Server -============ - -This Redmine plugin lets your users pull and push to/from your git repositories hosted on Redmine with HTTP - without any complex setup. - -Under the hood, it relies on [Grack](https://github.com/grackorg/grack), a Ruby/Rack Git Smart HTTP Server Handler. - - -Screenshot ------------- - - - - -Installation ------------- - -This plugin is tested with Redmine 4.1+ (but it could be compatible with other versions). - -Please apply general instructions for plugins [here](http://www.redmine.org/wiki/redmine/Plugins). - -Note that this plugin depends on this other plugin: -* **redmine_base_deface** [here](https://github.com/jbbarth/redmine_base_deface) - -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_git_server'! - -Then execute: - - $ bundle install - $ rake redmine:plugins - -And finally restart your Redmine instance. - - -Permissions ------------ - -* *Git Server > Enable git server* : allows a user to enable/disable the project module "Git Server" -* *(Redmine built-in) Repository > View changesets* : allows a user to fetch changesets (pull) from a repository -* *(Redmine built-in) Repository > Commit access* : allows a user to push to a repository - - -Alternatives ------------- - -* [redmine_git_hosting](http://redmine-git-hosting.io/) - based on Gitolite, this plugin offer a **lot** more features but it is also more complex to setup. - - -Knowns issues -------------- - -Puma 3.7 which is currently bundled with Redmine has an issue with chunked uploads. You can upgrade to Puma 4.3 or configure git locally to avoid chunked uploads (eg. `git config --global http.postBuffer 524288000`) diff --git a/plugins/redmine_git_server/app/controllers/git_server_controller.rb b/plugins/redmine_git_server/app/controllers/git_server_controller.rb deleted file mode 100644 index d8c9b53..0000000 --- a/plugins/redmine_git_server/app/controllers/git_server_controller.rb +++ /dev/null @@ -1,50 +0,0 @@ -class GitServerController < ApplicationController - - skip_before_action :verify_authenticity_token - skip_before_action :check_if_login_required - - before_action do - begin - authenticate_or_request_with_http_basic do |username, password| - @user = User.try_to_login(username, password, false) - if @user.nil? or @user.new_record? or !@user.active? - logger.info "(Git Server) Authentication failed from #{request.remote_ip} at #{Time.now.utc}" - false - else - logger.info "(Git Server) Successful authentication for '#{@user.login}' from #{request.remote_ip} at #{Time.now.utc}" - true - end - end - next false unless @user - project = Project.find(params[:id]) - unless project.module_enabled?("git_server") - logger.warn "(Git Server) project '#{project.identifier}' doesn't have the git_server module enabled" - render_404 - next false - end - repository = project.repositories.find_by_identifier_param(params[:repository_id]) - unless repository - render_404 - next false - end - @grack_app = RedmineGitServer::GrackApp.new \ - request: request, - repository_path: repository.url, - allow_push: @user.allowed_to?(:commit_access, project), - allow_pull: @user.allowed_to?(:view_changesets, project) - rescue ActiveRecord::RecordNotFound - render_404 - end - end - - Grack::App::ROUTES.collect{|o| o[2] }.uniq.each do |action| - define_method action do - path = request.params["path"] - params = action == :info_refs ? [] : [path] - rack_response = @grack_app.send(action, *params) - self.response = ActionDispatch::Response.new(*rack_response) - response.sending! - end - end - -end diff --git a/plugins/redmine_git_server/app/overrides/repositories/show.rb b/plugins/redmine_git_server/app/overrides/repositories/show.rb deleted file mode 100644 index 9a7744d..0000000 --- a/plugins/redmine_git_server/app/overrides/repositories/show.rb +++ /dev/null @@ -1,5 +0,0 @@ -Deface::Override.new virtual_path: 'repositories/show', - name: 'insert_clone_button', - insert_bottom: 'div.contextual', - partial: 'repositories/clone_button' - diff --git a/plugins/redmine_git_server/app/views/repositories/_clone_button.html.erb b/plugins/redmine_git_server/app/views/repositories/_clone_button.html.erb deleted file mode 100644 index d65cdf9..0000000 --- a/plugins/redmine_git_server/app/views/repositories/_clone_button.html.erb +++ /dev/null @@ -1,14 +0,0 @@ -<% user = User.current %> -<% write_access = user.allowed_to?(:commit_access, @project) %> -<% read_access = user.allowed_to?(:view_changesets, @project) %> -<% if @project.module_enabled?("git_server") and read_access %> - | - <%= content_tag :div, class: 'drdn clone-wrapper' do %> - <%= button_tag l(:clone), type: 'button', class: 'drdn-trigger clone-button' %> - <%= content_tag :div, class: 'drdn-content clone-dropdown' do %> - <% protocol = Setting['protocol'] %> -
- <%= l(:use_git_with_this_web_url) %> - <% if write_access %> - <%= l(:git_read_write_access) %> - <% else %> - <%= l(:git_read_only_access) %> - <% end %> -
- <%= content_tag :code, class: 'clone-input-group' do %> - <% url = url_for( - controller: 'repositories', - action: 'show', - id: @project.identifier, - repository_id: @repository.identifier, - user: User.current.login, - password: '', - only_path: false, - protocol: protocol).sub(':@', '@') %> - <%= text_field_tag 'url', url, readonly: true %> - <%= button_tag image_tag('../plugin_assets/redmine_git_server/images/copy-to-clipboard.png') %> - <% end %> -