lib/eye/dsl/opts.rb in reel-eye-0.5 vs lib/eye/dsl/opts.rb in reel-eye-0.5.1

- old
+ new

@@ -1,8 +1,8 @@ class Eye::Dsl::Opts < Eye::Dsl::PureOpts - STR_OPTIONS = [ :pid_file, :working_dir, :stdout, :stderr, :stdall, :start_command, + STR_OPTIONS = [ :pid_file, :working_dir, :stdout, :stderr, :stdall, :stdin, :start_command, :stop_command, :restart_command, :uid, :gid ] create_options_methods(STR_OPTIONS, String) BOOL_OPTIONS = [ :daemonize, :keep_alive, :auto_start, :stop_on_delete, :clear_pid ] create_options_methods(BOOL_OPTIONS, [TrueClass, FalseClass]) @@ -105,10 +105,14 @@ def set_gid(value) raise Eye::Dsl::Error, ':gid not supported (use ruby >= 2.0)' unless Eye::Local.supported_setsid? super end + def daemonize! + set_daemonize true + end + def scoped(&block) h = self.class.new(self.name, self) h.instance_eval(&block) groups = h.config.delete :groups @@ -137,10 +141,10 @@ # string def with_server(glob = nil, &block) on_server = true if glob.present? - host = Eye::System.host + host = Eye::Local.host if glob.is_a?(Array) on_server = !!glob.any?{|elem| elem == host} elsif glob.is_a?(Regexp) on_server = !!host.match(glob)