Skip to content

Rename to message_bus_client to avoid namespace clash#6

Open
mikz wants to merge 14 commits into
lowjoel:masterfrom
3scale:master
Open

Rename to message_bus_client to avoid namespace clash#6
mikz wants to merge 14 commits into
lowjoel:masterfrom
3scale:master

Conversation

@mikz

@mikz mikz commented Aug 8, 2017

Copy link
Copy Markdown
Contributor

Fixes #5 by changing the namespace to MessageBusClient.

/cc @lowjoel

@houndci-bot houndci-bot left a comment

Copy link
Copy Markdown

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`.

@houndci-bot houndci-bot left a comment

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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'

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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::Connection
module MessageBusClient::Connection

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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.

Comment thread lib/message_bus_client.rb
@@ -0,0 +1,19 @@
require 'excon'

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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'

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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::Connection
module MessageBusClient::Connection

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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.

Comment thread lib/message_bus_client.rb
@@ -0,0 +1,19 @@
require 'excon'

Copy link
Copy Markdown

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.

Comment thread lib/message_bus_client/version.rb Outdated
# frozen_string_literal: true

class MessageBusClient
VERSION = '0.2.0'.freeze

Copy link
Copy Markdown

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.


# The chunk separator for chunked messages.
CHUNK_SEPARATOR = "\r\n|\r\n"
CHUNK_SEPARATOR = "\r\n|\r\n".freeze

Copy link
Copy Markdown

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.

@mikz mikz force-pushed the master branch 2 times, most recently from 65bc121 to 706674c Compare August 9, 2017 05:34
Comment thread spec/chat_server_helper.rb Outdated

example.run

at_exit {

Copy link
Copy Markdown

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.

Comment thread spec/chat_server_helper.rb Outdated

example.run

at_exit {

Copy link
Copy Markdown

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.

Comment thread spec/chat_server_helper.rb Outdated
at_exit do
Chat.quit!
server.kill
do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unexpected token kDO

Comment thread spec/chat_server_helper.rb Outdated
at_exit do
Chat.quit!
server.kill
do

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unexpected token kDO

@mikz mikz force-pushed the master branch 2 times, most recently from 3040e62 to fcdd949 Compare August 11, 2017 12:25
Comment thread spec/chat_server_helper.rb Outdated
require File.join(chat_example_path, 'chat')

RSpec.configure do |config|
config.before(:suite) do |example|

Copy link
Copy Markdown

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.

Comment thread 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

Copy link
Copy Markdown

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.

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.

2 participants