avro2kafka 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6e62da76fc477504898300a2a07e30d1c87d09e
4
- data.tar.gz: a582a13d5231bfa9f2b56bc6033d706193573b08
3
+ metadata.gz: 1480bbac2f419eee81ef08ca2ff227cff4fb8926
4
+ data.tar.gz: 4040db1c73723f00326570b6fd63227cc62f324f
5
5
  SHA512:
6
- metadata.gz: c6d08de11aca94e79abb24a179f752ea574ef772d7eea54a780cfa08f11ef9ba681431f4b932a1d72acc1dc110094f19586695f6d4446880dd45c8f76072e4a6
7
- data.tar.gz: 6aded16c6bb9b00b215723629d5d10435cfc49f9277ad87dded43616099401b8bc5699b08173d7fa3bf3ca927d8a016291313aa21ca2d6db0949baecace21d59
6
+ metadata.gz: 33428a0304ec5b01193bb6ec5dd6c7ad9876838059ca0b89ee6892f46689e96c14d0b20b822ea97033d5dbb24b9c6237daf42e98bb857896e9be44bc975d002c
7
+ data.tar.gz: 2e9a2aacafb9bc6bdfa65bb6c125a27c17d844e2d1b223145eddec01559cf53f1213923abaf24dbc34e0621112a5ecc1b541ce6e477b96d5a23067006df82b5e
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ .ruby-version
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.1.6
5
+ - 2.2.2
6
+ cache: bundler
7
+ notifications:
8
+ email: false
9
+ hipchat: 852d9ffe9095a59131fe5bf2a6d891@Data
data/CHANGELOG.md CHANGED
@@ -3,15 +3,24 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## 0.3.0 (2015-08-27)
7
+ Improved error reporting
8
+
9
+ ### Changed
10
+ * Return exit code 1 if there was an unexpected error
11
+ * Return exit code 2 if there are parameters missing
12
+ * Log error messages to STDERR
13
+
6
14
  ## 0.2.0 (2015-06-12)
15
+ Support for adding extra data to the message payload
7
16
 
8
17
  ### Added
9
18
 
10
- * --data option for extra data to be added to the message payload
19
+ * --data option to add extra data to to the message payload
11
20
 
12
21
  ### Changed
13
22
 
14
- * option --broker renamed to --broker-list and accpeting a comma separated list of brokers
23
+ * --broker option renamed to --broker-list and accepts a comma-separated list of brokers
15
24
 
16
25
  ## 0.1.0 (2015-06-09)
17
26
  Initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avro2kafka (0.1.0)
4
+ avro2kafka (0.3.0)
5
5
  avro (~> 1.7)
6
6
  poseidon (~> 0.0.5)
7
7
 
@@ -14,7 +14,7 @@ GEM
14
14
  coderay (1.1.0)
15
15
  diff-lcs (1.2.5)
16
16
  method_source (0.8.2)
17
- multi_json (1.11.0)
17
+ multi_json (1.11.1)
18
18
  poseidon (0.0.5)
19
19
  pry (0.10.1)
20
20
  coderay (~> 1.1.0)
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Publish data from Avro files to Kafka in JSON format
4
4
 
5
+ ![Travis](https://api.travis-ci.org/sspinc/avro2kafka.svg?branch=master)
6
+
5
7
  ## Installation
6
8
 
7
9
  Add this line to your application's Gemfile:
data/avro2kafka.gemspec CHANGED
@@ -6,11 +6,11 @@ require 'avro2kafka/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "avro2kafka"
8
8
  spec.version = Avro2Kafka::VERSION
9
- spec.authors = ["Peter Marton"]
10
- spec.email = ["martonpe@secretsaucepartners.com"]
9
+ spec.authors = ["Peter Marton", "Tamas Michelberger", "Gabor Ratky"]
10
+ spec.email = ["martonpe@secretsaucepartners.com", "tomi@secretsaucepartners.com", "gabor@secretsaucepartners.com"]
11
11
  spec.summary = %q{Publish Avro files to Kafka}
12
12
  spec.description = %q{Publish Avro files to Kafka in JSON format}
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/sspinc/avro2kafka"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -18,12 +18,14 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.required_ruby_version = '>= 2.1.0'
22
+
21
23
  spec.add_development_dependency "bundler", "~> 1.6"
22
24
  spec.add_development_dependency "rake", "~> 10.0"
23
25
  spec.add_development_dependency "rspec", "~> 3.2"
24
26
  spec.add_development_dependency "pry", "~> 0.10"
25
27
  spec.add_development_dependency "bump", "~> 0.5"
26
28
 
27
- spec.add_dependency "avro", "~> 1.7"
28
- spec.add_dependency "poseidon", "~> 0.0.5"
29
+ spec.add_runtime_dependency "avro", "~> 1.7"
30
+ spec.add_runtime_dependency "poseidon", "~> 0.0.5"
29
31
  end
data/bin/avro2kafka CHANGED
@@ -28,7 +28,7 @@ option_parser = OptionParser.new do |opts|
28
28
  end
29
29
 
30
30
  opts.on('-h', '--help', 'Prints help') do
31
- puts opts
31
+ $stderr.puts opts
32
32
  exit
33
33
  end
34
34
  end
@@ -41,11 +41,12 @@ begin
41
41
 
42
42
  Avro2Kafka.new(options).publish
43
43
  rescue OptionParser::MissingArgument => ex
44
- puts ex.message
45
-
46
- puts option_parser
44
+ $stderr.puts ex.message
45
+ $stderr.puts option_parser
46
+ exit 2
47
47
  rescue Exception => e
48
- puts 'Uh oh, something went wrong!'
49
- puts e.message
50
- puts e.backtrace.join("\n")
48
+ $stderr.puts 'Uh oh, something went wrong!'
49
+ $stderr.puts e.message
50
+ $stderr.puts e.backtrace.join("\n")
51
+ exit 1
51
52
  end
data/lib/avro2kafka.rb CHANGED
@@ -16,7 +16,7 @@ class Avro2Kafka
16
16
  def publish
17
17
  records = AvroReader.new(reader).read
18
18
  KafkaPublisher.new(**kafka_options).publish(records)
19
- puts "Avro file published to #{topic} topic on #{broker_list}!"
19
+ $stderr.puts "Avro file published to #{topic} topic on #{broker_list}!"
20
20
  end
21
21
 
22
22
  def topic
@@ -1,3 +1,3 @@
1
1
  class Avro2Kafka
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avro2kafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Marton
8
+ - Tamas Michelberger
9
+ - Gabor Ratky
8
10
  autorequire:
9
11
  bindir: bin
10
12
  cert_chain: []
11
- date: 2015-06-12 00:00:00.000000000 Z
13
+ date: 2015-08-28 00:00:00.000000000 Z
12
14
  dependencies:
13
15
  - !ruby/object:Gem::Dependency
14
16
  name: bundler
@@ -111,12 +113,16 @@ dependencies:
111
113
  description: Publish Avro files to Kafka in JSON format
112
114
  email:
113
115
  - martonpe@secretsaucepartners.com
116
+ - tomi@secretsaucepartners.com
117
+ - gabor@secretsaucepartners.com
114
118
  executables:
115
119
  - avro2kafka
116
120
  extensions: []
117
121
  extra_rdoc_files: []
118
122
  files:
123
+ - ".gitignore"
119
124
  - ".rspec"
125
+ - ".travis.yml"
120
126
  - CHANGELOG.md
121
127
  - Gemfile
122
128
  - Gemfile.lock
@@ -134,7 +140,7 @@ files:
134
140
  - spec/avro2kafka_spec.rb
135
141
  - spec/spec_helper.rb
136
142
  - spec/support/data.avro
137
- homepage: ''
143
+ homepage: https://github.com/sspinc/avro2kafka
138
144
  licenses:
139
145
  - MIT
140
146
  metadata: {}
@@ -146,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
152
  requirements:
147
153
  - - ">="
148
154
  - !ruby/object:Gem::Version
149
- version: '0'
155
+ version: 2.1.0
150
156
  required_rubygems_version: !ruby/object:Gem::Requirement
151
157
  requirements:
152
158
  - - ">="