diff --git a/lib/poseidon/topic_metadata.rb b/lib/poseidon/topic_metadata.rb index 3265c4b..61730aa 100644 --- a/lib/poseidon/topic_metadata.rb +++ b/lib/poseidon/topic_metadata.rb @@ -18,7 +18,7 @@ def initialize(struct=nil) end # Write a binary representation of the TopicMetadata to buffer - # + # # @param [RequestBuffer] buffer # @return [nil] def write(buffer) @@ -56,7 +56,7 @@ def partition_count def available_partitions @available_partitions ||= struct.partitions.select do |partition| - partition.error == 0 && partition.leader != -1 + (partition.error == Errors::NO_ERROR_CODE || Errors::ERROR_CODES[partition.error] == Errors::ReplicaNotAvailable) && partition.leader != -1 end end diff --git a/lib/poseidon/version.rb b/lib/poseidon/version.rb index 96ba1e2..2c9b5b8 100644 --- a/lib/poseidon/version.rb +++ b/lib/poseidon/version.rb @@ -1,4 +1,4 @@ module Poseidon # Unstable! API May Change! - VERSION = "0.0.5" + VERSION = "0.0.6" end diff --git a/poseidon.gemspec b/poseidon.gemspec index 0a397c6..60c4afb 100644 --- a/poseidon.gemspec +++ b/poseidon.gemspec @@ -4,13 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'poseidon/version' Gem::Specification.new do |gem| - gem.name = "poseidon" + gem.name = "codeclimate-poseidon" gem.version = Poseidon::VERSION - gem.authors = ["Bob Potter"] - gem.email = ["bobby.potter@gmail.com"] - gem.description = %q{A Kafka (http://kafka.apache.org/) producer and consumer} + gem.authors = ["Bob Potter", "Code Climate"] + gem.email = ["bobby.potter@gmail.com", "hello@codeclimate.com"] + gem.description = %q{Forked from bpot/poseidon: a Kafka (http://kafka.apache.org/) producer and consumer} gem.summary = %q{Poseidon is a producer and consumer implementation for Kafka >= 0.8} - gem.homepage = "https://github.com/bpot/poseidon" + gem.homepage = "https://github.com/codeclimate/poseidon" gem.licenses = ["MIT"] gem.required_ruby_version = '>= 1.9.3'