Module: Nutcase::BIN
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#config_file ⇒ Object
Returns the value of attribute config_file.
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
8 9 10 |
# File 'lib/nutcase/bin.rb', line 8 def args @args end |
#config_file ⇒ Object
Returns the value of attribute config_file.
8 9 10 |
# File 'lib/nutcase/bin.rb', line 8 def config_file @config_file end |
Instance Method Details
#envs ⇒ Object
38 39 40 |
# File 'lib/nutcase/bin.rb', line 38 def envs @envs ||= {} end |
#server ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/nutcase/bin.rb', line 10 def server args = [] unless argv.count == 0 args.concat(argv) else config_file ||= './config/nutcase.rb' if File.file? config_file # TODO: make the config file format nicer instance_eval(File.read(config_file), config_file) end end = { 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([:cmd], ) end |