mirror of
https://github.com/github/rails.git
synced 2026-01-12 08:08:31 -05:00
Compare commits
1 Commits
github34
...
kill-build
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3d5661d79 |
@@ -5,3 +5,5 @@ gem install sqlite3 -v=1.3.7
|
||||
gem install rack -v=1.4.5
|
||||
gem install erubis -v=2.7.0
|
||||
gem install json -v=1.8.0
|
||||
|
||||
gem install vendor/builder-2.1.3.ruby21.7054942.gem
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.3.14.github34
|
||||
2.3.14.github33
|
||||
|
||||
@@ -39,9 +39,9 @@ module ActionController #:nodoc:
|
||||
if cache = read_fragment(name, options)
|
||||
buffer.safe_concat(cache.html_safe)
|
||||
else
|
||||
pos = buffer.bytesize
|
||||
pos = buffer.length
|
||||
block.call
|
||||
write_fragment(name, buffer.byteslice(pos..-1), options)
|
||||
write_fragment(name, buffer[pos..-1], options)
|
||||
end
|
||||
else
|
||||
block.call
|
||||
|
||||
@@ -17,7 +17,7 @@ module ActionView
|
||||
src << "@output_buffer.safe_append='"
|
||||
src << "\n" * @newline_pending if @newline_pending > 0
|
||||
src << escape_text(text)
|
||||
src << "'.freeze;"
|
||||
src << "';"
|
||||
|
||||
@newline_pending = 0
|
||||
end
|
||||
@@ -63,7 +63,7 @@ module ActionView
|
||||
|
||||
def flush_newline_if_pending(src)
|
||||
if @newline_pending > 0
|
||||
src << "@output_buffer.safe_append='#{"\n" * @newline_pending}'.freeze;"
|
||||
src << "@output_buffer.safe_append='#{"\n" * @newline_pending}';"
|
||||
@newline_pending = 0
|
||||
end
|
||||
end
|
||||
|
||||
@@ -622,19 +622,6 @@ class FragmentCachingTest < ActionController::TestCase
|
||||
assert_equal 'generated till now -> fragment content', buffer
|
||||
end
|
||||
|
||||
def test_fragment_for_bytesize
|
||||
buffer = "\xC4\x8D"
|
||||
buffer.force_encoding('ASCII-8BIT')
|
||||
|
||||
@controller.fragment_for(buffer, 'bytesize') do
|
||||
buffer.force_encoding('UTF-8')
|
||||
buffer << "abc"
|
||||
end
|
||||
|
||||
assert_equal Encoding::UTF_8, buffer.encoding
|
||||
assert_equal "abc", @store.read('views/bytesize')
|
||||
end
|
||||
|
||||
def test_html_safety
|
||||
assert_nil @store.read('views/name')
|
||||
content = 'value'.html_safe
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
# Prefer gems to the bundled libs.
|
||||
require 'rubygems'
|
||||
|
||||
begin
|
||||
gem 'builder', '~> 2.1.2'
|
||||
rescue Gem::LoadError
|
||||
$:.unshift "#{File.dirname(__FILE__)}/vendor/builder-2.1.2"
|
||||
end
|
||||
require 'builder'
|
||||
|
||||
begin
|
||||
|
||||
@@ -299,11 +299,7 @@ HELP
|
||||
# Evaluate any assignments in a temporary, throwaway binding.
|
||||
vars = template_options[:assigns] || {}
|
||||
b = template_options[:binding] || binding
|
||||
if b.respond_to?(:local_variable_set)
|
||||
vars.each { |k,v| b.local_variable_set(k, v) }
|
||||
else
|
||||
vars.each { |k,v| eval "#{k} = vars[:#{k}] || vars['#{k}']", b }
|
||||
end
|
||||
vars.each { |k,v| eval "#{k} = vars[:#{k}] || vars['#{k}']", b }
|
||||
|
||||
# Render the source file with the temporary binding.
|
||||
ERB.new(file.read, nil, '-').result(b)
|
||||
|
||||
@@ -4,4 +4,4 @@ set -x
|
||||
set -e
|
||||
|
||||
script/cibuild-on 1.9.3-p231-tcs-github
|
||||
script/cibuild-on 2.1.0-github
|
||||
script/cibuild-on 2.0.0-github
|
||||
|
||||
BIN
vendor/builder-2.1.3.ruby21.7054942.gem
vendored
Normal file
BIN
vendor/builder-2.1.3.ruby21.7054942.gem
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user