activesupport 3.1.10 → 3.1.11
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activesupport might be problematic. Click here for more details.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 4dac25906a10b75cc62cf82236d25296a7bc7a79
|
4
|
+
data.tar.gz: 56baa5ef571d3ed1dc4934f52387ff2cde014773
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b216c1240faf48fbd806ac2325bb8106b186a767b755af0c7131eba0405c83edd235bdcd182d8377a1604c36d05629b6b29a0bf05efd92880879f58a3d3ad088
|
7
|
+
data.tar.gz: 907b90ccaaca327444620b0e07b6b8beae4e33852ac40095795a31cf83d3811ca2a4769e868cd0489fbd2902b6992052958e2cbf789d805f5db0bedb664fc264
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## Rails 3.1.11 (unreleased) ##
|
2
|
+
|
3
|
+
* Allow `multi_json` version `>= 1.3`, relaxing back to semantic versioning 2.0.0 (revert of #5861)
|
4
|
+
Backport of #5896
|
5
|
+
|
6
|
+
*Alex Riedler*
|
7
|
+
|
1
8
|
## Rails 3.1.10 (Jan 8, 2012) ##
|
2
9
|
|
3
10
|
* Hash.from_xml raises when it encounters type="symbol" or type="yaml".
|
@@ -7,17 +14,19 @@
|
|
7
14
|
|
8
15
|
*Jeremy Kemper*
|
9
16
|
|
10
|
-
## Rails 3.1.9
|
17
|
+
## Rails 3.1.9 (Jan 2, 2013) ##
|
18
|
+
|
19
|
+
* No changes.
|
11
20
|
|
12
|
-
## Rails 3.1.8 (Aug 9, 2012)
|
21
|
+
## Rails 3.1.8 (Aug 9, 2012) ##
|
13
22
|
|
14
23
|
* ERB::Util.html_escape now escapes single quotes. *Santiago Pastorino*
|
15
24
|
|
16
|
-
## Rails 3.1.7 (Jul 26, 2012)
|
25
|
+
## Rails 3.1.7 (Jul 26, 2012) ##
|
17
26
|
|
18
27
|
* No changes.
|
19
28
|
|
20
|
-
## Rails 3.1.6 (Jun 12, 2012)
|
29
|
+
## Rails 3.1.6 (Jun 12, 2012) ##
|
21
30
|
|
22
31
|
* No changes.
|
23
32
|
|
@@ -9,7 +9,13 @@ module ActiveSupport
|
|
9
9
|
module JSON
|
10
10
|
class << self
|
11
11
|
def decode(json, options ={})
|
12
|
-
|
12
|
+
# Can't reliably detect whether MultiJson responds to load, since it's
|
13
|
+
# a reserved word. Use adapter as a proxy for new features.
|
14
|
+
data = if MultiJson.respond_to?(:adapter)
|
15
|
+
MultiJson.load(json, options)
|
16
|
+
else
|
17
|
+
MultiJson.decode(json, options)
|
18
|
+
end
|
13
19
|
if ActiveSupport.parse_json_times
|
14
20
|
convert_dates_from(data)
|
15
21
|
else
|
@@ -18,12 +24,20 @@ module ActiveSupport
|
|
18
24
|
end
|
19
25
|
|
20
26
|
def engine
|
21
|
-
MultiJson.
|
27
|
+
if MultiJson.respond_to?(:adapter)
|
28
|
+
MultiJson.adapter
|
29
|
+
else
|
30
|
+
MultiJson.engine
|
31
|
+
end
|
22
32
|
end
|
23
33
|
alias :backend :engine
|
24
34
|
|
25
35
|
def engine=(name)
|
26
|
-
MultiJson.
|
36
|
+
if MultiJson.respond_to?(:use)
|
37
|
+
MultiJson.use name
|
38
|
+
else
|
39
|
+
MultiJson.engine = name
|
40
|
+
end
|
27
41
|
end
|
28
42
|
alias :backend= :engine=
|
29
43
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
|
-
silence_warnings { require 'mocha' }
|
2
|
+
silence_warnings { require 'mocha/setup' }
|
3
3
|
rescue LoadError
|
4
4
|
# Fake Mocha::ExpectationError so we can rescue it in #run. Bleh.
|
5
5
|
Object.const_set :Mocha, Module.new
|
6
6
|
Mocha.const_set :ExpectationError, Class.new(StandardError)
|
7
|
-
end
|
7
|
+
end
|
@@ -61,7 +61,7 @@ module ActiveSupport
|
|
61
61
|
def run(result)
|
62
62
|
return if @method_name.to_s == "default_test"
|
63
63
|
|
64
|
-
mocha_counter = retrieve_mocha_counter(result)
|
64
|
+
mocha_counter = retrieve_mocha_counter(self, result)
|
65
65
|
yield(Test::Unit::TestCase::STARTED, name)
|
66
66
|
@_result = result
|
67
67
|
|
@@ -83,6 +83,8 @@ module ActiveSupport
|
|
83
83
|
begin
|
84
84
|
teardown
|
85
85
|
run_callbacks :teardown
|
86
|
+
rescue Mocha::ExpectationError => e
|
87
|
+
add_failure(e.message, e.backtrace)
|
86
88
|
rescue Test::Unit::AssertionFailedError => e
|
87
89
|
add_failure(e.message, e.backtrace)
|
88
90
|
rescue Exception => e
|
@@ -100,17 +102,18 @@ module ActiveSupport
|
|
100
102
|
|
101
103
|
protected
|
102
104
|
|
103
|
-
def retrieve_mocha_counter(result) #:nodoc:
|
105
|
+
def retrieve_mocha_counter(test_case, result) #:nodoc:
|
104
106
|
if respond_to?(:mocha_verify) # using mocha
|
105
107
|
if defined?(Mocha::TestCaseAdapter::AssertionCounter)
|
106
108
|
Mocha::TestCaseAdapter::AssertionCounter.new(result)
|
107
|
-
|
109
|
+
elsif defined?(Mocha::Integration::TestUnit::AssertionCounter)
|
108
110
|
Mocha::Integration::TestUnit::AssertionCounter.new(result)
|
111
|
+
else
|
112
|
+
Mocha::Integration::AssertionCounter.new(test_case)
|
109
113
|
end
|
110
114
|
end
|
111
115
|
end
|
112
116
|
end
|
113
|
-
|
114
117
|
end
|
115
118
|
end
|
116
119
|
end
|
metadata
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activesupport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '1.3'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '1.0'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '1.3'
|
33
27
|
description: A toolkit of support libraries and Ruby core extensions extracted from
|
34
28
|
the Rails framework. Rich support for multibyte strings, internationalization, time
|
35
29
|
zones, and testing.
|
@@ -273,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
267
|
version: '0'
|
274
268
|
requirements: []
|
275
269
|
rubyforge_project:
|
276
|
-
rubygems_version: 2.0.0.
|
270
|
+
rubygems_version: 2.0.0.rc.2
|
277
271
|
signing_key:
|
278
272
|
specification_version: 4
|
279
273
|
summary: A toolkit of support libraries and Ruby core extensions extracted from the
|