-
Notifications
You must be signed in to change notification settings - Fork 7
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
Rename to message_bus_client to avoid namespace clash #6
base: master
Are you sure you want to change the base?
Conversation
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.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout
.rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/IndentHash has the wrong namespace - should be Layout Error: The `Style/TrailingComma` cop no longer exists. Please use `Style/TrailingCommaInLiteral` and/or `Style/TrailingCommaInArguments` instead. (obsolete configuration found in .rubocop.yml, please update it) The `Style/DeprecatedHashMethods` cop has been renamed to `Style/PreferredHashMethods`.
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.
Some files could not be reviewed due to errors:
.rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout
.rubocop.yml: Style/DotPosition has the wrong namespace - should be Layout .rubocop.yml: Style/IndentHash has the wrong namespace - should be Layout Error: The `Style/TrailingComma` cop no longer exists. Please use `Style/TrailingCommaInLiteral` and/or `Style/TrailingCommaInArguments` instead. (obsolete configuration found in .rubocop.yml, please update it) The `Style/DeprecatedHashMethods` cop has been renamed to `Style/PreferredHashMethods`.
@@ -1,17 +1,17 @@ | |||
RSpec.describe MessageBus::Client do | |||
RSpec.describe MessageBusClient do |
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.
Block has too many lines. [93/25]
Missing magic comment # frozen_string_literal: true.
@@ -0,0 +1,3 @@ | |||
class MessageBusClient | |||
VERSION = '0.2.0' |
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.
Freeze mutable objects assigned to constants.
@@ -0,0 +1,3 @@ | |||
class MessageBusClient |
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.
Missing magic comment # frozen_string_literal: true.
@@ -1,4 +1,4 @@ | |||
module MessageBus::Client::MessageHandler | |||
module MessageBusClient::MessageHandler |
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.
Missing magic comment # frozen_string_literal: true.
lib/message_bus_client/connection.rb
Outdated
@@ -1,4 +1,4 @@ | |||
module MessageBus::Client::Connection | |||
module MessageBusClient::Connection |
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.
Missing magic comment # frozen_string_literal: true.
@@ -1,4 +1,4 @@ | |||
module MessageBus::Client::Configuration | |||
module MessageBusClient::Configuration |
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.
Missing magic comment # frozen_string_literal: true.
@@ -0,0 +1,19 @@ | |||
require 'excon' |
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.
Missing magic comment # frozen_string_literal: true.
@@ -1,17 +1,17 @@ | |||
RSpec.describe MessageBus::Client do | |||
RSpec.describe MessageBusClient do |
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.
Block has too many lines. [93/25]
Missing magic comment # frozen_string_literal: true.
@@ -0,0 +1,3 @@ | |||
class MessageBusClient | |||
VERSION = '0.2.0' |
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.
Freeze mutable objects assigned to constants.
@@ -0,0 +1,3 @@ | |||
class MessageBusClient |
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.
Missing magic comment # frozen_string_literal: true.
@@ -1,4 +1,4 @@ | |||
module MessageBus::Client::MessageHandler | |||
module MessageBusClient::MessageHandler |
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.
Missing magic comment # frozen_string_literal: true.
lib/message_bus_client/connection.rb
Outdated
@@ -1,4 +1,4 @@ | |||
module MessageBus::Client::Connection | |||
module MessageBusClient::Connection |
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.
Missing magic comment # frozen_string_literal: true.
@@ -1,4 +1,4 @@ | |||
module MessageBus::Client::Configuration | |||
module MessageBusClient::Configuration |
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.
Missing magic comment # frozen_string_literal: true.
@@ -0,0 +1,19 @@ | |||
require 'excon' |
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.
Missing magic comment # frozen_string_literal: true.
lib/message_bus_client/version.rb
Outdated
# frozen_string_literal: true | ||
|
||
class MessageBusClient | ||
VERSION = '0.2.0'.freeze |
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.
Do not freeze immutable objects, as freezing them has no effect.
@@ -13,7 +15,7 @@ def callback(payload) | |||
end | |||
|
|||
# The chunk separator for chunked messages. | |||
CHUNK_SEPARATOR = "\r\n|\r\n" | |||
CHUNK_SEPARATOR = "\r\n|\r\n".freeze |
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.
Do not freeze immutable objects, as freezing them has no effect.
65bc121
to
706674c
Compare
spec/chat_server_helper.rb
Outdated
|
||
example.run | ||
|
||
at_exit { |
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.
Avoid using {...} for multi-line blocks.
spec/chat_server_helper.rb
Outdated
|
||
example.run | ||
|
||
at_exit { |
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.
Avoid using {...} for multi-line blocks.
spec/chat_server_helper.rb
Outdated
at_exit do | ||
Chat.quit! | ||
server.kill | ||
do |
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.
unexpected token kDO
spec/chat_server_helper.rb
Outdated
at_exit do | ||
Chat.quit! | ||
server.kill | ||
do |
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.
unexpected token kDO
3040e62
to
fcdd949
Compare
spec/chat_server_helper.rb
Outdated
require File.join(chat_example_path, 'chat') | ||
|
||
RSpec.configure do |config| | ||
config.before(:suite) do |example| |
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.
Unused block argument - example. You can omit the argument if you don't care about it.
lib/message_bus_client/connection.rb
Outdated
def stop | ||
return unless @state == STARTED || @state == PAUSED | ||
def stop(timeout = nil) | ||
raise ThreadError if Thread.current == @runner |
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.
Use fail instead of raise to signal exceptions.
try to gracefully stop or kill the runner thread
that can be result of some interrupted connection like https://travis-ci.org/lowjoel/message_bus-client/jobs/266253959
Fixes #5 by changing the namespace to
MessageBusClient
./cc @lowjoel