Skip to content

Commit 85931fb

Browse files
committed
Fix Metrics/LineLength offenses
1 parent 5155d7c commit 85931fb

File tree

40 files changed

+332
-101
lines changed

40 files changed

+332
-101
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AllCops:
1515
Layout/EmptyLineAfterMagicComment:
1616
Enabled: false
1717
Metrics/BlockLength:
18-
Max: 150
18+
Max: 250
1919
Metrics/ClassLength:
2020
Max: 250
2121
Metrics/LineLength:

examples/hi_real_time/hi.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
client = Slack::RealTime::Client.new
1212

1313
client.on :hello do
14-
puts "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
14+
puts(
15+
"Successfully connected, welcome '#{client.self.name}' to " \
16+
"the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
17+
)
1518
end
1619

1720
client.on :message do |data|

examples/hi_real_time_and_web/hi.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
client = Slack::RealTime::Client.new
1010

1111
client.on :hello do
12-
puts "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
12+
puts(
13+
"Successfully connected, welcome '#{client.self.name}' " \
14+
"to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
15+
)
1316
end
1417

1518
client.on :message do |data|

examples/hi_real_time_async_async/hi.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
client = Slack::RealTime::Client.new(token: token)
1717

1818
client.on :hello do
19-
logger.info "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
19+
logger.info(
20+
"Successfully connected, welcome '#{client.self.name}' to " \
21+
"the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
22+
)
2023
end
2124

2225
client.on :message do |data|

examples/hi_real_time_async_celluloid/hi.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
client = Slack::RealTime::Client.new(token: token)
1515

1616
client.on :hello do
17-
logger.info "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
17+
logger.info(
18+
"Successfully connected, welcome '#{client.self.name}' to " \
19+
"the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
20+
)
1821
end
1922

2023
client.on :message do |data|

examples/hi_real_time_async_eventmachine/hi.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
client = Slack::RealTime::Client.new(token: token)
1515

1616
client.on :hello do
17-
logger.info "Successfully connected, welcome '#{client.self.name}' to the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
17+
logger.info(
18+
"Successfully connected, welcome '#{client.self.name}' to " \
19+
"the '#{client.team.name}' team at https://#{client.team.domain}.slack.com."
20+
)
1821
end
1922

2023
client.on :message do |data|

lib/slack/events/request.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class InvalidSignature < StandardError; end
1313
def initialize(http_request, options = {})
1414
@http_request = http_request
1515
@signing_secret = options[:signing_secret] || Slack::Events.config.signing_secret
16-
@signature_expires_in = options[:signature_expires_in] || Slack::Events.config.signature_expires_in
16+
@signature_expires_in =
17+
options[:signature_expires_in] || Slack::Events.config.signature_expires_in
1718
end
1819

1920
# Request timestamp.

lib/slack/real_time/api/message.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module Message
77
# Sends a message to a channel.
88
#
99
# @option options [channel] :channel
10-
# Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.
10+
# Channel to send message to. Can be a public channel, private group or IM channel.
11+
# Can be an encoded ID, or a name.
1112
# @option options [Object] :text
1213
# Text of the message to send. See below for an explanation of formatting.
1314
def message(options = {})

lib/slack/real_time/api/ping.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ module RealTime
44
module Api
55
module Ping
66
#
7-
# Clients should try to quickly detect disconnections, even in idle periods, so that users can easily tell the
8-
# difference between being disconnected and everyone being quiet. Not all web browsers support the WebSocket
7+
# Clients should try to quickly detect disconnections, even in idle periods, so that users
8+
# can easily tell the
9+
# difference between being disconnected and everyone being quiet. Not all web browsers
10+
# support the WebSocket
911
# ping spec, so the RTM protocol also supports ping/pong messages.
1012
#
1113
def ping(options = {})

lib/slack/real_time/api/typing.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module Typing
77
# Send a typing indicator to indicate that the user is currently writing a message.
88
#
99
# @option options [channel] :channel
10-
# Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name.
10+
# Channel to send message to. Can be a public channel, private group or IM channel.
11+
# Can be an encoded ID, or a name.
1112
def typing(options = {})
1213
throw ArgumentError.new('Required arguments :channel missing') if options[:channel].nil?
1314
send_json({ type: 'typing', id: next_id }.merge(options))

0 commit comments

Comments
 (0)