Module: Cuba::Bin
Defined Under Namespace
Classes: Daemon
Constant Summary collapse
- VERSION =
'0.3.0'
Instance Method Summary collapse
Instance Method Details
#argv ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/cuba/bin.rb', line 33 def argv @args ||= begin ARGV.shift ARGV end @args.each_with_index do |arg, i| if arg[/\s/] @args[i] = "\"#{arg}\"" else @args[i] = arg end end @args end |
#deploy ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cuba/bin.rb', line 15 def deploy if ENV['CUBA_BIN_DEPLOY_PATH'] require ENV['CUBA_BIN_DEPLOY_PATH'] else %w(config/deploy deploy).each do |file| path = Dir.pwd + "/#{file}.rb" if File.file? path break require path end end end if defined? Deploy Deploy.new.run end end |