watch app/assets as well

This commit is contained in:
Thomas Reynolds 2011-10-27 23:36:19 -07:00
commit 08593fddff
19 changed files with 76 additions and 15 deletions

View file

@ -2,4 +2,6 @@ rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- rbx-2.0
- jruby
script: "bundle exec rake test"

View file

@ -2,6 +2,10 @@
====
Finally support Compass in Sprockets! Thanks to @xdite and @petebrowne
2.0.13.2
====
Update Windows eventmachine dep
2.0.13.1
====
build --clean shouldn't remove dotfiles

View file

@ -7,9 +7,14 @@ Feature: Sprockets
Scenario: Sprockets JS require with custom :js_dir
Given the Server is running at "sprockets-app"
When I go to "/library/javascripts/sprockets_base.js"
When I go to "/library/js/sprockets_base.js"
Then I should see "sprockets_sub_function"
Scenario: Plain JS require with custom :js_dir
Given the Server is running at "sprockets-app"
When I go to "/library/css/plain.css"
Then I should see "helloWorld"
Scenario: Sprockets JS should have access to yaml data
Given the Server is running at "test-app"
When I go to "/javascripts/multiple_engines.js"
@ -32,10 +37,15 @@ Feature: Sprockets
Scenario: Sprockets CSS require with custom :css_dir //require
Given the Server is running at "sprockets-app"
When I go to "/library/stylesheets/sprockets_base1.css"
When I go to "/library/css/sprockets_base1.css"
Then I should see "hello"
Scenario: Plain CSS require with custom :css_dir
Given the Server is running at "sprockets-app"
When I go to "/library/css/plain.css"
Then I should see "helloWorld"
Scenario: Sprockets CSS require with custom :css_dir @import
Given the Server is running at "sprockets-app"
When I go to "/library/stylesheets/sprockets_base2.css"
When I go to "/library/css/sprockets_base2.css"
Then I should see "hello"

View file

@ -1,10 +1,10 @@
Feature: Sprockets Gems
Scenario: Sprockets can pull jQuery from gem
Given the Server is running at "sprockets-app"
When I go to "/library/javascripts/jquery_include.js"
When I go to "/library/js/jquery_include.js"
Then I should see "var jQuery ="
Scenario: Sprockets can pull CSS from gem
Given the Server is running at "sprockets-app"
When I go to "/library/stylesheets/bootstrap_include.css"
Then I should see "Bootstrap"
# Scenario: Sprockets can pull CSS from gem
# Given the Server is running at "sprockets-app"
# When I go to "/library/css/bootstrap_include.css"
# Then I should see "Bootstrap"

View file

@ -1,2 +1,2 @@
set :js_dir, "library/javascripts"
set :css_dir, "library/stylesheets"
set :js_dir, "library/js"
set :css_dir, "library/css"

View file

@ -0,0 +1,3 @@
#helloWorld {
color: red;
}

View file

@ -0,0 +1,3 @@
function hellowWorld() {
}

View file

@ -48,7 +48,7 @@
#
# [Visit the website]: http://middlemanapp.com
# [Read the wiki]: https://github.com/tdreyno/middleman/wiki
# [Email the users group]: http://groups.google.com/group/middleman-users
# [Email the users group]: https://convore.com/middleman/
# [Submit bug reports]: https://github.com/tdreyno/middleman/issues
# Setup our load paths
@ -73,6 +73,7 @@ module Middleman
autoload :Sass, "middleman/renderers/sass"
autoload :Slim, "middleman/renderers/slim"
autoload :Markdown, "middleman/renderers/markdown"
autoload :ERb, "middleman/renderers/erb"
autoload :CoffeeScript, "middleman/renderers/coffee_script"
autoload :Liquid, "middleman/renderers/liquid"
end
@ -199,4 +200,4 @@ module Middleman
end
require "middleman/version"
Middleman.load_extensions_in_path
Middleman.load_extensions_in_path

View file

@ -101,6 +101,9 @@ module Middleman::CoreExtensions::FrontMatter
class ERBTemplate < ::Tilt::ERBTemplate
include Middleman::CoreExtensions::FrontMatter::YamlAware
end
class ErubisTemplate < ::Tilt::ErubisTemplate
include Middleman::CoreExtensions::FrontMatter::YamlAware
end
class LiquidTemplate < ::Tilt::LiquidTemplate
include Middleman::CoreExtensions::FrontMatter::YamlAware

View file

@ -11,6 +11,7 @@ module Middleman::CoreExtensions::Rendering
app.register Middleman::Renderers::Haml
app.register Middleman::Renderers::Sass
app.register Middleman::Renderers::Markdown
app.register Middleman::Renderers::ERb
app.register Middleman::Renderers::CoffeeScript
app.register Middleman::Renderers::Liquid
end

View file

@ -0,0 +1,34 @@
require "tilt"
module Middleman::Renderers::ERb
class << self
def registered(app)
app.extend ClassMethods
app.set :erb_engine, :erb
if !app.respond_to? :erb_engine_prefix
app.set :erb_engine_prefix, ::Tilt
end
app.after_configuration do
engine = app.settings.erb_engine
if engine.is_a? Symbol
engine = app.tilt_template_from_symbol(engine)
end
::Tilt.prefer(engine)
end
end
alias :included :registered
end
module ClassMethods
def tilt_template_from_symbol(engine)
engine = engine.to_s
engine = engine == "erb" ? "ERB" : engine.camelize
settings.erb_engine_prefix.const_get("#{engine}Template")
end
end
end

View file

@ -55,11 +55,11 @@ eos
s.add_dependency("padrino-core", ["~> 0.10.5"])
s.add_dependency("padrino-helpers", ["~> 0.10.5"])
s.add_dependency("eventmachine", ["1.0.0.beta.3"])
s.add_dependency("eventmachine", ["1.0.0.beta.4.1"])
s.add_dependency("win32-process", ["~> 0.6.5"])
s.add_dependency("rb-fchange")
s.add_dependency("guard", ["~> 0.6.2"])
s.add_dependency("guard", ["~> 0.8.8"])
s.add_dependency("middleman-livereload", ["~> 0.2.0"])
# Development and test

View file

@ -57,7 +57,7 @@ eos
s.add_dependency("padrino-core", ["~> 0.10.5"])
s.add_dependency("padrino-helpers", ["~> 0.10.5"])
s.add_dependency("guard", ["~> 0.6.2"])
s.add_dependency("guard", ["~> 0.8.8"])
s.add_dependency("middleman-livereload", ["~> 0.2.0"])
# Development and test