bump padrino to 0.11.x

This commit is contained in:
Thomas Reynolds 2013-04-22 22:07:35 -07:00
parent c5e2ad6750
commit 8a54645de5
6 changed files with 14 additions and 5 deletions

View file

@ -4,6 +4,7 @@ master
* Include middleman-livereload in default Gemfile * Include middleman-livereload in default Gemfile
* Update Rack dependency to 1.5.x * Update Rack dependency to 1.5.x
* Update to Listen 1.0.x * Update to Listen 1.0.x
* Update to padrino-helpers 0.11.x
3.1.0.beta.1 3.1.0.beta.1
=== ===

View file

@ -25,6 +25,8 @@ module Middleman
::Tilt.mappings.delete('html') # WTF, Tilt? ::Tilt.mappings.delete('html') # WTF, Tilt?
::Tilt.mappings.delete('csv') ::Tilt.mappings.delete('csv')
require 'active_support/core_ext/string/output_safety'
# Activate custom renderers # Activate custom renderers
require "middleman-core/renderers/erb" require "middleman-core/renderers/erb"
app.register Middleman::Renderers::ERb app.register Middleman::Renderers::ERb
@ -274,7 +276,9 @@ module Middleman
content = callback.call(content, path, locs, template_class) content = callback.call(content, path, locs, template_class)
end end
return content output = ::ActiveSupport::SafeBuffer.new
output.safe_concat content
output
ensure ensure
# Reset stored buffer # Reset stored buffer
@_out_buf = _buf_was @_out_buf = _buf_was
@ -408,7 +412,7 @@ module Middleman
@_out_buf = _buf_was @_out_buf = _buf_was
end end
concat_content render_individual_file(layout_path, @current_locs || {}, @current_opts || {}, self) { content } concat_safe_content render_individual_file(layout_path, @current_locs || {}, @current_opts || {}, self) { content }
ensure ensure
@current_engine = engine_was @current_engine = engine_was
end end

View file

@ -19,7 +19,9 @@ module Middleman
# Setup Slim options to work with partials # Setup Slim options to work with partials
::Slim::Engine.set_default_options( ::Slim::Engine.set_default_options(
:buffer => '@_out_buf', :buffer => '@_out_buf',
:generator => ::Temple::Generators::StringBuffer :use_html_safe => true,
:generator => ::Temple::Generators::RailsOutputBuffer,
:disable_escape => true
) )
app.after_configuration do app.after_configuration do

View file

@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_dependency("rack-test", ["~> 0.6.1"]) s.add_dependency("rack-test", ["~> 0.6.1"])
# CLI # CLI
s.add_dependency("thor", ["~> 0.15.4"]) s.add_dependency("thor", ["~> 0.17.0"])
# Helpers # Helpers
s.add_dependency("activesupport", ["~> 3.2.6"]) s.add_dependency("activesupport", ["~> 3.2.6"])

View file

@ -13,6 +13,8 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
app.helpers ::Padrino::Helpers::FormatHelpers app.helpers ::Padrino::Helpers::FormatHelpers
app.helpers ::Padrino::Helpers::RenderHelpers app.helpers ::Padrino::Helpers::RenderHelpers
app.helpers ::Padrino::Helpers::NumberHelpers app.helpers ::Padrino::Helpers::NumberHelpers
# app.helpers ::Padrino::Helpers::TranslationHelpers
app.helpers ::Padrino::Helpers::Breadcrumbs
app.config.define_setting :relative_links, false, 'Whether to generate relative links instead of absolute ones' app.config.define_setting :relative_links, false, 'Whether to generate relative links instead of absolute ones'
end end

View file

@ -25,5 +25,5 @@ Gem::Specification.new do |s|
s.add_dependency("execjs", ["~> 1.4.0"]) s.add_dependency("execjs", ["~> 1.4.0"])
s.add_dependency("kramdown", ["~> 1.0.0"]) s.add_dependency("kramdown", ["~> 1.0.0"])
s.add_dependency("i18n", ["~> 0.6.4"]) s.add_dependency("i18n", ["~> 0.6.4"])
s.add_dependency("padrino-helpers", ["0.10.7"]) s.add_dependency("padrino-helpers", ["0.11.1"])
end end