rdkafka 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/dist/librdkafka_2.0.2.tar.gz +0 -0
- data/ext/Rakefile +53 -26
- data/lib/rdkafka/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cfb434cf743bf1ab22c99849ea6efc793b0d367c6c638546c572013354b03b0
|
4
|
+
data.tar.gz: db1f892fd0e7d43ca702ce4c560328e120e0f7db8029dd09e5195c14e8355026
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e761ab003a9f64b20e06d06fb34dcf9114410c58aafd6e577a68851f630c4fdd38b481d2150857f7fce7b12cb208742e6898f5e7f29e4470bfacbaa3ae9ad78
|
7
|
+
data.tar.gz: 8358654b4323144848dd213751e35a91ab731539a4cba0c6f340b7618260304c8dc5310d8ba22cbcca6ea4e40aabfceb28dc1d24e3af6e45ae7669be82649578
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
# 0.13.1 (2024-07-10)
|
2
|
+
- [Fix] Switch to local release of librdkafka to mitigate its unavailability.
|
3
|
+
|
1
4
|
# 0.13.0
|
2
5
|
* Support cooperative sticky partition assignment in the rebalance callback (methodmissing)
|
3
6
|
* Support both string and symbol header keys (ColinDKelley)
|
Binary file
|
data/ext/Rakefile
CHANGED
@@ -1,40 +1,67 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require File.expand_path('../../lib/rdkafka/version', __FILE__)
|
4
|
-
require "mini_portile2"
|
5
4
|
require "fileutils"
|
6
5
|
require "open-uri"
|
7
6
|
|
8
7
|
task :default => :clean do
|
9
|
-
#
|
10
|
-
|
8
|
+
# For nix users, nix can't locate the file paths because the packages it's requiring aren't managed by the system but are
|
9
|
+
# managed by nix itself, so using the normal file paths doesn't work for nix users.
|
10
|
+
#
|
11
|
+
# Mini_portile causes an issue because it's dependencies are downloaded on the fly and therefore don't exist/aren't
|
12
|
+
# accessible in the nix environment
|
13
|
+
if ENV.fetch('RDKAFKA_EXT_PATH', '').empty?
|
14
|
+
# Download and compile librdkafka if RDKAFKA_EXT_PATH is not set
|
15
|
+
require "mini_portile2"
|
16
|
+
recipe = MiniPortile.new("librdkafka", Rdkafka::LIBRDKAFKA_VERSION)
|
11
17
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
# Use default homebrew openssl if we're on mac and the directory exists
|
19
|
+
# and each of flags is not empty
|
20
|
+
if recipe.host&.include?("darwin") && system("which brew &> /dev/null") && Dir.exist?("#{homebrew_prefix = %x(brew --prefix openssl).strip}")
|
21
|
+
ENV["CPPFLAGS"] = "-I#{homebrew_prefix}/include" unless ENV["CPPFLAGS"]
|
22
|
+
ENV["LDFLAGS"] = "-L#{homebrew_prefix}/lib" unless ENV["LDFLAGS"]
|
23
|
+
end
|
24
|
+
|
25
|
+
releases = File.expand_path(File.join(File.dirname(__FILE__), '../dist'))
|
26
|
+
|
27
|
+
recipe.files << {
|
28
|
+
:url => "file://#{releases}/librdkafka_#{Rdkafka::LIBRDKAFKA_VERSION}.tar.gz",
|
29
|
+
:sha256 => Rdkafka::LIBRDKAFKA_SOURCE_SHA256
|
30
|
+
}
|
31
|
+
recipe.configure_options = ["--host=#{recipe.host}"]
|
32
|
+
|
33
|
+
# Disable using libc regex engine in favor of the embedded one
|
34
|
+
# The default regex engine of librdkafka does not always work exactly as most of the users
|
35
|
+
# would expect, hence this flag allows for changing it to the other one
|
36
|
+
if ENV.key?('RDKAFKA_DISABLE_REGEX_EXT')
|
37
|
+
recipe.configure_options << '--disable-regex-ext'
|
38
|
+
end
|
18
39
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
40
|
+
recipe.cook
|
41
|
+
# Move dynamic library we're interested in
|
42
|
+
if recipe.host.include?('darwin')
|
43
|
+
from_extension = '1.dylib'
|
44
|
+
to_extension = 'dylib'
|
45
|
+
else
|
46
|
+
from_extension = 'so.1'
|
47
|
+
to_extension = 'so'
|
48
|
+
end
|
49
|
+
lib_path = File.join(File.dirname(__FILE__), "ports/#{recipe.host}/librdkafka/#{Rdkafka::LIBRDKAFKA_VERSION}/lib/librdkafka.#{from_extension}")
|
50
|
+
FileUtils.mv(lib_path, File.join(File.dirname(__FILE__), "librdkafka.#{to_extension}"))
|
51
|
+
# Cleanup files created by miniportile we don't need in the gem
|
52
|
+
FileUtils.rm_rf File.join(File.dirname(__FILE__), "tmp")
|
53
|
+
FileUtils.rm_rf File.join(File.dirname(__FILE__), "ports")
|
29
54
|
else
|
30
|
-
|
31
|
-
|
55
|
+
# Otherwise, copy existing libraries to ./ext
|
56
|
+
if ENV['RDKAFKA_EXT_PATH'].nil? || ENV['RDKAFKA_EXT_PATH'].empty?
|
57
|
+
raise "RDKAFKA_EXT_PATH must be set in your nix config when running under nix"
|
58
|
+
end
|
59
|
+
files = [
|
60
|
+
File.join(ENV['RDKAFKA_EXT_PATH'], 'lib', 'librdkafka.dylib'),
|
61
|
+
File.join(ENV['RDKAFKA_EXT_PATH'], 'lib', 'librdkafka.so')
|
62
|
+
]
|
63
|
+
files.each { |ext| FileUtils.cp(ext, File.dirname(__FILE__)) if File.exist?(ext) }
|
32
64
|
end
|
33
|
-
lib_path = File.join(File.dirname(__FILE__), "ports/#{recipe.host}/librdkafka/#{Rdkafka::LIBRDKAFKA_VERSION}/lib/librdkafka.#{from_extension}")
|
34
|
-
FileUtils.mv(lib_path, File.join(File.dirname(__FILE__), "librdkafka.#{to_extension}"))
|
35
|
-
# Cleanup files created by miniportile we don't need in the gem
|
36
|
-
FileUtils.rm_rf File.join(File.dirname(__FILE__), "tmp")
|
37
|
-
FileUtils.rm_rf File.join(File.dirname(__FILE__), "ports")
|
38
65
|
end
|
39
66
|
|
40
67
|
task :clean do
|
data/lib/rdkafka/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdkafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thijs Cadier
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- LICENSE
|
155
155
|
- README.md
|
156
156
|
- Rakefile
|
157
|
+
- dist/librdkafka_2.0.2.tar.gz
|
157
158
|
- docker-compose.yml
|
158
159
|
- ext/README.md
|
159
160
|
- ext/Rakefile
|
@@ -205,7 +206,7 @@ homepage: https://github.com/thijsc/rdkafka-ruby
|
|
205
206
|
licenses:
|
206
207
|
- MIT
|
207
208
|
metadata: {}
|
208
|
-
post_install_message:
|
209
|
+
post_install_message:
|
209
210
|
rdoc_options: []
|
210
211
|
require_paths:
|
211
212
|
- lib
|
@@ -220,8 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
221
|
- !ruby/object:Gem::Version
|
221
222
|
version: '0'
|
222
223
|
requirements: []
|
223
|
-
rubygems_version: 3.
|
224
|
-
signing_key:
|
224
|
+
rubygems_version: 3.5.14
|
225
|
+
signing_key:
|
225
226
|
specification_version: 4
|
226
227
|
summary: The rdkafka gem is a modern Kafka client library for Ruby based on librdkafka.
|
227
228
|
It wraps the production-ready C client using the ffi gem and targets Kafka 1.0+
|