Sha256: f079435bd78790f9fc1c70eb53369a1dca4e78158b0e6d8ee02a990c1eba03ef
Contents?: true
Size: 859 Bytes
Versions: 8
Compression:
Stored size: 859 Bytes
Contents
unless defined? ADAPTOR_ROOT ADAPTOR_ROOT = File.expand_path(File.dirname(__FILE__) + '/..') end environment = "development" ARGV.each do |arg| if arg[0..14] == "ADAPTATION_ENV=" environment = arg[15..arg.length] end end require 'yaml' config = YAML::load(File.open("#{ADAPTOR_ROOT}/config/mom.yml"))[environment.to_s] case config["mom"]["type"] when "druby" require 'drb' mom_uri = "druby://#{config["mom"]["host"]}:#{config["mom"]["port"]}" mom = DRbObject.new(nil, mom_uri) mom.publish ARGV[1], ARGV[0] when "xmlblaster" require "rubygems" require "adaptation/xmlblaster_client" xbc = XmlblasterClient.new(config["mom"]["host"], config["mom"]["port"]) xbc.login( "OAP_USER", "OAP_PASS" ) xbc.publish( "<key oid='#{ARGV[0]}' contentMime='text/xml'/>", ARGV[1] , "<qos></qos>" ) xbc.logout end
Version data entries
8 entries across 8 versions & 1 rubygems