#!/usr/bin/env ruby $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'cli_helper' options = {} OptionParser.new do |opts| opts.on('-m', '--module NAME', 'The CA module.') {|v| options[:module] = v } opts.on('-s', '--stat NAME', 'The CA stat.') {|v| options[:stat] = v } opts.on('-h','--help') do puts opts exit end begin opts.parse!(ARGV) rescue => e puts e.to_s << "\n" << opts.to_s exit end end begin client.request.return_variable = 'json' puts client.analytics.instrumentations.create options rescue => e puts e end