Skip to content
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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

mikz
Copy link
Contributor

@mikz mikz commented Aug 8, 2017

Fixes #5 by changing the namespace to MessageBusClient.

/cc @lowjoel

Copy link

@houndci-bot houndci-bot left a 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`.

Copy link

@houndci-bot houndci-bot left a 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

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'

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

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

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

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

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'

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

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'

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

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

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

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

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'

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.

# frozen_string_literal: true

class MessageBusClient
VERSION = '0.2.0'.freeze

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

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

example.run

at_exit {

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.


example.run

at_exit {

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.

at_exit do
Chat.quit!
server.kill
do

Choose a reason for hiding this comment

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

unexpected token kDO

at_exit do
Chat.quit!
server.kill
do

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
require File.join(chat_example_path, 'chat')

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

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.

def stop
return unless @state == STARTED || @state == PAUSED
def stop(timeout = nil)
raise ThreadError if Thread.current == @runner

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