Commit 47b119781cae1b9221932b6d4aa7a1de42c47867
1 parent
25296125
Exists in
master
and in
1 other branch
Rubocop: autofix alias -> use alias_method instead
Showing
3 changed files
with
3 additions
and
10 deletions
Show diff stats
.rubocop_todo.yml
@@ -88,13 +88,6 @@ Rails/Validation: | @@ -88,13 +88,6 @@ Rails/Validation: | ||
88 | Style/AccessModifierIndentation: | 88 | Style/AccessModifierIndentation: |
89 | Enabled: false | 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 | # Offense count: 8 | 91 | # Offense count: 8 |
99 | # Cop supports --auto-correct. | 92 | # Cop supports --auto-correct. |
100 | # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. | 93 | # Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. |
app/decorators/issue_tracker_field_decorator.rb
@@ -6,7 +6,7 @@ class IssueTrackerFieldDecorator < Draper::Decorator | @@ -6,7 +6,7 @@ class IssueTrackerFieldDecorator < Draper::Decorator | ||
6 | end | 6 | end |
7 | attr_reader :object, :field_info | 7 | attr_reader :object, :field_info |
8 | 8 | ||
9 | - alias :key :object | 9 | + alias_method :key, :object |
10 | 10 | ||
11 | def label | 11 | def label |
12 | field_info[:label] || object.to_s.titleize | 12 | field_info[:label] || object.to_s.titleize |
app/models/app.rb
@@ -94,7 +94,7 @@ class App | @@ -94,7 +94,7 @@ class App | ||
94 | def notify_on_errs | 94 | def notify_on_errs |
95 | !(super == false) | 95 | !(super == false) |
96 | end | 96 | end |
97 | - alias :notify_on_errs? :notify_on_errs | 97 | + alias_method :notify_on_errs?, :notify_on_errs |
98 | 98 | ||
99 | def emailable? | 99 | def emailable? |
100 | notify_on_errs? && notification_recipients.any? | 100 | notify_on_errs? && notification_recipients.any? |
@@ -103,7 +103,7 @@ class App | @@ -103,7 +103,7 @@ class App | ||
103 | def notify_on_deploys | 103 | def notify_on_deploys |
104 | !(super == false) | 104 | !(super == false) |
105 | end | 105 | end |
106 | - alias :notify_on_deploys? :notify_on_deploys | 106 | + alias_method :notify_on_deploys?, :notify_on_deploys |
107 | 107 | ||
108 | def repo_branch | 108 | def repo_branch |
109 | self.repository_branch.present? ? self.repository_branch : 'master' | 109 | self.repository_branch.present? ? self.repository_branch : 'master' |