lib/slack/real_time/config.rb in slack-ruby-client-0.10.0 vs lib/slack/real_time/config.rb in slack-ruby-client-0.11.0
- old
+ new
@@ -3,19 +3,19 @@
module Config
class NoConcurrencyError < StandardError; end
extend self
- ATTRIBUTES = [
- :token,
- :websocket_ping,
- :websocket_proxy,
- :concurrency,
- :start_method,
- :start_options,
- :store_class,
- :logger
+ ATTRIBUTES = %i[
+ token
+ websocket_ping
+ websocket_proxy
+ concurrency
+ start_method
+ start_options
+ store_class
+ logger
].freeze
attr_accessor(*Config::ATTRIBUTES)
def reset
@@ -34,18 +34,18 @@
end
private
def detect_concurrency
- [:Eventmachine, :Celluloid].each do |concurrency|
+ %i[Eventmachine Celluloid].each do |concurrency|
begin
return Slack::RealTime::Concurrency.const_get(concurrency)
rescue LoadError, NameError
false # could not be loaded, missing dependencies
end
end
- fail NoConcurrencyError, 'Missing concurrency. Add faye-websocket or celluloid-io to your Gemfile.'
+ raise NoConcurrencyError, 'Missing concurrency. Add faye-websocket or celluloid-io to your Gemfile.'
end
end
class << self
def configure