activesupport 2.3.3 → 2.3.4
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.
- data/CHANGELOG +7 -1
- data/lib/active_support/all.rb +8 -0
- data/lib/active_support/core_ext/array/conversions.rb +1 -0
- data/lib/active_support/core_ext/date/calculations.rb +1 -0
- data/lib/active_support/core_ext/enumerable.rb +2 -4
- data/lib/active_support/core_ext/hash/conversions.rb +1 -0
- data/lib/active_support/core_ext/module/delegation.rb +9 -4
- data/lib/active_support/core_ext/string.rb +1 -0
- data/lib/active_support/core_ext/string/bytesize.rb +5 -0
- data/lib/active_support/core_ext/time/calculations.rb +7 -7
- data/lib/active_support/deprecation.rb +9 -9
- data/lib/active_support/json/backends/yaml.rb +5 -2
- data/lib/active_support/memoizable.rb +1 -1
- data/lib/active_support/message_verifier.rb +16 -3
- data/lib/active_support/multibyte.rb +30 -6
- data/lib/active_support/multibyte/chars.rb +23 -17
- data/lib/active_support/multibyte/utils.rb +61 -0
- data/lib/active_support/test_case.rb +2 -1
- data/lib/active_support/version.rb +1 -1
- metadata +9 -61
data/CHANGELOG
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
*2.3.
|
1
|
+
*2.3.4 (September 4, 2009)*
|
2
|
+
|
3
|
+
* Introduce ActiveSupport::Multibyte.clean to clean invalid multibyte strings.
|
4
|
+
|
5
|
+
* Bug fixes
|
6
|
+
|
7
|
+
*2.3.3 (July 12, 2009)*
|
2
8
|
|
3
9
|
* JSON: +Object#to_json+ calls +as_json+ to coerce itself into something natively encodable like +Hash+, +Integer+, or +String+. Override +as_json+ instead of +to_json+ so you're JSON-library-agnostic. [Jeremy Kemper]
|
4
10
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# For forward compatibility with Rails 3.
|
2
|
+
#
|
3
|
+
# require 'active_support' loads a very bare minumum in Rails 3.
|
4
|
+
# require 'active_support/all' loads the whole suite like Rails 2 did.
|
5
|
+
#
|
6
|
+
# To prepare for Rails 3, switch to require 'active_support/all' now.
|
7
|
+
|
8
|
+
require 'active_support'
|
@@ -163,6 +163,7 @@ module ActiveSupport #:nodoc:
|
|
163
163
|
raise "Not all elements respond to to_xml" unless all? { |e| e.respond_to? :to_xml }
|
164
164
|
require 'builder' unless defined?(Builder)
|
165
165
|
|
166
|
+
options = options.dup
|
166
167
|
options[:root] ||= all? { |e| e.is_a?(first.class) && first.class.to_s != "Hash" } ? first.class.to_s.underscore.pluralize : "records"
|
167
168
|
options[:children] ||= options[:root].singularize
|
168
169
|
options[:indent] ||= 2
|
@@ -92,6 +92,7 @@ module ActiveSupport #:nodoc:
|
|
92
92
|
# Provides precise Date calculations for years, months, and days. The +options+ parameter takes a hash with
|
93
93
|
# any of these keys: <tt>:years</tt>, <tt>:months</tt>, <tt>:weeks</tt>, <tt>:days</tt>.
|
94
94
|
def advance(options)
|
95
|
+
options = options.dup
|
95
96
|
d = self
|
96
97
|
d = d >> options.delete(:years) * 12 if options[:years]
|
97
98
|
d = d >> options.delete(:months) if options[:months]
|
@@ -55,12 +55,10 @@ module Enumerable
|
|
55
55
|
# [].sum(Payment.new(0)) { |i| i.amount } # => Payment.new(0)
|
56
56
|
#
|
57
57
|
def sum(identity = 0, &block)
|
58
|
-
return identity unless size > 0
|
59
|
-
|
60
58
|
if block_given?
|
61
|
-
map(&block).sum
|
59
|
+
map(&block).sum(identity)
|
62
60
|
else
|
63
|
-
inject { |sum, element| sum + element }
|
61
|
+
inject { |sum, element| sum + element } || identity
|
64
62
|
end
|
65
63
|
end
|
66
64
|
|
@@ -99,6 +99,7 @@ module ActiveSupport #:nodoc:
|
|
99
99
|
def to_xml(options = {})
|
100
100
|
require 'builder' unless defined?(Builder)
|
101
101
|
|
102
|
+
options = options.dup
|
102
103
|
options[:indent] ||= 2
|
103
104
|
options.reverse_merge!({ :builder => Builder::XmlMarkup.new(:indent => options[:indent]),
|
104
105
|
:root => "hash" })
|
@@ -120,10 +120,15 @@ class Module
|
|
120
120
|
end
|
121
121
|
|
122
122
|
module_eval(<<-EOS, file, line)
|
123
|
-
def #{prefix}#{method}(*args, &block)
|
124
|
-
#{
|
125
|
-
|
126
|
-
|
123
|
+
def #{prefix}#{method}(*args, &block) # def customer_name(*args, &block)
|
124
|
+
#{to}.__send__(#{method.inspect}, *args, &block) # client.__send__(:name, *args, &block)
|
125
|
+
rescue NoMethodError # rescue NoMethodError
|
126
|
+
if #{to}.nil? # if client.nil?
|
127
|
+
#{on_nil}
|
128
|
+
else # else
|
129
|
+
raise # raise
|
130
|
+
end # end
|
131
|
+
end # end
|
127
132
|
EOS
|
128
133
|
end
|
129
134
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'active_support/core_ext/string/inflections'
|
4
|
+
require 'active_support/core_ext/string/bytesize'
|
4
5
|
require 'active_support/core_ext/string/conversions'
|
5
6
|
require 'active_support/core_ext/string/access'
|
6
7
|
require 'active_support/core_ext/string/starts_ends_with'
|
@@ -207,9 +207,9 @@ module ActiveSupport #:nodoc:
|
|
207
207
|
alias :at_midnight :beginning_of_day
|
208
208
|
alias :at_beginning_of_day :beginning_of_day
|
209
209
|
|
210
|
-
# Returns a new Time representing the end of the day
|
210
|
+
# Returns a new Time representing the end of the day, 23:59:59.999999 (.999999999 in ruby1.9)
|
211
211
|
def end_of_day
|
212
|
-
change(:hour => 23, :min => 59, :sec => 59)
|
212
|
+
change(:hour => 23, :min => 59, :sec => 59, :usec => 999999.999)
|
213
213
|
end
|
214
214
|
|
215
215
|
# Returns a new Time representing the start of the month (1st of the month, 0:00)
|
@@ -219,11 +219,11 @@ module ActiveSupport #:nodoc:
|
|
219
219
|
end
|
220
220
|
alias :at_beginning_of_month :beginning_of_month
|
221
221
|
|
222
|
-
# Returns a new Time representing the end of the month (last day of the month
|
222
|
+
# Returns a new Time representing the end of the month (end of the last day of the month)
|
223
223
|
def end_of_month
|
224
224
|
#self - ((self.mday-1).days + self.seconds_since_midnight)
|
225
225
|
last_day = ::Time.days_in_month( self.month, self.year )
|
226
|
-
change(:day => last_day, :hour => 23, :min => 59, :sec => 59, :usec =>
|
226
|
+
change(:day => last_day, :hour => 23, :min => 59, :sec => 59, :usec => 999999.999)
|
227
227
|
end
|
228
228
|
alias :at_end_of_month :end_of_month
|
229
229
|
|
@@ -233,7 +233,7 @@ module ActiveSupport #:nodoc:
|
|
233
233
|
end
|
234
234
|
alias :at_beginning_of_quarter :beginning_of_quarter
|
235
235
|
|
236
|
-
# Returns a new Time representing the end of the quarter (last day of march, june, september, december
|
236
|
+
# Returns a new Time representing the end of the quarter (end of the last day of march, june, september, december)
|
237
237
|
def end_of_quarter
|
238
238
|
beginning_of_month.change(:month => [3, 6, 9, 12].detect { |m| m >= self.month }).end_of_month
|
239
239
|
end
|
@@ -245,9 +245,9 @@ module ActiveSupport #:nodoc:
|
|
245
245
|
end
|
246
246
|
alias :at_beginning_of_year :beginning_of_year
|
247
247
|
|
248
|
-
# Returns a new Time representing the end of the year (31st of december
|
248
|
+
# Returns a new Time representing the end of the year (end of the 31st of december)
|
249
249
|
def end_of_year
|
250
|
-
change(:month => 12
|
250
|
+
change(:month => 12, :day => 31, :hour => 23, :min => 59, :sec => 59, :usec => 999999.999)
|
251
251
|
end
|
252
252
|
alias :at_end_of_year :end_of_year
|
253
253
|
|
@@ -90,15 +90,15 @@ module ActiveSupport
|
|
90
90
|
method_names.each do |method_name|
|
91
91
|
alias_method_chain(method_name, :deprecation) do |target, punctuation|
|
92
92
|
class_eval(<<-EOS, __FILE__, __LINE__)
|
93
|
-
def #{target}_with_deprecation#{punctuation}(*args, &block)
|
94
|
-
::ActiveSupport::Deprecation.warn(
|
95
|
-
self.class.deprecated_method_warning(
|
96
|
-
:#{method_name},
|
97
|
-
#{options[method_name].inspect}),
|
98
|
-
caller
|
99
|
-
)
|
100
|
-
|
101
|
-
end
|
93
|
+
def #{target}_with_deprecation#{punctuation}(*args, &block) # def generate_secret_with_deprecation(*args, &block)
|
94
|
+
::ActiveSupport::Deprecation.warn( # ::ActiveSupport::Deprecation.warn(
|
95
|
+
self.class.deprecated_method_warning( # self.class.deprecated_method_warning(
|
96
|
+
:#{method_name}, # :generate_secret,
|
97
|
+
#{options[method_name].inspect}), # "You should use ActiveSupport::SecureRandom.hex(64)"),
|
98
|
+
caller # caller
|
99
|
+
) # )
|
100
|
+
send(:#{target}_without_deprecation#{punctuation}, *args, &block) # send(:generate_secret_without_deprecation, *args, &block)
|
101
|
+
end # end
|
102
102
|
EOS
|
103
103
|
end
|
104
104
|
end
|
@@ -17,7 +17,7 @@ module ActiveSupport
|
|
17
17
|
rescue ArgumentError => e
|
18
18
|
raise ParseError, "Invalid JSON string"
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
protected
|
22
22
|
# Ensure that ":" and "," are always followed by a space
|
23
23
|
def convert_json_to_yaml(json) #:nodoc:
|
@@ -41,6 +41,8 @@ module ActiveSupport
|
|
41
41
|
end
|
42
42
|
when ":",","
|
43
43
|
marks << scanner.pos - 1 unless quoting
|
44
|
+
when "\\"
|
45
|
+
scanner.skip(/\\/)
|
44
46
|
end
|
45
47
|
end
|
46
48
|
|
@@ -82,4 +84,5 @@ module ActiveSupport
|
|
82
84
|
end
|
83
85
|
end
|
84
86
|
end
|
85
|
-
end
|
87
|
+
end
|
88
|
+
|
@@ -43,7 +43,7 @@ module ActiveSupport
|
|
43
43
|
|
44
44
|
def flush_cache(*syms, &block)
|
45
45
|
syms.each do |sym|
|
46
|
-
methods.each do |m|
|
46
|
+
(methods + private_methods + protected_methods).each do |m|
|
47
47
|
if m.to_s =~ /^_unmemoized_(#{sym})/
|
48
48
|
ivar = ActiveSupport::Memoizable.memoized_ivar_for($1)
|
49
49
|
instance_variable_get(ivar).clear if instance_variable_defined?(ivar)
|
@@ -25,10 +25,10 @@ module ActiveSupport
|
|
25
25
|
|
26
26
|
def verify(signed_message)
|
27
27
|
data, digest = signed_message.split("--")
|
28
|
-
if digest
|
29
|
-
raise InvalidSignature
|
30
|
-
else
|
28
|
+
if secure_compare(digest, generate_digest(data))
|
31
29
|
Marshal.load(ActiveSupport::Base64.decode64(data))
|
30
|
+
else
|
31
|
+
raise InvalidSignature
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -38,6 +38,19 @@ module ActiveSupport
|
|
38
38
|
end
|
39
39
|
|
40
40
|
private
|
41
|
+
# constant-time comparison algorithm to prevent timing attacks
|
42
|
+
def secure_compare(a, b)
|
43
|
+
if a.length == b.length
|
44
|
+
result = 0
|
45
|
+
for i in 0..(a.length - 1)
|
46
|
+
result |= a[i] ^ b[i]
|
47
|
+
end
|
48
|
+
result == 0
|
49
|
+
else
|
50
|
+
false
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
41
54
|
def generate_digest(data)
|
42
55
|
require 'openssl' unless defined?(OpenSSL)
|
43
56
|
OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new(@digest), @secret, data)
|
@@ -1,9 +1,5 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require 'active_support/multibyte/chars'
|
4
|
-
require 'active_support/multibyte/exceptions'
|
5
|
-
require 'active_support/multibyte/unicode_database'
|
6
|
-
|
7
3
|
module ActiveSupport #:nodoc:
|
8
4
|
module Multibyte
|
9
5
|
# A list of all available normalization forms. See http://www.unicode.org/reports/tr15/tr15-29.html for more
|
@@ -27,7 +23,35 @@ module ActiveSupport #:nodoc:
|
|
27
23
|
#
|
28
24
|
# Example:
|
29
25
|
# ActiveSupport::Multibyte.proxy_class = CharsForUTF32
|
30
|
-
|
31
|
-
|
26
|
+
def self.proxy_class=(klass)
|
27
|
+
@proxy_class = klass
|
28
|
+
end
|
29
|
+
|
30
|
+
# Returns the currect proxy class
|
31
|
+
def self.proxy_class
|
32
|
+
@proxy_class ||= ActiveSupport::Multibyte::Chars
|
33
|
+
end
|
34
|
+
|
35
|
+
# Regular expressions that describe valid byte sequences for a character
|
36
|
+
VALID_CHARACTER = {
|
37
|
+
# Borrowed from the Kconv library by Shinji KONO - (also as seen on the W3C site)
|
38
|
+
'UTF-8' => /\A(?:
|
39
|
+
[\x00-\x7f] |
|
40
|
+
[\xc2-\xdf] [\x80-\xbf] |
|
41
|
+
\xe0 [\xa0-\xbf] [\x80-\xbf] |
|
42
|
+
[\xe1-\xef] [\x80-\xbf] [\x80-\xbf] |
|
43
|
+
\xf0 [\x90-\xbf] [\x80-\xbf] [\x80-\xbf] |
|
44
|
+
[\xf1-\xf3] [\x80-\xbf] [\x80-\xbf] [\x80-\xbf] |
|
45
|
+
\xf4 [\x80-\x8f] [\x80-\xbf] [\x80-\xbf])\z /xn,
|
46
|
+
# Quick check for valid Shift-JIS characters, disregards the odd-even pairing
|
47
|
+
'Shift_JIS' => /\A(?:
|
48
|
+
[\x00-\x7e \xa1-\xdf] |
|
49
|
+
[\x81-\x9f \xe0-\xef] [\x40-\x7e \x80-\x9e \x9f-\xfc])\z /xn
|
50
|
+
}
|
32
51
|
end
|
33
52
|
end
|
53
|
+
|
54
|
+
require 'active_support/multibyte/chars'
|
55
|
+
require 'active_support/multibyte/exceptions'
|
56
|
+
require 'active_support/multibyte/unicode_database'
|
57
|
+
require 'active_support/multibyte/utils'
|
@@ -73,16 +73,7 @@ module ActiveSupport #:nodoc:
|
|
73
73
|
UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/
|
74
74
|
UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/
|
75
75
|
|
76
|
-
|
77
|
-
UTF8_PAT = /\A(?:
|
78
|
-
[\x00-\x7f] |
|
79
|
-
[\xc2-\xdf] [\x80-\xbf] |
|
80
|
-
\xe0 [\xa0-\xbf] [\x80-\xbf] |
|
81
|
-
[\xe1-\xef] [\x80-\xbf] [\x80-\xbf] |
|
82
|
-
\xf0 [\x90-\xbf] [\x80-\xbf] [\x80-\xbf] |
|
83
|
-
[\xf1-\xf3] [\x80-\xbf] [\x80-\xbf] [\x80-\xbf] |
|
84
|
-
\xf4 [\x80-\x8f] [\x80-\xbf] [\x80-\xbf]
|
85
|
-
)*\z/xn
|
76
|
+
UTF8_PAT = ActiveSupport::Multibyte::VALID_CHARACTER['UTF-8']
|
86
77
|
|
87
78
|
attr_reader :wrapped_string
|
88
79
|
alias to_s wrapped_string
|
@@ -205,7 +196,22 @@ module ActiveSupport #:nodoc:
|
|
205
196
|
# 'Café périferôl'.mb_chars.index('ô') #=> 12
|
206
197
|
# 'Café périferôl'.mb_chars.index(/\w/u) #=> 0
|
207
198
|
def index(needle, offset=0)
|
208
|
-
|
199
|
+
wrapped_offset = self.first(offset).wrapped_string.length
|
200
|
+
index = @wrapped_string.index(needle, wrapped_offset)
|
201
|
+
index ? (self.class.u_unpack(@wrapped_string.slice(0...index)).size) : nil
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the position _needle_ in the string, counting in
|
205
|
+
# codepoints, searching backward from _offset_ or the end of the
|
206
|
+
# string. Returns +nil+ if _needle_ isn't found.
|
207
|
+
#
|
208
|
+
# Example:
|
209
|
+
# 'Café périferôl'.mb_chars.rindex('é') #=> 6
|
210
|
+
# 'Café périferôl'.mb_chars.rindex(/\w/u) #=> 13
|
211
|
+
def rindex(needle, offset=nil)
|
212
|
+
offset ||= length
|
213
|
+
wrapped_offset = self.first(offset).wrapped_string.length
|
214
|
+
index = @wrapped_string.rindex(needle, wrapped_offset)
|
209
215
|
index ? (self.class.u_unpack(@wrapped_string.slice(0...index)).size) : nil
|
210
216
|
end
|
211
217
|
|
@@ -292,23 +298,23 @@ module ActiveSupport #:nodoc:
|
|
292
298
|
def rstrip
|
293
299
|
chars(@wrapped_string.gsub(UNICODE_TRAILERS_PAT, ''))
|
294
300
|
end
|
295
|
-
|
301
|
+
|
296
302
|
# Strips entire range of Unicode whitespace from the left of the string.
|
297
303
|
def lstrip
|
298
304
|
chars(@wrapped_string.gsub(UNICODE_LEADERS_PAT, ''))
|
299
305
|
end
|
300
|
-
|
306
|
+
|
301
307
|
# Strips entire range of Unicode whitespace from the right and left of the string.
|
302
308
|
def strip
|
303
309
|
rstrip.lstrip
|
304
310
|
end
|
305
|
-
|
311
|
+
|
306
312
|
# Returns the number of codepoints in the string
|
307
313
|
def size
|
308
314
|
self.class.u_unpack(@wrapped_string).size
|
309
315
|
end
|
310
316
|
alias_method :length, :size
|
311
|
-
|
317
|
+
|
312
318
|
# Reverses all characters in the string.
|
313
319
|
#
|
314
320
|
# Example:
|
@@ -316,7 +322,7 @@ module ActiveSupport #:nodoc:
|
|
316
322
|
def reverse
|
317
323
|
chars(self.class.u_unpack(@wrapped_string).reverse.pack('U*'))
|
318
324
|
end
|
319
|
-
|
325
|
+
|
320
326
|
# Implements Unicode-aware slice with codepoints. Slicing on one point returns the codepoints for that
|
321
327
|
# character.
|
322
328
|
#
|
@@ -631,7 +637,7 @@ module ActiveSupport #:nodoc:
|
|
631
637
|
string.split(//u).map do |c|
|
632
638
|
c.force_encoding(Encoding::ASCII) if c.respond_to?(:force_encoding)
|
633
639
|
|
634
|
-
if !
|
640
|
+
if !ActiveSupport::Multibyte::VALID_CHARACTER['UTF-8'].match(c)
|
635
641
|
n = c.unpack('C')[0]
|
636
642
|
n < 128 ? n.chr :
|
637
643
|
n < 160 ? [UCD.cp1252[n] || n].pack('U') :
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module ActiveSupport #:nodoc:
|
4
|
+
module Multibyte #:nodoc:
|
5
|
+
if Kernel.const_defined?(:Encoding)
|
6
|
+
# Returns a regular expression that matches valid characters in the current encoding
|
7
|
+
def self.valid_character
|
8
|
+
VALID_CHARACTER[Encoding.default_internal.to_s]
|
9
|
+
end
|
10
|
+
else
|
11
|
+
def self.valid_character
|
12
|
+
case $KCODE
|
13
|
+
when 'UTF8'
|
14
|
+
VALID_CHARACTER['UTF-8']
|
15
|
+
when 'SJIS'
|
16
|
+
VALID_CHARACTER['Shift_JIS']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
if 'string'.respond_to?(:valid_encoding?)
|
22
|
+
# Verifies the encoding of a string
|
23
|
+
def self.verify(string)
|
24
|
+
string.valid_encoding?
|
25
|
+
end
|
26
|
+
else
|
27
|
+
def self.verify(string)
|
28
|
+
if expression = valid_character
|
29
|
+
for c in string.split(//)
|
30
|
+
return false unless valid_character.match(c)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
true
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Verifies the encoding of the string and raises an exception when it's not valid
|
38
|
+
def self.verify!(string)
|
39
|
+
raise EncodingError.new("Found characters with invalid encoding") unless verify(string)
|
40
|
+
end
|
41
|
+
|
42
|
+
if 'string'.respond_to?(:force_encoding)
|
43
|
+
# Removes all invalid characters from the string.
|
44
|
+
#
|
45
|
+
# Note: this method is a no-op in Ruby 1.9
|
46
|
+
def self.clean(string)
|
47
|
+
string
|
48
|
+
end
|
49
|
+
else
|
50
|
+
def self.clean(string)
|
51
|
+
if expression = valid_character
|
52
|
+
stripped = []; for c in string.split(//)
|
53
|
+
stripped << c if valid_character.match(c)
|
54
|
+
end; stripped.join
|
55
|
+
else
|
56
|
+
string
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -17,7 +17,8 @@ module ActiveSupport
|
|
17
17
|
class TestCase < ::Test::Unit::TestCase
|
18
18
|
if defined? MiniTest
|
19
19
|
Assertion = MiniTest::Assertion
|
20
|
-
alias_method :method_name, :name
|
20
|
+
alias_method :method_name, :name if method_defined? :name
|
21
|
+
alias_method :method_name, :__name__ if method_defined? :__name__
|
21
22
|
else
|
22
23
|
# TODO: Figure out how to get the Rails::BacktraceFilter into minitest/unit
|
23
24
|
if defined?(Rails) && ENV['BACKTRACE'].nil?
|
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: 2.3.
|
4
|
+
version: 2.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-09-04 00:00:00 +12:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -24,24 +24,20 @@ extra_rdoc_files: []
|
|
24
24
|
files:
|
25
25
|
- CHANGELOG
|
26
26
|
- README
|
27
|
-
- lib/active_support
|
27
|
+
- lib/active_support/all.rb
|
28
28
|
- lib/active_support/backtrace_cleaner.rb
|
29
29
|
- lib/active_support/base64.rb
|
30
30
|
- lib/active_support/basic_object.rb
|
31
31
|
- lib/active_support/buffered_logger.rb
|
32
|
-
- lib/active_support/cache
|
33
32
|
- lib/active_support/cache/compressed_mem_cache_store.rb
|
34
33
|
- lib/active_support/cache/drb_store.rb
|
35
34
|
- lib/active_support/cache/file_store.rb
|
36
35
|
- lib/active_support/cache/mem_cache_store.rb
|
37
36
|
- lib/active_support/cache/memory_store.rb
|
38
|
-
- lib/active_support/cache/strategy
|
39
37
|
- lib/active_support/cache/strategy/local_cache.rb
|
40
38
|
- lib/active_support/cache/synchronized_memory_store.rb
|
41
39
|
- lib/active_support/cache.rb
|
42
40
|
- lib/active_support/callbacks.rb
|
43
|
-
- lib/active_support/core_ext
|
44
|
-
- lib/active_support/core_ext/array
|
45
41
|
- lib/active_support/core_ext/array/access.rb
|
46
42
|
- lib/active_support/core_ext/array/conversions.rb
|
47
43
|
- lib/active_support/core_ext/array/extract_options.rb
|
@@ -49,43 +45,34 @@ files:
|
|
49
45
|
- lib/active_support/core_ext/array/random_access.rb
|
50
46
|
- lib/active_support/core_ext/array/wrapper.rb
|
51
47
|
- lib/active_support/core_ext/array.rb
|
52
|
-
- lib/active_support/core_ext/base64
|
53
48
|
- lib/active_support/core_ext/base64/encoding.rb
|
54
49
|
- lib/active_support/core_ext/base64.rb
|
55
50
|
- lib/active_support/core_ext/benchmark.rb
|
56
|
-
- lib/active_support/core_ext/bigdecimal
|
57
51
|
- lib/active_support/core_ext/bigdecimal/conversions.rb
|
58
52
|
- lib/active_support/core_ext/bigdecimal.rb
|
59
53
|
- lib/active_support/core_ext/blank.rb
|
60
|
-
- lib/active_support/core_ext/cgi
|
61
54
|
- lib/active_support/core_ext/cgi/escape_skipping_slashes.rb
|
62
55
|
- lib/active_support/core_ext/cgi.rb
|
63
|
-
- lib/active_support/core_ext/class
|
64
56
|
- lib/active_support/core_ext/class/attribute_accessors.rb
|
65
57
|
- lib/active_support/core_ext/class/delegating_attributes.rb
|
66
58
|
- lib/active_support/core_ext/class/inheritable_attributes.rb
|
67
59
|
- lib/active_support/core_ext/class/removal.rb
|
68
60
|
- lib/active_support/core_ext/class.rb
|
69
|
-
- lib/active_support/core_ext/date
|
70
61
|
- lib/active_support/core_ext/date/behavior.rb
|
71
62
|
- lib/active_support/core_ext/date/calculations.rb
|
72
63
|
- lib/active_support/core_ext/date/conversions.rb
|
73
64
|
- lib/active_support/core_ext/date.rb
|
74
|
-
- lib/active_support/core_ext/date_time
|
75
65
|
- lib/active_support/core_ext/date_time/calculations.rb
|
76
66
|
- lib/active_support/core_ext/date_time/conversions.rb
|
77
67
|
- lib/active_support/core_ext/date_time.rb
|
78
68
|
- lib/active_support/core_ext/duplicable.rb
|
79
69
|
- lib/active_support/core_ext/enumerable.rb
|
80
70
|
- lib/active_support/core_ext/exception.rb
|
81
|
-
- lib/active_support/core_ext/file
|
82
71
|
- lib/active_support/core_ext/file/atomic.rb
|
83
72
|
- lib/active_support/core_ext/file.rb
|
84
|
-
- lib/active_support/core_ext/float
|
85
73
|
- lib/active_support/core_ext/float/rounding.rb
|
86
74
|
- lib/active_support/core_ext/float/time.rb
|
87
75
|
- lib/active_support/core_ext/float.rb
|
88
|
-
- lib/active_support/core_ext/hash
|
89
76
|
- lib/active_support/core_ext/hash/conversions.rb
|
90
77
|
- lib/active_support/core_ext/hash/deep_merge.rb
|
91
78
|
- lib/active_support/core_ext/hash/diff.rb
|
@@ -95,12 +82,10 @@ files:
|
|
95
82
|
- lib/active_support/core_ext/hash/reverse_merge.rb
|
96
83
|
- lib/active_support/core_ext/hash/slice.rb
|
97
84
|
- lib/active_support/core_ext/hash.rb
|
98
|
-
- lib/active_support/core_ext/integer
|
99
85
|
- lib/active_support/core_ext/integer/even_odd.rb
|
100
86
|
- lib/active_support/core_ext/integer/inflections.rb
|
101
87
|
- lib/active_support/core_ext/integer/time.rb
|
102
88
|
- lib/active_support/core_ext/integer.rb
|
103
|
-
- lib/active_support/core_ext/kernel
|
104
89
|
- lib/active_support/core_ext/kernel/agnostics.rb
|
105
90
|
- lib/active_support/core_ext/kernel/daemonizing.rb
|
106
91
|
- lib/active_support/core_ext/kernel/debugger.rb
|
@@ -109,7 +94,6 @@ files:
|
|
109
94
|
- lib/active_support/core_ext/kernel.rb
|
110
95
|
- lib/active_support/core_ext/load_error.rb
|
111
96
|
- lib/active_support/core_ext/logger.rb
|
112
|
-
- lib/active_support/core_ext/module
|
113
97
|
- lib/active_support/core_ext/module/aliasing.rb
|
114
98
|
- lib/active_support/core_ext/module/attr_accessor_with_default.rb
|
115
99
|
- lib/active_support/core_ext/module/attr_internal.rb
|
@@ -122,35 +106,30 @@ files:
|
|
122
106
|
- lib/active_support/core_ext/module/synchronization.rb
|
123
107
|
- lib/active_support/core_ext/module.rb
|
124
108
|
- lib/active_support/core_ext/name_error.rb
|
125
|
-
- lib/active_support/core_ext/numeric
|
126
109
|
- lib/active_support/core_ext/numeric/bytes.rb
|
127
110
|
- lib/active_support/core_ext/numeric/conversions.rb
|
128
111
|
- lib/active_support/core_ext/numeric/time.rb
|
129
112
|
- lib/active_support/core_ext/numeric.rb
|
130
|
-
- lib/active_support/core_ext/object
|
131
113
|
- lib/active_support/core_ext/object/conversions.rb
|
132
114
|
- lib/active_support/core_ext/object/extending.rb
|
133
115
|
- lib/active_support/core_ext/object/instance_variables.rb
|
134
116
|
- lib/active_support/core_ext/object/metaclass.rb
|
135
117
|
- lib/active_support/core_ext/object/misc.rb
|
136
118
|
- lib/active_support/core_ext/object.rb
|
137
|
-
- lib/active_support/core_ext/pathname
|
138
119
|
- lib/active_support/core_ext/pathname/clean_within.rb
|
139
120
|
- lib/active_support/core_ext/pathname.rb
|
140
121
|
- lib/active_support/core_ext/proc.rb
|
141
|
-
- lib/active_support/core_ext/process
|
142
122
|
- lib/active_support/core_ext/process/daemon.rb
|
143
123
|
- lib/active_support/core_ext/process.rb
|
144
|
-
- lib/active_support/core_ext/range
|
145
124
|
- lib/active_support/core_ext/range/blockless_step.rb
|
146
125
|
- lib/active_support/core_ext/range/conversions.rb
|
147
126
|
- lib/active_support/core_ext/range/include_range.rb
|
148
127
|
- lib/active_support/core_ext/range/overlaps.rb
|
149
128
|
- lib/active_support/core_ext/range.rb
|
150
129
|
- lib/active_support/core_ext/rexml.rb
|
151
|
-
- lib/active_support/core_ext/string
|
152
130
|
- lib/active_support/core_ext/string/access.rb
|
153
131
|
- lib/active_support/core_ext/string/behavior.rb
|
132
|
+
- lib/active_support/core_ext/string/bytesize.rb
|
154
133
|
- lib/active_support/core_ext/string/conversions.rb
|
155
134
|
- lib/active_support/core_ext/string/filters.rb
|
156
135
|
- lib/active_support/core_ext/string/inflections.rb
|
@@ -160,7 +139,6 @@ files:
|
|
160
139
|
- lib/active_support/core_ext/string/xchar.rb
|
161
140
|
- lib/active_support/core_ext/string.rb
|
162
141
|
- lib/active_support/core_ext/symbol.rb
|
163
|
-
- lib/active_support/core_ext/time
|
164
142
|
- lib/active_support/core_ext/time/behavior.rb
|
165
143
|
- lib/active_support/core_ext/time/calculations.rb
|
166
144
|
- lib/active_support/core_ext/time/conversions.rb
|
@@ -175,12 +153,9 @@ files:
|
|
175
153
|
- lib/active_support/gzip.rb
|
176
154
|
- lib/active_support/inflections.rb
|
177
155
|
- lib/active_support/inflector.rb
|
178
|
-
- lib/active_support/json
|
179
|
-
- lib/active_support/json/backends
|
180
156
|
- lib/active_support/json/backends/jsongem.rb
|
181
157
|
- lib/active_support/json/backends/yaml.rb
|
182
158
|
- lib/active_support/json/decoding.rb
|
183
|
-
- lib/active_support/json/encoders
|
184
159
|
- lib/active_support/json/encoders/date.rb
|
185
160
|
- lib/active_support/json/encoders/date_time.rb
|
186
161
|
- lib/active_support/json/encoders/enumerable.rb
|
@@ -197,15 +172,14 @@ files:
|
|
197
172
|
- lib/active_support/json/encoding.rb
|
198
173
|
- lib/active_support/json/variable.rb
|
199
174
|
- lib/active_support/json.rb
|
200
|
-
- lib/active_support/locale
|
201
175
|
- lib/active_support/locale/en.yml
|
202
176
|
- lib/active_support/memoizable.rb
|
203
177
|
- lib/active_support/message_encryptor.rb
|
204
178
|
- lib/active_support/message_verifier.rb
|
205
|
-
- lib/active_support/multibyte
|
206
179
|
- lib/active_support/multibyte/chars.rb
|
207
180
|
- lib/active_support/multibyte/exceptions.rb
|
208
181
|
- lib/active_support/multibyte/unicode_database.rb
|
182
|
+
- lib/active_support/multibyte/utils.rb
|
209
183
|
- lib/active_support/multibyte.rb
|
210
184
|
- lib/active_support/option_merger.rb
|
211
185
|
- lib/active_support/ordered_hash.rb
|
@@ -214,7 +188,6 @@ files:
|
|
214
188
|
- lib/active_support/secure_random.rb
|
215
189
|
- lib/active_support/string_inquirer.rb
|
216
190
|
- lib/active_support/test_case.rb
|
217
|
-
- lib/active_support/testing
|
218
191
|
- lib/active_support/testing/assertions.rb
|
219
192
|
- lib/active_support/testing/declarative.rb
|
220
193
|
- lib/active_support/testing/default.rb
|
@@ -222,13 +195,9 @@ files:
|
|
222
195
|
- lib/active_support/testing/performance.rb
|
223
196
|
- lib/active_support/testing/setup_and_teardown.rb
|
224
197
|
- lib/active_support/time_with_zone.rb
|
225
|
-
- lib/active_support/values
|
226
198
|
- lib/active_support/values/time_zone.rb
|
227
199
|
- lib/active_support/values/unicode_tables.dat
|
228
|
-
- lib/active_support/vendor
|
229
|
-
- lib/active_support/vendor/builder-2.1.2
|
230
200
|
- lib/active_support/vendor/builder-2.1.2/blankslate.rb
|
231
|
-
- lib/active_support/vendor/builder-2.1.2/builder
|
232
201
|
- lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb
|
233
202
|
- lib/active_support/vendor/builder-2.1.2/builder/css.rb
|
234
203
|
- lib/active_support/vendor/builder-2.1.2/builder/xchar.rb
|
@@ -236,35 +205,22 @@ files:
|
|
236
205
|
- lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb
|
237
206
|
- lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb
|
238
207
|
- lib/active_support/vendor/builder-2.1.2/builder.rb
|
239
|
-
- lib/active_support/vendor/i18n-0.1.1
|
240
|
-
- lib/active_support/vendor/i18n-0.1.1/lib
|
241
|
-
- lib/active_support/vendor/i18n-0.1.3
|
242
208
|
- lib/active_support/vendor/i18n-0.1.3/i18n.gemspec
|
243
|
-
- lib/active_support/vendor/i18n-0.1.3/lib
|
244
|
-
- lib/active_support/vendor/i18n-0.1.3/lib/i18n
|
245
|
-
- lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend
|
246
209
|
- lib/active_support/vendor/i18n-0.1.3/lib/i18n/backend/simple.rb
|
247
210
|
- lib/active_support/vendor/i18n-0.1.3/lib/i18n/exceptions.rb
|
248
211
|
- lib/active_support/vendor/i18n-0.1.3/lib/i18n.rb
|
249
212
|
- lib/active_support/vendor/i18n-0.1.3/MIT-LICENSE
|
250
213
|
- lib/active_support/vendor/i18n-0.1.3/Rakefile
|
251
214
|
- lib/active_support/vendor/i18n-0.1.3/README.textile
|
252
|
-
- lib/active_support/vendor/i18n-0.1.3/test
|
253
215
|
- lib/active_support/vendor/i18n-0.1.3/test/all.rb
|
254
216
|
- lib/active_support/vendor/i18n-0.1.3/test/i18n_exceptions_test.rb
|
255
217
|
- lib/active_support/vendor/i18n-0.1.3/test/i18n_test.rb
|
256
|
-
- lib/active_support/vendor/i18n-0.1.3/test/locale
|
257
218
|
- lib/active_support/vendor/i18n-0.1.3/test/locale/en.rb
|
258
219
|
- lib/active_support/vendor/i18n-0.1.3/test/locale/en.yml
|
259
220
|
- lib/active_support/vendor/i18n-0.1.3/test/simple_backend_test.rb
|
260
|
-
- lib/active_support/vendor/memcache-client-1.7.4
|
261
221
|
- lib/active_support/vendor/memcache-client-1.7.4/memcache.rb
|
262
|
-
- lib/active_support/vendor/tzinfo-0.3.12
|
263
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo
|
264
222
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb
|
265
223
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb
|
266
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions
|
267
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa
|
268
224
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb
|
269
225
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb
|
270
226
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb
|
@@ -272,8 +228,6 @@ files:
|
|
272
228
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb
|
273
229
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb
|
274
230
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb
|
275
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America
|
276
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina
|
277
231
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb
|
278
232
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb
|
279
233
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb
|
@@ -284,7 +238,6 @@ files:
|
|
284
238
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb
|
285
239
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb
|
286
240
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb
|
287
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana
|
288
241
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb
|
289
242
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb
|
290
243
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb
|
@@ -300,7 +253,6 @@ files:
|
|
300
253
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb
|
301
254
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb
|
302
255
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb
|
303
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia
|
304
256
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb
|
305
257
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb
|
306
258
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb
|
@@ -339,11 +291,9 @@ files:
|
|
339
291
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb
|
340
292
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb
|
341
293
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb
|
342
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic
|
343
294
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb
|
344
295
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb
|
345
296
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb
|
346
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia
|
347
297
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb
|
348
298
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb
|
349
299
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb
|
@@ -351,9 +301,7 @@ files:
|
|
351
301
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb
|
352
302
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb
|
353
303
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb
|
354
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc
|
355
304
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb
|
356
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe
|
357
305
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb
|
358
306
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb
|
359
307
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb
|
@@ -386,7 +334,6 @@ files:
|
|
386
334
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb
|
387
335
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb
|
388
336
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb
|
389
|
-
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific
|
390
337
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb
|
391
338
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb
|
392
339
|
- lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb
|
@@ -413,7 +360,6 @@ files:
|
|
413
360
|
- lib/active_support/vendor.rb
|
414
361
|
- lib/active_support/version.rb
|
415
362
|
- lib/active_support/whiny_nil.rb
|
416
|
-
- lib/active_support/xml_mini
|
417
363
|
- lib/active_support/xml_mini/jdom.rb
|
418
364
|
- lib/active_support/xml_mini/libxml.rb
|
419
365
|
- lib/active_support/xml_mini/nokogiri.rb
|
@@ -423,6 +369,8 @@ files:
|
|
423
369
|
- lib/activesupport.rb
|
424
370
|
has_rdoc: true
|
425
371
|
homepage: http://www.rubyonrails.org
|
372
|
+
licenses: []
|
373
|
+
|
426
374
|
post_install_message:
|
427
375
|
rdoc_options: []
|
428
376
|
|
@@ -443,9 +391,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
443
391
|
requirements: []
|
444
392
|
|
445
393
|
rubyforge_project: activesupport
|
446
|
-
rubygems_version: 1.3.
|
394
|
+
rubygems_version: 1.3.2
|
447
395
|
signing_key:
|
448
|
-
specification_version:
|
396
|
+
specification_version: 3
|
449
397
|
summary: Support and utility classes used by the Rails framework.
|
450
398
|
test_files: []
|
451
399
|
|