Sha256: 98bb3956893b7956d2d2358222adb1ebc238bbb1cdd46d5ba74c46f7cf6edbea
Contents?: true
Size: 886 Bytes
Versions: 10
Compression:
Stored size: 886 Bytes
Contents
#!/usr/bin/env ruby # sadly it's impossible to pass '-Ku' argument to ruby via shebang, use RUBYOPT to set it, something like: # $ export RUBYOPT="-Ku -rrubygems" require 'rad' require 'rad/cli/helper' # version if ARGV.first =~ /-v|version|-version/ puts "Rad #{Rad::VERSION}" exit end # mode and environment mode = (%w(server console).include? ARGV.first) ? ARGV.shift : 'server' environment = (%w(production development test).include? ARGV.first) ? ARGV.shift : :development rad.mode = environment # config options ARGV.each do |expression| name, value = expression.split('=') name.sub!(/^-+/, '') if name =~ /\./ component_name, key = name.split('.').collect{|s| s.to_sym} rad.config[component_name] ||= {} rad.config[component_name][key] = value else rad.config[name.to_sym] = value end end # running Rad::Cli::Helper.send "run_#{mode}"
Version data entries
10 entries across 10 versions & 1 rubygems