From 7c8f9e357296fe1c62e7af962e8c459bc435e8aa Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Thu, 14 Apr 2022 18:54:15 +0200 Subject: [PATCH 1/8] console logger: Fix undefined variable or method block --- lib/redmine_git_hosting/console_logger.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_git_hosting/console_logger.rb b/lib/redmine_git_hosting/console_logger.rb index 9589a184c..b5d8881ff 100644 --- a/lib/redmine_git_hosting/console_logger.rb +++ b/lib/redmine_git_hosting/console_logger.rb @@ -6,7 +6,7 @@ module ConsoleLogger def title(message) info "\n * #{message}:" - yield if block + yield if block_given? info " Done!\n\n" end From 7462d1dcfd45e8dfeea69873f603b42c645beb61 Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Thu, 14 Apr 2022 16:26:54 +0200 Subject: [PATCH 2/8] Compatible with Rails 6: zeitwerk and search path --- app/overrides/repositories/navigation.rb | 5 ++ app/overrides/repositories/show.rb | 5 ++ init.rb | 1 + lib/hrack/{lib/hrack => }/bundle.rb | 1 - lib/hrack/init.rb | 4 - lib/hrack/lib/hrack.rb | 5 -- lib/hrack/{lib/hrack => }/server.rb | 0 lib/hrack/{lib/hrack => }/version.rb | 2 + lib/load_gitolite_hooks.rb | 3 + lib/redmine_git_hosting.rb | 2 +- lib/redmine_git_hosting/hooks.rb | 104 +++++++++++----------- lib/redmine_git_hosting/journal_logger.rb | 3 + 12 files changed, 73 insertions(+), 62 deletions(-) rename lib/hrack/{lib/hrack => }/bundle.rb (92%) delete mode 100644 lib/hrack/init.rb delete mode 100644 lib/hrack/lib/hrack.rb rename lib/hrack/{lib/hrack => }/server.rb (100%) rename lib/hrack/{lib/hrack => }/version.rb (74%) diff --git a/app/overrides/repositories/navigation.rb b/app/overrides/repositories/navigation.rb index ac08134c0..acdcddd8c 100644 --- a/app/overrides/repositories/navigation.rb +++ b/app/overrides/repositories/navigation.rb @@ -5,3 +5,8 @@ insert_before: 'erb[loud]:contains("label_statistics")', original: '88f120e99075ba3246901c6e970ca671d7166855', text: '<%= call_hook(:view_repositories_navigation, repository: @repository) %>' + +module Repositories + module Navigation + end +end diff --git a/app/overrides/repositories/show.rb b/app/overrides/repositories/show.rb index ab04680fe..6157c285f 100644 --- a/app/overrides/repositories/show.rb +++ b/app/overrides/repositories/show.rb @@ -11,3 +11,8 @@ insert_before: 'erb[silent]:contains("html_title")', original: '2a0a09659d76066b896016c72527d479c69463ec', partial: 'hooks/show_repositories_sidebar' + +module Repositories + module Show + end +end diff --git a/init.rb b/init.rb index 6dd386ae3..44a427ec9 100644 --- a/init.rb +++ b/init.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true +$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" Redmine::Plugin.register :redmine_git_hosting do name 'Redmine Git Hosting Plugin' diff --git a/lib/hrack/lib/hrack/bundle.rb b/lib/hrack/bundle.rb similarity index 92% rename from lib/hrack/lib/hrack/bundle.rb rename to lib/hrack/bundle.rb index fa5ab570b..4534ef9ad 100644 --- a/lib/hrack/lib/hrack/bundle.rb +++ b/lib/hrack/bundle.rb @@ -2,7 +2,6 @@ require 'rack/builder' require 'rack/parser' -require 'hrack/server' module Hrack module Bundle diff --git a/lib/hrack/init.rb b/lib/hrack/init.rb deleted file mode 100644 index ae5663c2d..000000000 --- a/lib/hrack/init.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -$LOAD_PATH.push File.expand_path('lib', __dir__) -require 'hrack' diff --git a/lib/hrack/lib/hrack.rb b/lib/hrack/lib/hrack.rb deleted file mode 100644 index 231f9c359..000000000 --- a/lib/hrack/lib/hrack.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -module Hrack - require 'hrack/bundle' -end diff --git a/lib/hrack/lib/hrack/server.rb b/lib/hrack/server.rb similarity index 100% rename from lib/hrack/lib/hrack/server.rb rename to lib/hrack/server.rb diff --git a/lib/hrack/lib/hrack/version.rb b/lib/hrack/version.rb similarity index 74% rename from lib/hrack/lib/hrack/version.rb rename to lib/hrack/version.rb index 52c448969..acc8bd606 100644 --- a/lib/hrack/lib/hrack/version.rb +++ b/lib/hrack/version.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true module Hrack + module Version + end VERSION = '1.0.0' end diff --git a/lib/load_gitolite_hooks.rb b/lib/load_gitolite_hooks.rb index 9ad3e52d9..7008c9add 100644 --- a/lib/load_gitolite_hooks.rb +++ b/lib/load_gitolite_hooks.rb @@ -72,3 +72,6 @@ ].each do |file| require_dependency file if File.exist? file end + +module LoadGitoliteHooks +end diff --git a/lib/redmine_git_hosting.rb b/lib/redmine_git_hosting.rb index 2fa95ed14..29c566b4e 100644 --- a/lib/redmine_git_hosting.rb +++ b/lib/redmine_git_hosting.rb @@ -65,5 +65,5 @@ def additionals_help_items # Redmine SCM adapter require_dependency 'redmine/scm/adapters/xitolite_adapter' - require 'hrack/init' + require 'hrack/bundle' end diff --git a/lib/redmine_git_hosting/hooks.rb b/lib/redmine_git_hosting/hooks.rb index a6eb0fad1..75ed5665c 100644 --- a/lib/redmine_git_hosting/hooks.rb +++ b/lib/redmine_git_hosting/hooks.rb @@ -3,70 +3,72 @@ require 'github/markup' module RedmineGitHosting - class GitHostingHookListener < Redmine::Hook::ViewListener - render_on :view_repository_edit_top, partial: 'repositories/edit_top' - render_on :view_repositories_show_contextual, partial: 'repositories/show_top' - render_on :view_repository_edit_bottom, partial: 'repositories/edit_bottom' - render_on :view_repositories_show_sidebar, partial: 'repositories/git_hosting_sidebar' - render_on :view_repositories_navigation, partial: 'repositories/git_hosting_navigation' - render_on :view_layouts_base_html_head, partial: 'common/git_hosting_html_head' - - def view_my_account_contextual(context) - user = context[:user] - link_to(l(:label_my_public_keys), public_keys_path, class: 'icon icon-passwd') if user.allowed_to_create_ssh_keys? - end + module Hooks + class GitHostingHookListener < Redmine::Hook::ViewListener + render_on :view_repository_edit_top, partial: 'repositories/edit_top' + render_on :view_repositories_show_contextual, partial: 'repositories/show_top' + render_on :view_repository_edit_bottom, partial: 'repositories/edit_bottom' + render_on :view_repositories_show_sidebar, partial: 'repositories/git_hosting_sidebar' + render_on :view_repositories_navigation, partial: 'repositories/git_hosting_navigation' + render_on :view_layouts_base_html_head, partial: 'common/git_hosting_html_head' + + def view_my_account_contextual(context) + user = context[:user] + link_to(l(:label_my_public_keys), public_keys_path, class: 'icon icon-passwd') if user.allowed_to_create_ssh_keys? + end - def self.default_url_options - { script_name: Redmine::Utils.relative_url_root } - end + def self.default_url_options + { script_name: Redmine::Utils.relative_url_root } + end - def view_repositories_show_bottom(context) - path = get_path context - rev = get_rev context - repository = context[:repository] - readme_file = find_readme_file repository, path, rev + def view_repositories_show_bottom(context) + path = get_path context + rev = get_rev context + repository = context[:repository] + readme_file = find_readme_file repository, path, rev - return '' if readme_file.nil? + return '' if readme_file.nil? - content = get_formatted_text repository, readme_file, rev + content = get_formatted_text repository, readme_file, rev - context[:controller].send :render_to_string, partial: 'repositories/readme', locals: { html: content } - end - - private + context[:controller].send :render_to_string, partial: 'repositories/readme', locals: { html: content } + end - def get_path(context) - context[:request].params['path'] || '' - end + private - def get_rev(context) - rev = context[:request].params['rev'] - rev.presence - end + def get_path(context) + context[:request].params['path'] || '' + end - def find_readme_file(repository, path, rev) - (repository.entries(path, rev) || []).find { |f| f.name =~ /README((\.).*)?/i } - end + def get_rev(context) + rev = context[:request].params['rev'] + rev.presence + end - def get_formatted_text(repository, file, rev) - raw_readme_text = Redmine::CodesetUtil.to_utf8_by_setting repository.cat(file.path, rev) + def find_readme_file(repository, path, rev) + (repository.entries(path, rev) || []).find { |f| f.name =~ /README((\.).*)?/i } + end - if redmine_file? file - formatter_name = Redmine::WikiFormatting.format_names.find { |name| name =~ /markdown/i } - Redmine::WikiFormatting.formatter_for(formatter_name).new(raw_readme_text).to_html - elsif github_file? file - RedmineGitHosting::MarkdownRenderer.to_html raw_readme_text - else - GitHub::Markup.render(file.path, raw_readme_text).gsub("\n", '
') + def get_formatted_text(repository, file, rev) + raw_readme_text = Redmine::CodesetUtil.to_utf8_by_setting repository.cat(file.path, rev) + + if redmine_file? file + formatter_name = Redmine::WikiFormatting.format_names.find { |name| name =~ /markdown/i } + Redmine::WikiFormatting.formatter_for(formatter_name).new(raw_readme_text).to_html + elsif github_file? file + RedmineGitHosting::MarkdownRenderer.to_html raw_readme_text + else + GitHub::Markup.render(file.path, raw_readme_text).gsub("\n", '
') + end end - end - def redmine_file?(file) - %w[.txt].include? File.extname(file.path) - end + def redmine_file?(file) + %w[.txt].include? File.extname(file.path) + end - def github_file?(file) - %w[.markdown .mdown .mkdn .md].include? File.extname(file.path) + def github_file?(file) + %w[.markdown .mdown .mkdn .md].include? File.extname(file.path) + end end end end diff --git a/lib/redmine_git_hosting/journal_logger.rb b/lib/redmine_git_hosting/journal_logger.rb index b1ed8f63a..5bcaa8488 100644 --- a/lib/redmine_git_hosting/journal_logger.rb +++ b/lib/redmine_git_hosting/journal_logger.rb @@ -36,5 +36,8 @@ def msg2str(msg) end end end + else + module JournalLogger + end end end From 1db7205d392e84cf0e1dfca015e99dd7410c0755 Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Sun, 17 Apr 2022 19:03:13 +0200 Subject: [PATCH 3/8] Ruby 3.0 compatibility: explicitely destructure hash to keyword arguments Ruby 3.0 does not implicitly destructure a Hash into keyword arguments if it was the last parameter to a method call. Also handle explicitely delegate keyword arguments. --- contrib/hooks/post-receive/lib/git_hosting_http_helper.rb | 2 +- .../gitolite_handlers/repositories/add_repository.rb | 4 ++-- lib/redmine_git_hosting/gitolite_wrappers/base.rb | 8 ++++---- .../gitolite_wrappers/repositories/add_repository.rb | 2 +- .../gitolite_wrappers/repositories/update_repository.rb | 2 +- .../plugins/extenders/branch_updater.rb | 4 ++-- .../plugins/extenders/config_key_deletor.rb | 4 ++-- .../plugins/extenders/git_annex_creator.rb | 4 ++-- .../plugins/extenders/readme_creator.rb | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb b/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb index 74195023b..2f70de981 100644 --- a/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb +++ b/contrib/hooks/post-receive/lib/git_hosting_http_helper.rb @@ -8,7 +8,7 @@ module GitHosting module HttpHelper def http_post(url, opts = {}, &block) - http, request = build_post_request url, opts + http, request = build_post_request url, **opts send_http_request http, request, &block end diff --git a/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb b/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb index b0fa113ea..226f8dad9 100644 --- a/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb +++ b/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb @@ -30,8 +30,8 @@ def gitolite_repo_path attr_reader :force - def initialize(*args) - super + def initialize(gitolite_config, repository, context, **options) + super(gitolite_config, repository, context, **options) @force = options.delete(:force) { false } @old_perms = options.delete(:old_perms) { {} } end diff --git a/lib/redmine_git_hosting/gitolite_wrappers/base.rb b/lib/redmine_git_hosting/gitolite_wrappers/base.rb index c95c30db5..705034842 100644 --- a/lib/redmine_git_hosting/gitolite_wrappers/base.rb +++ b/lib/redmine_git_hosting/gitolite_wrappers/base.rb @@ -49,19 +49,19 @@ def gitolite_admin_repo_commit(message = '') end def create_gitolite_repository(repository) - GitoliteHandlers::Repositories::AddRepository.call gitolite_config, repository, context, options + GitoliteHandlers::Repositories::AddRepository.call gitolite_config, repository, context, **options end def update_gitolite_repository(repository) - GitoliteHandlers::Repositories::UpdateRepository.call gitolite_config, repository, context, options + GitoliteHandlers::Repositories::UpdateRepository.call gitolite_config, repository, context, **options end def delete_gitolite_repository(repository) - GitoliteHandlers::Repositories::DeleteRepository.call gitolite_config, repository, context, options + GitoliteHandlers::Repositories::DeleteRepository.call gitolite_config, repository, context, **options end def move_gitolite_repository(repository) - GitoliteHandlers::Repositories::MoveRepository.call gitolite_config, repository, context, options + GitoliteHandlers::Repositories::MoveRepository.call gitolite_config, repository, context, **options end def create_gitolite_key(key) diff --git a/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb b/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb index 761ecc9c4..4529b0ccf 100644 --- a/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb +++ b/lib/redmine_git_hosting/gitolite_wrappers/repositories/add_repository.rb @@ -35,7 +35,7 @@ def create_repository logger.info 'Execute Gitolite Plugins' # Create README file or initialize GitAnnex - RedmineGitHosting::Plugins.execute :post_create, repository, options.merge(recovered: @recovered) + RedmineGitHosting::Plugins.execute :post_create, repository, **options.merge(recovered: @recovered) # Fetch changeset repository.fetch_changesets diff --git a/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb b/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb index e105932c1..bed853c4b 100644 --- a/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb +++ b/lib/redmine_git_hosting/gitolite_wrappers/repositories/update_repository.rb @@ -26,7 +26,7 @@ def update_repository logger.info 'Execute Gitolite Plugins' # Delete Git Config Keys - RedmineGitHosting::Plugins.execute :post_update, repository, options + RedmineGitHosting::Plugins.execute :post_update, repository, **options # Fetch changeset repository.fetch_changesets diff --git a/lib/redmine_git_hosting/plugins/extenders/branch_updater.rb b/lib/redmine_git_hosting/plugins/extenders/branch_updater.rb index f3440e9ba..421748981 100644 --- a/lib/redmine_git_hosting/plugins/extenders/branch_updater.rb +++ b/lib/redmine_git_hosting/plugins/extenders/branch_updater.rb @@ -4,8 +4,8 @@ module RedmineGitHosting::Plugins::Extenders class BranchUpdater < BaseExtender attr_reader :update_default_branch - def initialize(*args) - super + def initialize(repository, **options) + super(repository, **options) @update_default_branch = options.delete(:update_default_branch) { false } end diff --git a/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb b/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb index 7acd7e596..9dd60321a 100644 --- a/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb +++ b/lib/redmine_git_hosting/plugins/extenders/config_key_deletor.rb @@ -4,8 +4,8 @@ module RedmineGitHosting::Plugins::Extenders class ConfigKeyDeletor < BaseExtender attr_reader :delete_git_config_key - def initialize(*args) - super + def initialize(repository, **options) + super(repository, **options) @delete_git_config_key = options.delete(:delete_git_config_key) { '' } end diff --git a/lib/redmine_git_hosting/plugins/extenders/git_annex_creator.rb b/lib/redmine_git_hosting/plugins/extenders/git_annex_creator.rb index 14b22ec57..f49d8b184 100644 --- a/lib/redmine_git_hosting/plugins/extenders/git_annex_creator.rb +++ b/lib/redmine_git_hosting/plugins/extenders/git_annex_creator.rb @@ -4,8 +4,8 @@ module RedmineGitHosting::Plugins::Extenders class GitAnnexCreator < BaseExtender attr_reader :enable_git_annex - def initialize(*args) - super + def initialize(repository, **options) + super(repository, **options) @enable_git_annex = options.delete(:enable_git_annex) { false } end diff --git a/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb b/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb index 428bb3d43..fc37e9903 100644 --- a/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb +++ b/lib/redmine_git_hosting/plugins/extenders/readme_creator.rb @@ -6,8 +6,8 @@ module RedmineGitHosting::Plugins::Extenders class ReadmeCreator < BaseExtender attr_reader :create_readme_file - def initialize(*args) - super + def initialize(repository, **options) + super(repository, **options) @create_readme_file = options.delete(:create_readme_file) { false } end From 247c66c5ed7f02b6fc91ddabda42a6436e2a1cbf Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Mon, 18 Apr 2022 01:32:33 +0200 Subject: [PATCH 4/8] Fix ruby 3 hash as keyword argument is not supported issue Seems we only want an optional hash not keyword arguments so remove the double sprat and set a default empty hash value. --- lib/redmine/scm/adapters/xitolite_adapter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/scm/adapters/xitolite_adapter.rb b/lib/redmine/scm/adapters/xitolite_adapter.rb index e5c70d319..eb8f39783 100644 --- a/lib/redmine/scm/adapters/xitolite_adapter.rb +++ b/lib/redmine/scm/adapters/xitolite_adapter.rb @@ -187,7 +187,7 @@ def lastrev(path, rev) nil end - def revisions(path, identifier_from, identifier_to, **options) + def revisions(path, identifier_from, identifier_to, options={}) revs = Revisions.new cmd_args = %w[log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents --stdin] cmd_args << '--no-renames' if self.class.client_version_above? [2, 9] From 63e4fe70fd8e84ecb5c93220ce825ead1dbce938 Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Mon, 20 Jun 2022 21:13:35 +0200 Subject: [PATCH 5/8] Fix uninitialized constant #::Timezone Typo Timezone.new instead of Time.zone.now --- lib/redmine_git_hosting/cache/abstract_cache.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_git_hosting/cache/abstract_cache.rb b/lib/redmine_git_hosting/cache/abstract_cache.rb index c68e0b83a..171a60d15 100644 --- a/lib/redmine_git_hosting/cache/abstract_cache.rb +++ b/lib/redmine_git_hosting/cache/abstract_cache.rb @@ -56,7 +56,7 @@ def time_limit def valid_cache_entry?(cached_entry_date) return true if max_cache_time.to_i.negative? # No expiration needed - current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Timezone.now + current_time = ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.zone.now expired = current_time.to_i - cached_entry_date.to_i > max_cache_time !expired end From b18ebcf32ef8d8c7d4e3cf01c3fbe85d032a8838 Mon Sep 17 00:00:00 2001 From: dosyfier Date: Sat, 3 Sep 2022 14:53:32 +0200 Subject: [PATCH 6/8] Switch to a gitolite-rugged version that includes a Redmine5-related fix This new gitolite-rugged version brings rugged v1.5.x instead of v1.1.x, which allows gitolite-rugged to specify credentials when pushing to a git (which is expected for it to work correctly). By the way: * pkg-config is necessary to build rugged native C extensions; * starting from v1.5, rugged expects an explicit setting to build with SSH support, which is expected by redmine_git_hosting to work correctly (see: https://github.com/libgit2/rugged/tree/v1.5.0#options) --- .github/workflows/test.yml | 2 ++ Gemfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ac4d3b3b..3311e71e5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,6 +93,7 @@ jobs: libmysqlclient-dev libssh2-1 libssh2-1-dev + pkg-config subversion - name: Setup Ruby @@ -125,6 +126,7 @@ jobs: working-directory: redmine run: | bundle config set --local without 'development' + bundle config build.rugged --with-ssh bundle install --jobs=4 --retry=3 - name: Run Redmine rake tasks diff --git a/Gemfile b/Gemfile index b99da09ca..7f35e18b0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ # frozen_string_literal: true # Gitolite Admin repository management -gem 'gitolite-rugged', git: 'https://github.com/jbox-web/gitolite-rugged.git', tag: '1.4.0' +gem 'gitolite-rugged', git: 'https://github.com/dosyfier/gitolite-rugged.git', branch: 'fix-redmine-5' # Ruby/Rack Git Smart-HTTP Server Handler gem 'gitlab-grack', '~> 2.0.0', git: 'https://github.com/jbox-web/grack.git', require: 'grack', branch: 'fix_gemfile' From 8ef1bc480f5907838d51496e0019d5c229d56e11 Mon Sep 17 00:00:00 2001 From: Christophe Sourisse Date: Fri, 9 Sep 2022 19:22:18 +0200 Subject: [PATCH 7/8] Fix upon @prahal's 2104b7c3 commit about Ruby 3.x compat The options hash passed to repository constructor is duplicated. See lib/redmine_git_hosting/gitolite_handlers/repositories/base.rb#13 Thus, options should be updated by accessing the class' attribute directly. --- .../gitolite_handlers/repositories/add_repository.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb b/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb index 226f8dad9..20e05a329 100644 --- a/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb +++ b/lib/redmine_git_hosting/gitolite_handlers/repositories/add_repository.rb @@ -32,8 +32,8 @@ def gitolite_repo_path def initialize(gitolite_config, repository, context, **options) super(gitolite_config, repository, context, **options) - @force = options.delete(:force) { false } - @old_perms = options.delete(:old_perms) { {} } + @force = @options.delete(:force) { false } + @old_perms = @options.delete(:old_perms) { {} } end end end From bc3a39c0616956ee404a33823182f555a305c619 Mon Sep 17 00:00:00 2001 From: Christophe Sourisse Date: Sun, 11 Sep 2022 15:24:27 +0200 Subject: [PATCH 8/8] Switch to a redmine_sidekiq version compatible with Rails 6 --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3311e71e5..bee9af5a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,7 +70,10 @@ jobs: - name: Checkout redmine_sidekiq uses: actions/checkout@v2 with: - repository: ogom/redmine_sidekiq + # TODO Switch back to the original repo, once the "fix-rails-6" PR gets accepted + # repository: ogom/redmine_sidekiq + repository: dosyfier/redmine_sidekiq + ref: fix-rails-6 path: redmine/plugins/redmine_sidekiq - name: Checkout gitolite