Skip to content

Commit 351f201

Browse files
committed
Rubocop autocorrect safe offences
1 parent 0a49f73 commit 351f201

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Diff for: init.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib"
3+
$LOAD_PATH.unshift "#{File.dirname __FILE__}/lib"
44

55
Redmine::Plugin.register :redmine_git_hosting do
66
name 'Redmine Git Hosting Plugin'

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def lastrev(path, rev)
187187
nil
188188
end
189189

190-
def revisions(path, identifier_from, identifier_to, options={})
190+
def revisions(path, identifier_from, identifier_to, options = {})
191191
revs = Revisions.new
192192
cmd_args = %w[log --no-color --encoding=UTF-8 --raw --date=iso --pretty=fuller --parents --stdin]
193193
cmd_args << '--no-renames' if self.class.client_version_above? [2, 9]

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def popen_options
6262
# Notes : this method is called in *service_rpc* (not overriden)
6363
#
6464
def popen_env
65-
{ 'PATH' => ENV['PATH'] }
65+
{ 'PATH' => ENV.fetch('PATH', nil) }
6666
end
6767

6868
private

Diff for: lib/redmine_git_hosting/redmine_plugin_loader.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def hook_file?(file)
119119

120120
def skip_lib_file?(file)
121121
# Exclude Redmine Views Hooks from Rails loader to avoid multiple calls to hooks on reload in dev environment.
122-
true if hook_file?(file) || (file.include?('journal_logger.rb') && !Object.const_defined?('Account'))
122+
true if hook_file?(file) || (file.include?('journal_logger.rb') && !Object.const_defined?(:Account))
123123
end
124124

125125
def autoload_libs!

Diff for: spec/support/global_helpers.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def create_svn_repository(**opts)
8686
def load_yaml_fixture(fixture)
8787
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
8888
YAML.load load_fixture(fixture), # rubocop: disable Security/YAMLLoad
89-
permitted_classes: [Symbol, Time]
89+
permitted_classes: [Symbol, Time]
9090
else
9191
YAML.load load_fixture(fixture) # rubocop: disable Security/YAMLLoad
9292
end

0 commit comments

Comments
 (0)