Skip to content

Commit ff4b7b2

Browse files
committed
Rubocop offences manual fixes
1 parent 3db5af6 commit ff4b7b2

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

Diff for: app/controllers/concerns/xitolite_repository_finder.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ def find_xitolite_repository_by_path
1616
repo_path = "#{params[:repo_path]}.git"
1717
repository = Repository::Xitolite.find_by_path repo_path, loose: true
1818
if repository.nil?
19-
RedmineGitHosting.logger.error "GoRedirector : repository not found at path : '#{repo_path}'," \
20-
' exiting!'
19+
RedmineGitHosting.logger.error "GoRedirector : repository not found at path : '#{repo_path}', " \
20+
'exiting!'
2121
render_404
2222
elsif !repository.go_access_available?
23-
RedmineGitHosting.logger.error "GoRedirector : GoAccess is disabled for this repository '#{repository.gitolite_repository_name}'," \
24-
' exiting!'
23+
RedmineGitHosting.logger.error "GoRedirector : GoAccess is disabled for this repository '#{repository.gitolite_repository_name}', " \
24+
'exiting!'
2525
render_403
2626
else
2727
RedmineGitHosting.logger.info "GoRedirector : access granted for repository '#{repository.gitolite_repository_name}'"

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 = {}) # rubocop:disable Style/OptionHash
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/gitolite_handlers/repositories/move_repository.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def move_physical_repo(old_path, new_path, new_parent_path)
110110

111111
## CASE 3
112112
elsif !new_path_exists && !old_path_exists
113-
logger.error "#{context} : both old repository '#{old_path}' and new repository '#{new_path}' does not exist, cannot move it," \
114-
' exit but let Gitolite create the new repo !'
113+
logger.error "#{context} : both old repository '#{old_path}' and new repository '#{new_path}' does not exist, " \
114+
'cannot move it, exit but let Gitolite create the new repo !'
115115
true
116116

117117
## CASE 4
@@ -126,8 +126,8 @@ def move_physical_repo_case_1(old_path, new_path)
126126
logger.warn "#{context} : target repository '#{new_path}' already exists and is empty, remove it ..."
127127
delete_directory! new_path, :target
128128
else
129-
logger.warn "#{context} : target repository '#{new_path}' exists and is not empty, considered as already moved, try to remove" \
130-
' the old_path if empty'
129+
logger.warn "#{context} : target repository '#{new_path}' exists and is not empty, " \
130+
'considered as already moved, try to remove the old_path if empty'
131131
if empty_repository? old_path
132132
delete_directory! old_path, :source
133133
else

Diff for: lib/tasks/migration_tools.rake

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,26 @@ namespace :redmine_git_hosting do
1313
puts "new_name : #{new_name}"
1414

1515
# Get the old migration name
16-
query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string 'schema_migrations'}" \
17-
" WHERE #{ActiveRecord::Base.connection.quote_string 'version'} =" \
18-
" '#{ActiveRecord::Base.connection.quote_string old_name}';"
16+
query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string 'schema_migrations'} " \
17+
"WHERE #{ActiveRecord::Base.connection.quote_string 'version'} = " \
18+
"'#{ActiveRecord::Base.connection.quote_string old_name}';"
1919
result = ActiveRecord::Base.connection.execute query
2020

2121
# If present, rename
2222
if result.to_a.present?
23-
query = "DELETE FROM #{ActiveRecord::Base.connection.quote_string 'schema_migrations'}" \
24-
" WHERE #{ActiveRecord::Base.connection.quote_string 'version'} =" \
25-
" '#{ActiveRecord::Base.connection.quote_string old_name}';"
23+
query = "DELETE FROM #{ActiveRecord::Base.connection.quote_string 'schema_migrations'} " \
24+
"WHERE #{ActiveRecord::Base.connection.quote_string 'version'} = " \
25+
"'#{ActiveRecord::Base.connection.quote_string old_name}';"
2626
ActiveRecord::Base.connection.execute query
2727

28-
query = "INSERT INTO #{ActiveRecord::Base.connection.quote_string 'schema_migrations'} (VERSION)" \
29-
" VALUES ('#{ActiveRecord::Base.connection.quote_string new_name}');"
28+
query = "INSERT INTO #{ActiveRecord::Base.connection.quote_string 'schema_migrations'} (VERSION) " \
29+
"VALUES ('#{ActiveRecord::Base.connection.quote_string new_name}');"
3030
ActiveRecord::Base.connection.execute query
3131
else
3232
# Check the new name is present
33-
query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string 'schema_migrations'}" \
34-
" WHERE #{ActiveRecord::Base.connection.quote_string 'version'} =" \
35-
" '#{ActiveRecord::Base.connection.quote_string new_name}';"
33+
query = "SELECT * FROM #{ActiveRecord::Base.connection.quote_string 'schema_migrations'} " \
34+
"WHERE #{ActiveRecord::Base.connection.quote_string 'version'} = " \
35+
"'#{ActiveRecord::Base.connection.quote_string new_name}';"
3636
result = ActiveRecord::Base.connection.execute query
3737

3838
if result.to_a.empty?

Diff for: spec/models/gitolite_public_key_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ def test_user
191191
ssh_keys = [
192192
'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Ec2gummukPxlpPHZ7K96iBdG5n8v0PJEDvTVZRRFlS0QYa407gj9HuMrPjwEfVHqy+3KZmvKLWQBsSlf0Fn+eAPg' \
193193
'noqwVfZaJnfgkSxJiAzRraKQZX1m2wx2SVMfjw7/1j59zV60UhFiwEQ3Eqlg3xjQmjvrwDM+SoshrWB+TeqwO/K+QEP1ZbURYoCxc92GrLYWKixsAov/zr0loXqul9fy' \
194-
'dZcWwJE3H/BWC7PTtn4jfjG9+9F+SZ0OMwQvSGKhVlj3GBDtaDBnsuoHGh/CA2W240nwpQysG2BJ5DWXu6vKbjNn6uV91wXeKDEDpuWqv5Vi2XAxGTWKc5lF0IJ5' \
195-
' nicolas@tchoum',
194+
'dZcWwJE3H/BWC7PTtn4jfjG9+9F+SZ0OMwQvSGKhVlj3GBDtaDBnsuoHGh/CA2W240nwpQysG2BJ5DWXu6vKbjNn6uV91wXeKDEDpuWqv5Vi2XAxGTWKc5lF0IJ5 ' \
195+
'nicolas@tchoum',
196196
'ssh-dss AAAAB3NzaC1kc3MAAACBAKscxrmjRgXtb0ZUaaBUteBtF2cI0vStnni9KVQd94L8qqxvKLbDl5JTKjUvG2s7rD4sVRzBoTkuDGb7OZLf56wJyF3k+k8uNRJz' \
197197
'vH/CZbkKM2hjuRVYVort1EwcH7JiEQr7bCLe7MRaltuo/M1vhapwy7fhKxAo9YoYVWiGoFTVAAAAFQDPywT8yFDahFvxtt/95Q9Emq8R7QAAAIBHYnvt3hT9NYy+nOuZ' \
198198
'G+cQTz0hnVzUIWuj0XF2iyx52s2eSmF0HxIsZ0D9g2A0L1Xr/vlkWBMq/zJZJgJw2Ifys8L47HzjhL8K0Skdm23Z6rQR9hlOEZ5Rcank98U6VRYPWpYk7OLdRDruwXb+' \

0 commit comments

Comments
 (0)