Sha256: b44b557d30464b2b425baa1532594dfc9ca02ab8c61996d2723a58637e03ee8f
Contents?: true
Size: 1.4 KB
Versions: 2
Compression:
Stored size: 1.4 KB
Contents
#!/usr/bin/env ruby require 'rubygems' require 'thor' require 'json' require 'uri' $:.unshift File.join(File.dirname(__FILE__), '.') $:.unshift File.join(File.dirname(__FILE__), '..') require 'lib/rhoconnect/utilities' require 'lib/rhoconnect' require 'utilities/utilities' require 'utilities/redis_runner' include Utilities settings_file = File.join(File.dirname(__FILE__), '..', 'generators', 'templates', 'application', 'settings', "settings.yml") options = load_settings(settings_file)[Rhoconnect.environment] RHOCONNECT_PORT = URI.parse(options[:syncserver]).port REDIS_SERVER_URL = options[:redis] PUSH_SERVER_URL = options[:push_server] API_TOKEN = options[:api_token] class Execute < Thor no_tasks { def self.define_task(&block) Execute.class_eval(&block) end } tasks = [ 'generators', 'rhoconnect', 'redis' ] unless windows? tasks << 'dtach' tasks << 'rhoconnect_attach' unless jruby? end tasks << if jruby? then "rhoconnect_war" else "rhoconnect_console" end # 'rhoconnect spec' command is available only if it called from root of # rhoconnect app and its bundle includes 'rspec' gem if File.exists?(File.join(Dir.pwd,'Gemfile')) require 'bundler' tasks << 'rhoconnect_spec' if Bundler.load.specs.find{ |s| s.name == 'rspec' } end tasks.each do |dir| Dir.glob(File.join(File.dirname(__FILE__), "#{dir}", "*.rb")) do |file| require file end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rhoconnect-4.0.0.beta.10 | commands/execute.rb |
rhoconnect-4.0.0.beta.12 | commands/execute.rb |