hermann 0.11-x86-darwin-12 → 0.15-x86-darwin-12
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.
- data/Rakefile +17 -23
- data/ext/.ruby-version +1 -0
- data/ext/{extconf.rb → hermann/extconf.rb} +5 -3
- data/ext/hermann/hermann_lib.c +1029 -0
- data/ext/{hermann_lib.h → hermann/hermann_lib.h} +47 -22
- data/lib/hermann/consumer.rb +19 -0
- data/lib/hermann/errors.rb +8 -0
- data/lib/hermann/producer.rb +122 -0
- data/lib/hermann/result.rb +74 -0
- data/lib/hermann/timeout.rb +37 -0
- data/lib/hermann/version.rb +3 -0
- data/lib/hermann.rb +2 -1
- metadata +25 -18
- data/bin/hermann +0 -4
- data/ext/hermann_lib.c +0 -727
- data/ext/hermann_lib.o +0 -0
- data/test/test_hermann.rb +0 -9
data/Rakefile
CHANGED
@@ -1,31 +1,25 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
require 'rake/extensiontask'
|
1
5
|
|
2
|
-
require 'rake/clean'
|
3
6
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
CLEAN.include [ 'ext/*.o', 'ext/depend', 'ext/hermann_lib.bundle', MODULE ]
|
11
|
-
CLOBBER.include [ 'config.save', 'ext/mkmf.log', 'ext/hermann_lib.bundle', MAKEFILE ]
|
7
|
+
Rake::ExtensionTask.new do |t|
|
8
|
+
t.name = 'hermann_lib'
|
9
|
+
t.ext_dir = 'ext/hermann'
|
10
|
+
t.gem_spec = Gem::Specification.load('hermann.gemspec')
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
unless sh "ruby #{File::basename(EXT_CONF)}"
|
16
|
-
$stderr.puts "Failed to run extconf"
|
17
|
-
break
|
18
|
-
end
|
19
|
-
end
|
13
|
+
RSpec::Core::RakeTask.new(:spec) do |r|
|
14
|
+
r.rspec_opts = '--tag ~type:integration'
|
20
15
|
end
|
21
16
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
$stderr.puts "make failed"
|
26
|
-
end
|
17
|
+
namespace :spec do
|
18
|
+
RSpec::Core::RakeTask.new(:integration) do |r|
|
19
|
+
r.rspec_opts = '--tag type:integration'
|
27
20
|
end
|
28
21
|
end
|
29
22
|
|
30
|
-
|
31
|
-
task :
|
23
|
+
task :build => [:compile]
|
24
|
+
task :default => [:clean, :build, :spec]
|
25
|
+
|
data/ext/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.8.7-p375
|
@@ -12,15 +12,17 @@ puts "Include Dir: #{INCLUDEDIR}"
|
|
12
12
|
|
13
13
|
HEADER_DIRS = [INCLUDEDIR]
|
14
14
|
|
15
|
-
LIB_DIRS = [LIBDIR]
|
15
|
+
LIB_DIRS = [LIBDIR, './librdkafka']
|
16
16
|
|
17
17
|
dir_config('rdkafka', HEADER_DIRS, LIB_DIRS)
|
18
18
|
|
19
|
-
|
19
|
+
ROOTDIR = File.expand_path(File.dirname(__FILE__) + '/../../')
|
20
|
+
RDK = File.join(ROOTDIR, 'librdkafka/target')
|
21
|
+
unless find_header('librdkafka/rdkafka.h', File.join(RDK, 'include'))
|
20
22
|
abort "librdkafka not installed"
|
21
23
|
end
|
22
24
|
|
23
|
-
unless find_library('rdkafka', 'rd_kafka_conf_new')
|
25
|
+
unless find_library('rdkafka', 'rd_kafka_conf_new', File.join(RDK, 'lib'))
|
24
26
|
abort "librdkafka not installed"
|
25
27
|
end
|
26
28
|
|