Commit 47b119781cae1b9221932b6d4aa7a1de42c47867

Authored by Laust Rud Jacobsen
1 parent 25296125
Exists in master and in 1 other branch production

Rubocop: autofix alias -> use alias_method instead

.rubocop_todo.yml
... ... @@ -88,13 +88,6 @@ Rails/Validation:
88 88 Style/AccessModifierIndentation:
89 89 Enabled: false
90 90  
91   -# Offense count: 3
92   -# Cop supports --auto-correct.
93   -Style/Alias:
94   - Exclude:
95   - - 'app/decorators/issue_tracker_field_decorator.rb'
96   - - 'app/models/app.rb'
97   -
98 91 # Offense count: 8
99 92 # Cop supports --auto-correct.
100 93 # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles.
... ...
app/decorators/issue_tracker_field_decorator.rb
... ... @@ -6,7 +6,7 @@ class IssueTrackerFieldDecorator < Draper::Decorator
6 6 end
7 7 attr_reader :object, :field_info
8 8  
9   - alias :key :object
  9 + alias_method :key, :object
10 10  
11 11 def label
12 12 field_info[:label] || object.to_s.titleize
... ...
app/models/app.rb
... ... @@ -94,7 +94,7 @@ class App
94 94 def notify_on_errs
95 95 !(super == false)
96 96 end
97   - alias :notify_on_errs? :notify_on_errs
  97 + alias_method :notify_on_errs?, :notify_on_errs
98 98  
99 99 def emailable?
100 100 notify_on_errs? && notification_recipients.any?
... ... @@ -103,7 +103,7 @@ class App
103 103 def notify_on_deploys
104 104 !(super == false)
105 105 end
106   - alias :notify_on_deploys? :notify_on_deploys
  106 + alias_method :notify_on_deploys?, :notify_on_deploys
107 107  
108 108 def repo_branch
109 109 self.repository_branch.present? ? self.repository_branch : 'master'
... ...