glass_octopus 2.0.0 → 2.2.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
  SHA256:
3
- metadata.gz: 4050c7f59a837ce7113f5e4d89488f0f5db6a3ed409ec77b766a5944646ea1bc
4
- data.tar.gz: 8b3c82d22898907786d0febe16fc275fd839214f5656168a1917e854029fef5a
3
+ metadata.gz: 82416096fcfae0755ce9d9c9e0a71521be8bc5935d693c1861f85357dd771d5a
4
+ data.tar.gz: 216122bcad01fb00f76892b55da5415a014088c0658cc481565cf26cea62adea
5
5
  SHA512:
6
- metadata.gz: ced4aa1361e029523d6570d982e507b7a1a674946195f975083e85962226c3fe8c0331ecef76796267db8e761bc9b439c0c3a27b004a78550373c8dd2ab9cc3d
7
- data.tar.gz: 6f15379c6c7570d2ffe79ea0d3a11347c4d57113d96c897fb3f69df23c57a7dd3b5866887f10989cc356a40f12924023e39f3b3b7d28c3abc2c60445747ebd6b
6
+ metadata.gz: 8403ac42ffb41b0f3fa2c037b590ebf06ac7b2cf3791c74975663ce1c0e9c3f50f2814fc7de443c30201945cab1d247b3d235386ad8ab10cc0da54ecbc5ad50d
7
+ data.tar.gz: 0fc5eb1f1047eb08262dd833c72e29a79457196d87149ed653d42e0140ccb27ac1bf990a2c56924a275984cb9fc6aff8a7ab7f0764fbfdb14ded39a588a6eeba
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.swp
@@ -29,8 +29,8 @@ EOF
29
29
  spec.add_development_dependency "guard", "~> 2.14"
30
30
  spec.add_development_dependency "guard-minitest", "~> 2.4"
31
31
  spec.add_development_dependency "terminal-notifier-guard", "~> 1.7"
32
- spec.add_development_dependency "ruby-kafka", "~> 0.7.0"
33
- spec.add_development_dependency "avro_turf", "~> 0.8.0"
34
- spec.add_development_dependency "sinatra", "~> 2.0.0"
32
+ spec.add_development_dependency "ruby-kafka", "~> 1.0"
33
+ spec.add_development_dependency "avro_turf", "~> 1.0"
34
+ spec.add_development_dependency "sinatra", ">= 2.2.0"
35
35
  spec.add_development_dependency "webmock", "~> 3.3.0"
36
36
  end
@@ -3,7 +3,7 @@ require "benchmark"
3
3
  module GlassOctopus
4
4
  module Middleware
5
5
  class CommonLogger
6
- FORMAT = "Processed message. topic=%s, partition=%d, key=%s, runtime=%fms".freeze
6
+ FORMAT = "Processed message. topic=%s partition=%d offset=%d key=%s runtime=%fms".freeze
7
7
 
8
8
  def initialize(app, logger=nil, log_level=:info)
9
9
  @app = app
@@ -27,8 +27,8 @@ module GlassOctopus
27
27
  end
28
28
 
29
29
  def format_message(ctx, runtime)
30
- format(FORMAT,
31
- ctx.message.topic, ctx.message.partition, ctx.message.key, runtime)
30
+ format(FORMAT, ctx.message.topic,
31
+ ctx.message.partition, ctx.message.offset, ctx.message.key, runtime)
32
32
  end
33
33
  end
34
34
  end
@@ -20,7 +20,12 @@ module GlassOctopus
20
20
  end
21
21
 
22
22
  def call(ctx)
23
- perform_action_with_newrelic_trace(@options) do
23
+ options = @options.merge(params: {
24
+ topic: ctx.message.topic,
25
+ partition: ctx.message.partition,
26
+ offset: ctx.message.offset,
27
+ })
28
+ perform_action_with_newrelic_trace(options) do
24
29
  @app.call(ctx)
25
30
  end
26
31
  rescue Exception => ex
@@ -1,3 +1,3 @@
1
1
  module GlassOctopus
2
- VERSION = "2.0.0"
2
+ VERSION = "2.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glass_octopus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tamás Michelberger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-17 00:00:00.000000000 Z
11
+ date: 2024-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -100,42 +100,42 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.7.0
103
+ version: '1.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.7.0
110
+ version: '1.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: avro_turf
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.8.0
117
+ version: '1.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.8.0
124
+ version: '1.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: sinatra
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 2.0.0
131
+ version: 2.2.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 2.0.0
138
+ version: 2.2.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: webmock
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +196,7 @@ homepage: https://github.com/sspinc/glass-octopus
196
196
  licenses:
197
197
  - MIT
198
198
  metadata: {}
199
- post_install_message:
199
+ post_install_message:
200
200
  rdoc_options: []
201
201
  require_paths:
202
202
  - lib
@@ -211,9 +211,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  - !ruby/object:Gem::Version
212
212
  version: '0'
213
213
  requirements: []
214
- rubyforge_project:
215
- rubygems_version: 2.7.6
216
- signing_key:
214
+ rubygems_version: 3.1.6
215
+ signing_key:
217
216
  specification_version: 4
218
217
  summary: A Kafka consumer framework. Like Rack but for Kafka.
219
218
  test_files: []