Rename to message_bus_client to avoid namespace clash#6
Conversation
houndci-bot
left a comment
There was a problem hiding this comment.
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`.
houndci-bot
left a comment
There was a problem hiding this comment.
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.
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.
Freeze mutable objects assigned to constants.
| @@ -0,0 +1,3 @@ | |||
| class MessageBusClient | |||
There was a problem hiding this comment.
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.
Missing magic comment # frozen_string_literal: true.
| @@ -1,4 +1,4 @@ | |||
| module MessageBus::Client::Connection | |||
| module MessageBusClient::Connection | |||
There was a problem hiding this comment.
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.
Missing magic comment # frozen_string_literal: true.
| @@ -0,0 +1,19 @@ | |||
| require 'excon' | |||
There was a problem hiding this comment.
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.
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.
Freeze mutable objects assigned to constants.
| @@ -0,0 +1,3 @@ | |||
| class MessageBusClient | |||
There was a problem hiding this comment.
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.
Missing magic comment # frozen_string_literal: true.
| @@ -1,4 +1,4 @@ | |||
| module MessageBus::Client::Connection | |||
| module MessageBusClient::Connection | |||
There was a problem hiding this comment.
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.
Missing magic comment # frozen_string_literal: true.
| @@ -0,0 +1,19 @@ | |||
| require 'excon' | |||
There was a problem hiding this comment.
Missing magic comment # frozen_string_literal: true.
| # frozen_string_literal: true | ||
|
|
||
| class MessageBusClient | ||
| VERSION = '0.2.0'.freeze |
There was a problem hiding this comment.
Do not freeze immutable objects, as freezing them has no effect.
|
|
||
| # 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.
Do not freeze immutable objects, as freezing them has no effect.
65bc121 to
706674c
Compare
|
|
||
| example.run | ||
|
|
||
| at_exit { |
There was a problem hiding this comment.
Avoid using {...} for multi-line blocks.
|
|
||
| example.run | ||
|
|
||
| at_exit { |
There was a problem hiding this comment.
Avoid using {...} for multi-line blocks.
| at_exit do | ||
| Chat.quit! | ||
| server.kill | ||
| do |
| at_exit do | ||
| Chat.quit! | ||
| server.kill | ||
| do |
3040e62 to
fcdd949
Compare
| require File.join(chat_example_path, 'chat') | ||
|
|
||
| RSpec.configure do |config| | ||
| config.before(:suite) do |example| |
There was a problem hiding this comment.
Unused block argument - example. You can omit the argument if you don't care about it.
| 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.
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