Merge remote-tracking branch 'origin/3.0-stable'

Conflicts:
	.travis.yml
	Gemfile
	middleman-core/lib/middleman-core/version.rb
	middleman-core/middleman-core-x86-mingw32.gemspec
	middleman-core/middleman-core.gemspec
i18n_v4
Ben Hollis 2013-03-02 22:32:03 -08:00
commit 4745418200
14 changed files with 85 additions and 69 deletions

View File

@ -17,3 +17,4 @@ matrix:
allow_failures:
- rvm: jruby-18mode
- rvm: jruby-19mode

View File

@ -1,6 +1,27 @@
Master
3.0.12
===
* Update to listen 0.7.x. No longer depend on rb-inotify. *nix users should add to Gemfile.
* Support Haml 4
* :debug_assets can no longer be turned on in the build environment.
* Helpers now work with JS/CSS files with .erb processing.
* Provide an informative exception when link_to is used improperly.
* Force .svgz files to be treated as binary.
* Add a url_for method that performs the link_to magic URL generation without a link. Make form_for use url_for. #739
* Fix issues when combining relative assets and cache buster.
* Support the .yaml extension for data files.
* Handle non-english default languages in i18n. Fixes #584. #771
* Allow frontmatter to be parsed on templates outside the project root
* Improve detection of binary files. #763
* Add before_render and after_render hooks that can be used by extensions to modify templates before they're rendered or modify the rendered output before it's returned. #761 & #774
* Tightened up dependencies
* Print the command for running middleman in verbose mode with quotes so Bundler doesn't swallow the verbose flag. #750
3.0.11
====
* Mitigate major perf regression caused by the Middleman::Util#binary? method
3.0.10
====

16
Gemfile
View File

@ -1,4 +1,7 @@
source 'https://rubygems.org'
source 'http://rubygems.org'
# Make sure to use Haml 4 for tests
gem "haml", "~> 4.0.0"
# Build and doc tools
gem "rake", "~> 10.0.3"
@ -12,15 +15,14 @@ gem "rspec", "~> 2.12"
# Optional middleman dependencies, included for tests
gem "sinatra"
gem "slim", "~> 1.2.0"
gem "coffee-filter", "~> 0.1.1"
gem "liquid", "~> 2.2"
gem "less", "~> 2.2"
gem "stylus", "~> 0.6.2"
gem "slim", :require => false
gem "liquid", "~> 2.2", :require => false
gem "less", "~> 2.2", :require => false
gem "stylus", :require => false
platforms :ruby do
gem "therubyracer", "0.10.2"
gem "redcarpet", "~> 2.1.1"
gem "redcarpet"
end
platforms :jruby do

View File

@ -11,25 +11,29 @@ module Middleman
class << self
# Once registered
def registered(app)
app.before_configuration do
template_extensions :coffee => :js
end
# Tell Tilt to use it as well (for inline scss blocks)
::Tilt.register 'coffee', DebuggingCoffeeScriptTemplate
::Tilt.prefer(DebuggingCoffeeScriptTemplate)
app.before_configuration do
template_extensions :coffee => :js
DebuggingCoffeeScriptTemplate.middleman_app = self
end
end
alias :included :registered
end
# A Template for Tilt which outputs debug messages
class DebuggingCoffeeScriptTemplate < ::Tilt::CoffeeScriptTemplate
# Make the current Middleman app accessible to the template
cattr_accessor :middleman_app
# Add exception messaging
# @param [Class] context
# @param [Hash] locals
# @return [String]
def evaluate(context, locals, &block)
return super if context.build?
return super if middleman_app.build?
begin
super

View File

@ -1,4 +1,6 @@
source :rubygems
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'
# Specify your gem's dependencies in <%= name %>.gemspec
gemspec

View File

@ -1,3 +1,5 @@
source :rubygems
# If you have OpenSSL installed, we recommend updating
# the following line to use "https"
source 'http://rubygems.org'
gem "middleman", "~><%= Middleman::VERSION %>"

View File

@ -32,5 +32,7 @@ Gem::Specification.new do |s|
s.add_dependency("activesupport", ["~> 3.2.6"])
# Watcher
s.add_dependency("listen", ["~> 0.5.2"])
s.add_dependency("listen", ["~> 0.7.3"])
s.add_dependency("rb-fsevent", ["~> 0.9.3"]) # OS X
# s.add_dependency("rb-inotify", ["~> 0.9.0"]) # Linux
end

View File

@ -53,13 +53,11 @@ Feature: Minify CSS
When I go to "/inline-css.html"
Then I should see:
"""
<style type='text/css'>
/*<![CDATA[*/
body {
test: style;
good: deal;
}
/*]]>*/
<style>
body {
test: style;
good: deal;
}
</style>
"""
@ -83,7 +81,7 @@ Feature: Minify CSS
When I go to "/inline-css.html"
Then I should see:
"""
<style type='text/css'>
<style>
body {
test: style;
good: deal; }
@ -108,7 +106,7 @@ Feature: Minify CSS
When I go to "/inline-css.html"
Then I should see:
"""
<style type='text/css'>
<style>
Hello
</style>
"""
@ -123,9 +121,7 @@ Feature: Minify CSS
When I go to "/inline-css.html"
Then I should see:
"""
<style type='text/css'>
/*<![CDATA[*/
body{test:style;good:deal}
/*]]>*/
<style>
body{test:style;good:deal}
</style>
"""

View File

@ -10,15 +10,13 @@ Feature: Minify Javascript
When I go to "/inline-js.html"
Then I should see:
"""
<script type='text/javascript'>
//<![CDATA[
;(function() {
this;
should();
all.be();
on = { one: line };
})();
//]]>
<script>
;(function() {
this;
should();
all.be();
on = { one: line };
})();
</script>
<script>
;(function() {
@ -61,15 +59,13 @@ Feature: Minify Javascript
When I go to "/inline-js.html"
Then I should see:
"""
<script type='text/javascript'>
//<![CDATA[
;(function() {
this;
should();
all.be();
on = { one: line };
})();
//]]>
<script>
;(function() {
this;
should();
all.be();
on = { one: line };
})();
</script>
<script>
;(function() {
@ -110,10 +106,8 @@ Feature: Minify Javascript
When I go to "/inline-js.html"
Then I should see:
"""
<script type='text/javascript'>
//<![CDATA[
Hello
//]]>
<script>
Hello
</script>
<script>
Hello
@ -138,10 +132,8 @@ Feature: Minify Javascript
When I go to "/inline-js.html"
Then I should see:
"""
<script type='text/javascript'>
//<![CDATA[
(function(){this,should(),all.be(),on={one:line}})();
//]]>
<script>
(function(){this,should(),all.be(),on={one:line}})();
</script>
<script>
(function(){this,should(),too()})();
@ -177,12 +169,11 @@ Feature: Minify Javascript
Given a fixture app "minify-js-app"
And a file named "config.rb" with:
"""
require "coffee-filter"
activate :minify_javascript, :inline => true
"""
And the Server is running at "minify-js-app"
When I go to "/inline-coffeescript.html"
Then I should see "6" lines
Then I should see "3" lines
Scenario: Rendering external js (coffeescript) with the feature enabled
Given a fixture app "minify-js-app"
@ -198,8 +189,6 @@ Feature: Minify Javascript
Given a fixture app "passthrough-app"
And a file named "config.rb" with:
"""
require "coffee-filter"
module ::PassThrough
def self.compress(data)
data
@ -214,7 +203,7 @@ Feature: Minify Javascript
"""
And the Server is running at "passthrough-app"
When I go to "/inline-coffeescript.html"
Then I should see "16" lines
Then I should see "13" lines
Scenario: Rendering external js (coffeescript) with a passthrough minifier
Given a fixture app "passthrough-app"

View File

@ -1 +0,0 @@
require "coffee-filter"

View File

@ -1 +0,0 @@
require "coffee-filter"

View File

@ -1,5 +1,4 @@
%style(type="text/css")
:sass
body
test: style
good: deal
:sass
body
test: style
good: deal

View File

@ -25,6 +25,6 @@ Gem::Specification.new do |s|
s.add_dependency("coffee-script-source", ["~> 1.3.3"])
s.add_dependency("execjs", ["~> 1.4.0"])
s.add_dependency("maruku", ["~> 0.6.0"])
s.add_dependency("i18n", ["~> 0.6.0"])
s.add_dependency("i18n", ["~> 0.6.0", "< 0.6.2"]) # 0.6.2 broke Ruby 1.8 support
s.add_dependency("padrino-helpers", ["0.10.7"])
end

View File

@ -19,6 +19,6 @@ Gem::Specification.new do |s|
s.add_dependency("middleman-core", Middleman::VERSION)
s.add_dependency("middleman-more", Middleman::VERSION)
s.add_dependency("middleman-sprockets", "~> 3.0.6")
s.add_dependency("middleman-sprockets", "~> 3.0.8")
end