activesupport 3.2.8.rc1 → 3.2.8.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
1
  ## Rails 3.2.8 ##
2
2
 
3
+ * Fix ActiveSupport integration with Mocha > 0.12.1. *Mike Gunderloy*
4
+
3
5
  * Reverted the deprecation of ActiveSupport::JSON::Variable. *Rafael Mendonça França*
4
6
 
5
7
  ## Rails 3.2.7 (Jul 26, 2012) ##
@@ -3,11 +3,10 @@ require 'active_support/core_ext/kernel/singleton_class'
3
3
 
4
4
  class ERB
5
5
  module Util
6
- HTML_ESCAPE = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;' }
6
+ HTML_ESCAPE = { '&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;', "'" => '&#x27;' }
7
7
  JSON_ESCAPE = { '&' => '\u0026', '>' => '\u003E', '<' => '\u003C' }
8
8
 
9
- # Detect whether 1.9 can transcode with XML escaping.
10
- if '"&gt;&lt;&amp;&quot;"' == ('><&"'.encode('utf-8', :xml => :attr) rescue false)
9
+ if RUBY_VERSION >= '1.9'
11
10
  # A utility method for escaping HTML tag characters.
12
11
  # This method is also aliased as <tt>h</tt>.
13
12
  #
@@ -22,7 +21,7 @@ class ERB
22
21
  if s.html_safe?
23
22
  s
24
23
  else
25
- s.encode(s.encoding, :xml => :attr)[1...-1].html_safe
24
+ s.gsub(/[&"'><]/, HTML_ESCAPE).html_safe
26
25
  end
27
26
  end
28
27
  else
@@ -31,7 +30,7 @@ class ERB
31
30
  if s.html_safe?
32
31
  s
33
32
  else
34
- s.gsub(/[&"><]/n) { |special| HTML_ESCAPE[special] }.html_safe
33
+ s.gsub(/[&"'><]/n) { |special| HTML_ESCAPE[special] }.html_safe
35
34
  end
36
35
  end
37
36
  end
@@ -104,8 +104,10 @@ module ActiveSupport
104
104
  if respond_to?(:mocha_verify) # using mocha
105
105
  if defined?(Mocha::TestCaseAdapter::AssertionCounter)
106
106
  Mocha::TestCaseAdapter::AssertionCounter.new(result)
107
- else
107
+ elsif defined?(Mocha::Integration::TestUnit::AssertionCounter)
108
108
  Mocha::Integration::TestUnit::AssertionCounter.new(result)
109
+ else
110
+ Mocha::MonkeyPatching::TestUnit::AssertionCounter.new(result)
109
111
  end
110
112
  end
111
113
  end
@@ -3,7 +3,7 @@ module ActiveSupport
3
3
  MAJOR = 3
4
4
  MINOR = 2
5
5
  TINY = 8
6
- PRE = "rc1"
6
+ PRE = "rc2"
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.8.rc1
4
+ version: 3.2.8.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-01 00:00:00.000000000 Z
12
+ date: 2012-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n