Skip to content

Commit 02d03e4

Browse files
Fix some problems for ruby3 - needs more work
1 parent e4b2bab commit 02d03e4

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

Diff for: app/presenters/repository_presenter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def render_git_urls
3636
def render_url_list
3737
s = []
3838
repository.available_urls_sorted.each do |key, value|
39-
s << tag.li(link_to(key.upcase, 'javascript:void(0)').html_safe, options_for_git_url(key, value))
39+
s << tag.li(link_to(key.upcase, 'javascript:void(0)').html_safe, **options_for_git_url(key, value))
4040
end
4141
safe_join s
4242
end

Diff for: app/use_cases/repositories/create.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def git_annex_repository_options
5757
end
5858

5959
def create_repository
60-
gitolite_accessor.create_repository repository, options
60+
gitolite_accessor.create_repository repository, **options
6161
end
6262
end
6363
end

Diff for: app/use_cases/settings/apply.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def initialize(previous_settings, resync_all_projects: false, resync_all_ssh_key
1717
end
1818

1919
class << self
20-
def call(previous_settings, **options)
20+
def call(previous_settings, options)
2121
new(previous_settings, **options).call
2222
end
2323
end

Diff for: lib/redmine/scm/adapters/xitolite_adapter.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,9 @@ def git_cmd(args, options = {}, &block)
479479

480480
# Insert cache between shell execution and caller
481481
if !git_cache_id.nil? && git_cache_enabled? && !bypass_cache
482-
RedmineGitHosting::ShellRedirector.execute(cmd_str, git_cache_id, options, &block)
482+
RedmineGitHosting::ShellRedirector.execute cmd_str, git_cache_id, **options, &block
483483
else
484-
Redmine::Scm::Adapters::AbstractAdapter.shellout(cmd_str, options, &block)
484+
Redmine::Scm::Adapters::AbstractAdapter.shellout cmd_str, options, &block
485485
end
486486
end
487487

Diff for: lib/redmine_git_hosting/commands/sudo.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def sudo_shell(*params)
158158
#
159159
def sudo_pipe_data(stdin)
160160
cmd = sudo.push 'sh'
161-
capture(cmd, { stdin_data: stdin, binmode: true })
161+
capture cmd, stdin_data: stdin, binmode: true
162162
end
163163

164164
private

Diff for: lib/redmine_git_hosting/patches/settings_controller_patch.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def handle_settings_update
5858
Setting.send "plugin_#{@plugin.id}=", settings_form.params
5959

6060
# Execute post actions
61-
execute_post_actions old_settings, **options.to_unsafe_h.symbolize_keys
61+
execute_post_actions old_settings, options.to_unsafe_h.symbolize_keys
6262

6363
flash[:notice] = l :notice_successful_update
6464
else

0 commit comments

Comments
 (0)