-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy path_kafkat
More file actions
executable file
·21 lines (16 loc) · 830 Bytes
/
_kafkat
File metadata and controls
executable file
·21 lines (16 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env ruby
# Run kafkat from source, specifically for testing stuff without doing a rake install.
require 'rubygems'
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib') << File.join(File.dirname(__FILE__), 'addon')
require 'kafkat/version'
spec = Gem::Specification.load(File.join(File.dirname(__FILE__), 'kafkat.gemspec'))
# To avoid a warning about the version_requirements deprecation, we use this method inline.
def version_required(gem_def)
return Gem::Dependency.instance_methods.map(&:to_sym).include?(:requirement) ? gem_def.requirement : gem_def.version_requirements
end
spec.dependencies.each do |dep|
gem dep.name, version_required(dep) if dep.type == :runtime
end
Gem.loaded_specs['kafkat'] = spec # Prevents RubyGem from loading files from installed kafkat gems
require 'kafkat'
Kafkat::CLI.run!