Skip to content

Commit

Permalink
[api][ci] Fix Layout/SpaceInLambdaLiteral offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Dec 14, 2017
1 parent dd3bff6 commit d2b4a71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
9 changes: 0 additions & 9 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ Layout/MultilineMethodCallIndentation:
Layout/MultilineOperationIndentation:
Enabled: false

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: require_no_space, require_space
Layout/SpaceInLambdaLiteral:
Exclude:
- 'src/api/app/models/package_issue.rb'
- 'src/api/config/routes.rb'

# Offense count: 140
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/models/package_issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class PackageIssue < ApplicationRecord
belongs_to :package
belongs_to :issue

scope :open_issues_of_owner, -> (owner_id) { joins(:issue).where(issues: { state: 'OPEN', owner_id: owner_id})}
scope :open_issues_of_owner, ->(owner_id) { joins(:issue).where(issues: { state: 'OPEN', owner_id: owner_id})}
scope :with_patchinfo, lambda {
joins('LEFT JOIN package_kinds ON package_kinds.package_id = package_issues.package_id').where('package_kinds.kind = "patchinfo"')
}
Expand Down
6 changes: 3 additions & 3 deletions src/api/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,9 @@ def self.public_or_about_path?(request)

controller :source do
get 'source' => :index
post 'source' => :global_command_createmaintenanceincident, constraints: -> (req) { req.params[:cmd] == "createmaintenanceincident" }
post 'source' => :global_command_branch, constraints: -> (req) { req.params[:cmd] == "branch" }
post 'source' => :global_command_orderkiwirepos, constraints: -> (req) { req.params[:cmd] == "orderkiwirepos" }
post 'source' => :global_command_createmaintenanceincident, constraints: ->(req) { req.params[:cmd] == "createmaintenanceincident" }
post 'source' => :global_command_branch, constraints: ->(req) { req.params[:cmd] == "branch" }
post 'source' => :global_command_orderkiwirepos, constraints: ->(req) { req.params[:cmd] == "orderkiwirepos" }

# project level
get 'source/:project' => :show_project, constraints: cons
Expand Down

0 comments on commit d2b4a71

Please sign in to comment.