try win32-process gem

This commit is contained in:
Thomas Reynolds 2011-08-09 14:46:50 -07:00
parent 9e3830cf7b
commit 0fb9900ddb
3 changed files with 17 additions and 17 deletions

View file

@ -1,5 +1,4 @@
require 'thor'
require 'rbconfig'
module Middleman
class CLI < Thor
@ -39,19 +38,14 @@ module Middleman
def server
v1_check
if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
::Middleman.start_server(options)
puts "== The Middleman is standing watch on port #{options[:port]}"
else
if options["livereload"]
livereload_options = {:port => options["livereload-port"]}
end
Middleman::Guard.start({
:port => options[:port],
:environment => options[:environment]
}, livereload_options)
if options["livereload"]
livereload_options = {:port => options["livereload-port"]}
end
Middleman::Guard.start({
:port => options[:port],
:environment => options[:environment]
}, livereload_options)
end
desc "build", "Builds the static site for deployment"

View file

@ -1,8 +1,12 @@
require "guard"
require "guard/guard"
require "guard/livereload"
require "webrick"
require "rbconfig"
if Config::CONFIG['host_os'].downcase =~ %r{mswin|mingw}
require "win32/process"
end
module Middleman::Guard
def self.start(options={}, livereload={})
options_hash = ""

View file

@ -56,11 +56,13 @@ eos
case Config::CONFIG['host_os'].downcase
when %r{mswin|mingw}
else
s.add_runtime_dependency("guard", ["~> 0.5.1"])
s.add_runtime_dependency("guard-livereload", ["~> 0.3.0"])
# s.add_runtime_dependency "windows-api", "= 0.4.0"
# s.add_runtime_dependency "windows-pr", "= 1.1.2"
s.add_runtime_dependency("win32-process", ["~> 0.6.5"])
end
s.add_runtime_dependency("guard", ["~> 0.5.1"])
s.add_runtime_dependency("guard-livereload", ["~> 0.3.0"])
s.add_development_dependency("coffee-filter", ["~> 0.1.1"])
s.add_development_dependency("cucumber", ["~> 1.0.2"])
s.add_development_dependency("rake", ["0.8.7"])