Skip to content

Commit

Permalink
Revert shorthand hash syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp committed Mar 30, 2022
1 parent b15224f commit 96cdf4f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ AllCops:
- 'script/**/*'
- 'vendor/**/*'
- 'public/**/*'

Style/HashSyntax:
EnforcedShorthandSyntax: either
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MissingParameterError < RuntimeError; end
@message = exception.message
layout = request.xhr? ? false : 'application'
logger.error exception.backtrace.join("\n") unless EXCEPTIONS_TO_IGNORE.include? exception
render template: 'error', formats: [:html], layout:, status: 400
render template: 'error', formats: [:html], layout: layout, status: 400
end

def validate_configuration
Expand All @@ -37,7 +37,7 @@ def validate_configuration

if config.api_username.blank? && config.opensuse_cookie.blank?
@message = _('The authentication to the OBS API has not been configured correctly.')
render template: 'error', formats: [:html], layout:, status: 503
render template: 'error', formats: [:html], layout: layout, status: 503
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ def search_for_description(pkgname, packages = [])
end

def icon(name, size = nil)
render(partial: "icons/#{name}", formats: :svg, locals: { size: })
render(partial: "icons/#{name}", formats: :svg, locals: { size: size })
end
end
2 changes: 1 addition & 1 deletion app/helpers/package_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_links(txt)

# Returns the screenshot thumbnail url for a given package object/hash
def screenshot_thumb_url(package)
url_for controller: :package, action: :thumbnail, package:, protocol: 'https'
url_for controller: :package, action: :thumbnail, package: package, protocol: 'https'
end

def project_url(project)
Expand Down

0 comments on commit 96cdf4f

Please sign in to comment.