prep 3.0 beta windows gem

This commit is contained in:
Thomas Reynolds 2012-01-05 20:28:34 -08:00
parent 96924ad5a1
commit 80a5a25457
4 changed files with 45 additions and 9 deletions

View file

@ -22,6 +22,8 @@ require "middleman-core/vendor/hooks-0.2.0/lib/hooks"
module Middleman module Middleman
WINDOWS = !!(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i) unless const_defined?(:WINDOWS) WINDOWS = !!(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i) unless const_defined?(:WINDOWS)
JRUBY = !!(RbConfig::CONFIG["RUBY_INSTALL_NAME"] =~ /^jruby/i) unless const_defined?(:JRUBY) JRUBY = !!(RbConfig::CONFIG["RUBY_INSTALL_NAME"] =~ /^jruby/i) unless const_defined?(:JRUBY)
DARWIN = RbConfig::CONFIG['target_os'] =~ /darwin/i
LINUX = RbConfig::CONFIG['target_os'] =~ /linux/i
# Auto-load modules on-demand # Auto-load modules on-demand
autoload :Base, "middleman-core/base" autoload :Base, "middleman-core/base"

View file

@ -1,9 +1,8 @@
# Inspect Ruby env
require "rbconfig"
# File changes are forwarded to the currently running app via HTTP # File changes are forwarded to the currently running app via HTTP
require "net/http" require "net/http"
require "win32/process" if ::Middleman::WINDOWS
module Middleman module Middleman
class Watcher class Watcher
class << self class << self
@ -32,9 +31,9 @@ module Middleman
def initialize(options) def initialize(options)
@options = options @options = options
if RbConfig::CONFIG['target_os'] =~ /darwin/i if ::Middleman::DARWIN
$LOAD_PATH << File.expand_path('../../middleman-core/vendor/darwin/lib', __FILE__) $LOAD_PATH << File.expand_path('../../middleman-core/vendor/darwin/lib', __FILE__)
elsif RbConfig::CONFIG['target_os'] =~ /linux/i elsif ::Middleman::LINUX
$LOAD_PATH << File.expand_path('../../middleman-core/vendor/linux/lib', __FILE__) $LOAD_PATH << File.expand_path('../../middleman-core/vendor/linux/lib', __FILE__)
end end

View file

@ -0,0 +1,39 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "middleman-core/version"
Gem::Specification.new do |s|
s.name = "middleman-core"
s.version = Middleman::VERSION
s.platform = "x86-mingw32"
s.license = "MIT"
s.authors = ["Thomas Reynolds"]
s.email = ["me@tdreyno.com"]
s.homepage = "http://middlemanapp.com"
s.summary = "Hand-crafted frontend development"
s.description = "A static site generator based on Sinatra. Providing dozens of templating languages (Haml, Sass, Compass, Slim, CoffeeScript, and more). Makes minification, compression, cache busting, Yaml data (and more) an easy part of your development cycle."
s.files = `git ls-files`.split("\n") + %w(bin/fsevent_watch_guard)
s.test_files = `git ls-files -- {fixtures,features}/*`.split("\n")
s.executable = "middleman"
s.require_path = "lib"
# Core
s.add_dependency("rack", ["~> 1.3.5"])
s.add_dependency("tilt", ["~> 1.3.1"])
# Builder
s.add_dependency("rack-test", ["~> 0.6.1"])
# CLI
s.add_dependency("thor", ["~> 0.14.0"])
# Helpers
s.add_dependency("activesupport", ["~> 3.1.0"])
# Watcher
s.add_dependency("fssm", ["~> 0.2.8"])
# Fork on Windows
s.add_dependency("win32-process", ["~> 0.6.5"])
end

View file

@ -18,9 +18,6 @@ Gem::Specification.new do |s|
s.executable = "middleman" s.executable = "middleman"
s.require_path = "lib" s.require_path = "lib"
# Thin
# s.add_dependency("thin", ["~> 1.3.1"])
# Core # Core
s.add_dependency("rack", ["~> 1.3.5"]) s.add_dependency("rack", ["~> 1.3.5"])
s.add_dependency("tilt", ["~> 1.3.1"]) s.add_dependency("tilt", ["~> 1.3.1"])
@ -32,7 +29,6 @@ Gem::Specification.new do |s|
s.add_dependency("thor", ["~> 0.14.0"]) s.add_dependency("thor", ["~> 0.14.0"])
# Helpers # Helpers
# s.add_dependency("i18n", ["~> 0.6.0"])
s.add_dependency("activesupport", ["~> 3.1.0"]) s.add_dependency("activesupport", ["~> 3.1.0"])
# Watcher # Watcher