Sha256: 2b998ba8acdbcb0ef3e8a32f4c3cc3bb5b24c4bbdc3224f7316b0d9b5cd48cab
Contents?: true
Size: 818 Bytes
Versions: 13
Compression:
Stored size: 818 Bytes
Contents
#!/usr/bin/env ruby lib = File.expand_path('../../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'optparse' require 'yaml' require_relative '../lib/splitclient-rb' ARGV << '-h' if ARGV.empty? options = {} opt_parser = OptionParser.new do |opts| opts.banner = "Usage: splitio [options]" opts.on("-cPATH", "--config=PATH", "Set the path to splitio.yml config file") do |c| options[:config_path] = c end opts.on_tail("-h", "--help", "Prints this help") do puts opts exit end end begin opt_parser.parse!(ARGV) rescue OptionParser::InvalidOption => e puts e puts opt_parser exit(1) end config = YAML.load_file(options[:config_path]) config.merge!(mode: :producer, cache_adapter: :redis) SplitIoClient::SplitFactory.new(config[:api_key], config)
Version data entries
13 entries across 13 versions & 1 rubygems