module Nutcase::BIN
Attributes
args[RW]
config_file[RW]
Public Instance Methods
envs()
click to toggle source
# File lib/nutcase/bin.rb, line 38 def envs @envs ||= {} end
run()
click to toggle source
# File lib/nutcase/bin.rb, line 10 def run self.args = [] self.config_file ||= './config/nutcase.rb' if argv.count > 0 args.concat(argv) elsif File.file? config_file instance_eval(File.read(config_file), config_file) end options = { cmd: args.join(' '), signal: 'TERM', background: true, growl: false, name: 'Nutcase', ignore: [], dir: ['.'], pattern: '{Gemfile,Gemfile.lock,.gems,.bundle,.env*,config.ru,Rakefile,**/*.{rb,js,coffee,css,scss,sass,styl,erb,html,haml,ru,yml,slim,md,mab,rake}}' } Rerun::Runner.keep_running(options[:cmd], options) end
server(opts)
click to toggle source
# File lib/nutcase/bin.rb, line 34 def server(opts) args.concat(opts) end
Private Instance Methods
argv()
click to toggle source
# File lib/nutcase/bin.rb, line 44 def argv @argv ||= begin ARGV end end