-
Notifications
You must be signed in to change notification settings - Fork 0
add action cable #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| @@ -0,0 +1,21 @@ | |||
| class TimsNotificationsChannel < ApplicationCable::Channel | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/Documentation: Missing top-level class documentation comment.
| @@ -0,0 +1,21 @@ | |||
| class TimsNotificationsChannel < ApplicationCable::Channel | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
| @@ -0,0 +1,21 @@ | |||
| class TimsNotificationsChannel < ApplicationCable::Channel | |||
| def subscribed | |||
| stream_from "tims_notifications_channel" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
| # Any cleanup needed when channel is unsubscribed | ||
| end | ||
|
|
||
| def receive(data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lint/UnusedMethodArgument: Unused method argument - data. If it's necessary, use _ or _data as an argument name to indicate that it won't be used. You can also write as receive(*) if you want the method to accept any arguments but don't care about them.
| marker.lng disruption.longitude | ||
| end | ||
| @hash_list.each do |disruption| | ||
| ActionCable.server.broadcast "tims_notifications_channel", message: disruption |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| def get_disruptions | ||
| download_and_filter_disruption.map{ |disruption| Disruption.new(*first_divided(disruption["CauseArea"]["DisplayPoint"]["Point"].values)) } | ||
| download_and_filter_disruption.map{ |disruption| Disruption.new(*disruption["CauseArea"]["DisplayPoint"]["Point"]["coordinatesLL"].split(",").map(&:to_f)) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceBeforeBlockBraces: Space missing to the left of {.
|
|
||
| def get_disruptions | ||
| download_and_filter_disruption.map{ |disruption| Disruption.new(*first_divided(disruption["CauseArea"]["DisplayPoint"]["Point"].values)) } | ||
| download_and_filter_disruption.map{ |disruption| Disruption.new(*disruption["CauseArea"]["DisplayPoint"]["Point"]["coordinatesLL"].split(",").map(&:to_f)) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
|
||
| def get_disruptions | ||
| download_and_filter_disruption.map{ |disruption| Disruption.new(*first_divided(disruption["CauseArea"]["DisplayPoint"]["Point"].values)) } | ||
| download_and_filter_disruption.map{ |disruption| Disruption.new(*disruption["CauseArea"]["DisplayPoint"]["Point"]["coordinatesLL"].split(",").map(&:to_f)) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [160/120]
Pull Request Test Coverage Report for Build 61
💛 - Coveralls |
No description provided.