Commit 11b5881e7cf5db0c0297a7c7dc97e84b99453750
1 parent
80601044
Exists in
master
and in
1 other branch
Rubocop: remove spaces inside string interpolation expressions for consistency
Showing
6 changed files
with
5 additions
and
16 deletions
Show diff stats
.rubocop_todo.yml
| @@ -354,17 +354,6 @@ Style/SpaceInsideBrackets: | @@ -354,17 +354,6 @@ Style/SpaceInsideBrackets: | ||
| 354 | Style/SpaceInsideHashLiteralBraces: | 354 | Style/SpaceInsideHashLiteralBraces: |
| 355 | Enabled: false | 355 | Enabled: false |
| 356 | 356 | ||
| 357 | -# Offense count: 9 | ||
| 358 | -# Cop supports --auto-correct. | ||
| 359 | -# Configuration parameters: EnforcedStyle, SupportedStyles. | ||
| 360 | -Style/SpaceInsideStringInterpolation: | ||
| 361 | - Exclude: | ||
| 362 | - - 'app/models/issue.rb' | ||
| 363 | - - 'app/models/notification_service.rb' | ||
| 364 | - - 'app/models/notification_services/flowdock_service.rb' | ||
| 365 | - - 'app/models/notification_services/hoiio_service.rb' | ||
| 366 | - - 'spec/controllers/problems_controller_spec.rb' | ||
| 367 | - | ||
| 368 | # Offense count: 873 | 357 | # Offense count: 873 |
| 369 | # Cop supports --auto-correct. | 358 | # Cop supports --auto-correct. |
| 370 | # Configuration parameters: EnforcedStyle, SupportedStyles. | 359 | # Configuration parameters: EnforcedStyle, SupportedStyles. |
app/models/issue.rb
| @@ -22,7 +22,7 @@ class Issue | @@ -22,7 +22,7 @@ class Issue | ||
| 22 | if tracker.respond_to?(:title) | 22 | if tracker.respond_to?(:title) |
| 23 | tracker.title | 23 | tracker.title |
| 24 | else | 24 | else |
| 25 | - "[#{ problem.environment }][#{ problem.where }] #{problem.message.to_s.truncate(100)}" | 25 | + "[#{problem.environment}][#{problem.where}] #{problem.message.to_s.truncate(100)}" |
| 26 | end | 26 | end |
| 27 | end | 27 | end |
| 28 | 28 |
app/models/notification_service.rb
| @@ -35,7 +35,7 @@ class NotificationService | @@ -35,7 +35,7 @@ class NotificationService | ||
| 35 | def check_params; true; end | 35 | def check_params; true; end |
| 36 | 36 | ||
| 37 | def notification_description(problem) | 37 | def notification_description(problem) |
| 38 | - "[#{ problem.environment }][#{ problem.where }] #{problem.message.to_s.truncate(100)}" | 38 | + "[#{problem.environment}][#{problem.where}] #{problem.message.to_s.truncate(100)}" |
| 39 | end | 39 | end |
| 40 | 40 | ||
| 41 | # Allows us to set the issue tracker class from a single form. | 41 | # Allows us to set the issue tracker class from a single form. |
app/models/notification_services/flowdock_service.rb
| @@ -35,7 +35,7 @@ if defined? Flowdock | @@ -35,7 +35,7 @@ if defined? Flowdock | ||
| 35 | end | 35 | end |
| 36 | 36 | ||
| 37 | def content(problem, url) | 37 | def content(problem, url) |
| 38 | - full_description = "[#{ problem.environment }][#{ problem.where }] #{problem.message}" | 38 | + full_description = "[#{problem.environment}][#{problem.where}] #{problem.message}" |
| 39 | <<-MSG.strip_heredoc | 39 | <<-MSG.strip_heredoc |
| 40 | #{ERB::Util.html_escape full_description}<br> | 40 | #{ERB::Util.html_escape full_description}<br> |
| 41 | <a href="#{url}">#{url}</a> | 41 | <a href="#{url}">#{url}</a> |
app/models/notification_services/hoiio_service.rb
| @@ -26,7 +26,7 @@ class NotificationServices::HoiioService < NotificationService | @@ -26,7 +26,7 @@ class NotificationServices::HoiioService < NotificationService | ||
| 26 | end | 26 | end |
| 27 | 27 | ||
| 28 | def notification_description(problem) | 28 | def notification_description(problem) |
| 29 | - "[#{ problem.environment }]#{problem.message.to_s.truncate(50)}" | 29 | + "[#{problem.environment}]#{problem.message.to_s.truncate(50)}" |
| 30 | end | 30 | end |
| 31 | 31 | ||
| 32 | def create_notification(problem) | 32 | def create_notification(problem) |
spec/controllers/problems_controller_spec.rb
| @@ -218,7 +218,7 @@ describe ProblemsController, type: 'controller' do | @@ -218,7 +218,7 @@ describe ProblemsController, type: 'controller' do | ||
| 218 | 218 | ||
| 219 | it "should save the right title" do | 219 | it "should save the right title" do |
| 220 | post :create_issue, app_id: problem.app.id, id: problem.id | 220 | post :create_issue, app_id: problem.app.id, id: problem.id |
| 221 | - title = "[#{ problem.environment }][#{ problem.where }] #{problem.message.to_s.truncate(100)}" | 221 | + title = "[#{problem.environment}][#{problem.where}] #{problem.message.to_s.truncate(100)}" |
| 222 | line = issue_tracker.tracker.output.shift | 222 | line = issue_tracker.tracker.output.shift |
| 223 | expect(line[0]).to eq(title) | 223 | expect(line[0]).to eq(title) |
| 224 | end | 224 | end |