Skip to content

Conversation

@Homologist
Copy link
Owner

No description provided.

@@ -0,0 +1,21 @@
class TimsNotificationsChannel < ApplicationCable::Channel
Copy link
Owner Author

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
Copy link
Owner Author

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"
Copy link
Owner Author

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)
Copy link
Owner Author

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
Copy link
Owner Author

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)) }
Copy link
Owner Author

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)) }
Copy link
Owner Author

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)) }
Copy link
Owner Author

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]

@coveralls
Copy link

coveralls commented Jul 17, 2018

Pull Request Test Coverage Report for Build 61

  • 0 of 20 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-5.9%) to 14.545%

Changes Missing Coverage Covered Lines Changed/Added Lines %
app/services/tims.rb 0 1 0.0%
app/models/disruption.rb 0 1 0.0%
app/channels/tims_notifications_channel.rb 0 18 0.0%
Totals Coverage Status
Change from base Build 55: -5.9%
Covered Lines: 8
Relevant Lines: 55

💛 - Coveralls

@Homologist Homologist merged commit 5ed4639 into master Jul 17, 2018
@Homologist Homologist deleted the set_tims_still branch July 17, 2018 08:12
@Homologist Homologist restored the set_tims_still branch July 17, 2018 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants