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 'thor'
require 'rbconfig'
module Middleman module Middleman
class CLI < Thor class CLI < Thor
@ -39,10 +38,6 @@ module Middleman
def server def server
v1_check 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"] if options["livereload"]
livereload_options = {:port => options["livereload-port"]} livereload_options = {:port => options["livereload-port"]}
end end
@ -52,7 +47,6 @@ module Middleman
:environment => options[:environment] :environment => options[:environment]
}, livereload_options) }, livereload_options)
end end
end
desc "build", "Builds the static site for deployment" desc "build", "Builds the static site for deployment"
method_option "relative", :type => :boolean, :aliases => "-r", :default => false, :desc => 'Override the config.rb file and force relative urls' method_option "relative", :type => :boolean, :aliases => "-r", :default => false, :desc => 'Override the config.rb file and force relative urls'

View file

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

View file

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