activesupport 1.3.1 → 1.4.0
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 +232 -2
- data/README +43 -0
- data/lib/active_support.rb +4 -1
- data/lib/active_support/breakpoint.rb +5 -0
- data/lib/active_support/core_ext/array.rb +2 -16
- data/lib/active_support/core_ext/array/conversions.rb +30 -4
- data/lib/active_support/core_ext/array/grouping.rb +55 -0
- data/lib/active_support/core_ext/bigdecimal.rb +3 -0
- data/lib/active_support/core_ext/bigdecimal/formatting.rb +7 -0
- data/lib/active_support/core_ext/class/inheritable_attributes.rb +6 -1
- data/lib/active_support/core_ext/date/conversions.rb +13 -7
- data/lib/active_support/core_ext/enumerable.rb +41 -10
- data/lib/active_support/core_ext/exception.rb +2 -2
- data/lib/active_support/core_ext/hash/conversions.rb +123 -12
- data/lib/active_support/core_ext/hash/indifferent_access.rb +18 -9
- data/lib/active_support/core_ext/integer/inflections.rb +10 -4
- data/lib/active_support/core_ext/load_error.rb +3 -3
- data/lib/active_support/core_ext/module.rb +2 -0
- data/lib/active_support/core_ext/module/aliasing.rb +58 -0
- data/lib/active_support/core_ext/module/attr_internal.rb +31 -0
- data/lib/active_support/core_ext/module/delegation.rb +27 -2
- data/lib/active_support/core_ext/name_error.rb +20 -0
- data/lib/active_support/core_ext/string.rb +2 -0
- data/lib/active_support/core_ext/string/access.rb +5 -5
- data/lib/active_support/core_ext/string/inflections.rb +93 -4
- data/lib/active_support/core_ext/string/unicode.rb +42 -0
- data/lib/active_support/core_ext/symbol.rb +1 -1
- data/lib/active_support/core_ext/time/calculations.rb +7 -5
- data/lib/active_support/core_ext/time/conversions.rb +1 -2
- data/lib/active_support/dependencies.rb +417 -50
- data/lib/active_support/deprecation.rb +201 -0
- data/lib/active_support/inflections.rb +1 -2
- data/lib/active_support/inflector.rb +117 -19
- data/lib/active_support/json.rb +14 -3
- data/lib/active_support/json/encoders/core.rb +21 -18
- data/lib/active_support/multibyte.rb +7 -0
- data/lib/active_support/multibyte/chars.rb +129 -0
- data/lib/active_support/multibyte/generators/generate_tables.rb +149 -0
- data/lib/active_support/multibyte/handlers/passthru_handler.rb +9 -0
- data/lib/active_support/multibyte/handlers/utf8_handler.rb +453 -0
- data/lib/active_support/multibyte/handlers/utf8_handler_proc.rb +44 -0
- data/lib/active_support/option_merger.rb +3 -3
- data/lib/active_support/ordered_options.rb +24 -23
- data/lib/active_support/reloadable.rb +39 -5
- data/lib/active_support/values/time_zone.rb +1 -1
- data/lib/active_support/values/unicode_tables.dat +0 -0
- data/lib/active_support/vendor/builder/blankslate.rb +16 -6
- data/lib/active_support/vendor/builder/xchar.rb +112 -0
- data/lib/active_support/vendor/builder/xmlbase.rb +12 -10
- data/lib/active_support/vendor/builder/xmlmarkup.rb +26 -7
- data/lib/active_support/vendor/xml_simple.rb +1021 -0
- data/lib/active_support/version.rb +2 -2
- data/lib/active_support/whiny_nil.rb +1 -1
- metadata +26 -4
- data/lib/active_support/core_ext/hash/conversions.rb.rej +0 -28
@@ -30,7 +30,7 @@ class NilClass
|
|
30
30
|
def raise_nil_warning_for(klass = nil, selector = nil, with_caller = nil)
|
31
31
|
message = "You have a nil object when you didn't expect it!"
|
32
32
|
message << "\nYou might have expected an instance of #{klass}." if klass
|
33
|
-
message << "\nThe error
|
33
|
+
message << "\nThe error occurred while evaluating nil.#{selector}" if selector
|
34
34
|
|
35
35
|
raise NoMethodError, message, with_caller || caller
|
36
36
|
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.0
|
3
3
|
specification_version: 1
|
4
4
|
name: activesupport
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.
|
7
|
-
date:
|
6
|
+
version: 1.4.0
|
7
|
+
date: 2007-01-17 00:00:00 -06:00
|
8
8
|
summary: Support and utility classes used by the Rails framework.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -25,10 +25,12 @@ required_ruby_version: !ruby/object:Gem::Version::Requirement
|
|
25
25
|
platform: ruby
|
26
26
|
signing_key:
|
27
27
|
cert_chain:
|
28
|
+
post_install_message:
|
28
29
|
authors:
|
29
30
|
- David Heinemeier Hansson
|
30
31
|
files:
|
31
32
|
- CHANGELOG
|
33
|
+
- README
|
32
34
|
- lib/active_support
|
33
35
|
- lib/active_support.rb
|
34
36
|
- lib/active_support/binding_of_caller.rb
|
@@ -38,10 +40,13 @@ files:
|
|
38
40
|
- lib/active_support/core_ext
|
39
41
|
- lib/active_support/core_ext.rb
|
40
42
|
- lib/active_support/dependencies.rb
|
43
|
+
- lib/active_support/deprecation.rb
|
41
44
|
- lib/active_support/inflections.rb
|
42
45
|
- lib/active_support/inflector.rb
|
43
46
|
- lib/active_support/json
|
44
47
|
- lib/active_support/json.rb
|
48
|
+
- lib/active_support/multibyte
|
49
|
+
- lib/active_support/multibyte.rb
|
45
50
|
- lib/active_support/option_merger.rb
|
46
51
|
- lib/active_support/ordered_options.rb
|
47
52
|
- lib/active_support/reloadable.rb
|
@@ -51,6 +56,8 @@ files:
|
|
51
56
|
- lib/active_support/whiny_nil.rb
|
52
57
|
- lib/active_support/core_ext/array
|
53
58
|
- lib/active_support/core_ext/array.rb
|
59
|
+
- lib/active_support/core_ext/bigdecimal
|
60
|
+
- lib/active_support/core_ext/bigdecimal.rb
|
54
61
|
- lib/active_support/core_ext/blank.rb
|
55
62
|
- lib/active_support/core_ext/cgi
|
56
63
|
- lib/active_support/core_ext/cgi.rb
|
@@ -70,6 +77,7 @@ files:
|
|
70
77
|
- lib/active_support/core_ext/logger.rb
|
71
78
|
- lib/active_support/core_ext/module
|
72
79
|
- lib/active_support/core_ext/module.rb
|
80
|
+
- lib/active_support/core_ext/name_error.rb
|
73
81
|
- lib/active_support/core_ext/numeric
|
74
82
|
- lib/active_support/core_ext/numeric.rb
|
75
83
|
- lib/active_support/core_ext/object
|
@@ -85,13 +93,14 @@ files:
|
|
85
93
|
- lib/active_support/core_ext/time
|
86
94
|
- lib/active_support/core_ext/time.rb
|
87
95
|
- lib/active_support/core_ext/array/conversions.rb
|
96
|
+
- lib/active_support/core_ext/array/grouping.rb
|
97
|
+
- lib/active_support/core_ext/bigdecimal/formatting.rb
|
88
98
|
- lib/active_support/core_ext/cgi/escape_skipping_slashes.rb
|
89
99
|
- lib/active_support/core_ext/class/attribute_accessors.rb
|
90
100
|
- lib/active_support/core_ext/class/inheritable_attributes.rb
|
91
101
|
- lib/active_support/core_ext/class/removal.rb
|
92
102
|
- lib/active_support/core_ext/date/conversions.rb
|
93
103
|
- lib/active_support/core_ext/hash/conversions.rb
|
94
|
-
- lib/active_support/core_ext/hash/conversions.rb.rej
|
95
104
|
- lib/active_support/core_ext/hash/diff.rb
|
96
105
|
- lib/active_support/core_ext/hash/indifferent_access.rb
|
97
106
|
- lib/active_support/core_ext/hash/keys.rb
|
@@ -102,6 +111,8 @@ files:
|
|
102
111
|
- lib/active_support/core_ext/kernel/daemonizing.rb
|
103
112
|
- lib/active_support/core_ext/kernel/reporting.rb
|
104
113
|
- lib/active_support/core_ext/kernel/requires.rb
|
114
|
+
- lib/active_support/core_ext/module/aliasing.rb
|
115
|
+
- lib/active_support/core_ext/module/attr_internal.rb
|
105
116
|
- lib/active_support/core_ext/module/attribute_accessors.rb
|
106
117
|
- lib/active_support/core_ext/module/delegation.rb
|
107
118
|
- lib/active_support/core_ext/module/inclusion.rb
|
@@ -118,15 +129,26 @@ files:
|
|
118
129
|
- lib/active_support/core_ext/string/inflections.rb
|
119
130
|
- lib/active_support/core_ext/string/iterators.rb
|
120
131
|
- lib/active_support/core_ext/string/starts_ends_with.rb
|
132
|
+
- lib/active_support/core_ext/string/unicode.rb
|
121
133
|
- lib/active_support/core_ext/time/calculations.rb
|
122
134
|
- lib/active_support/core_ext/time/conversions.rb
|
123
135
|
- lib/active_support/json/encoders
|
124
136
|
- lib/active_support/json/encoders.rb
|
125
137
|
- lib/active_support/json/encoders/core.rb
|
138
|
+
- lib/active_support/multibyte/chars.rb
|
139
|
+
- lib/active_support/multibyte/generators
|
140
|
+
- lib/active_support/multibyte/handlers
|
141
|
+
- lib/active_support/multibyte/generators/generate_tables.rb
|
142
|
+
- lib/active_support/multibyte/handlers/passthru_handler.rb
|
143
|
+
- lib/active_support/multibyte/handlers/utf8_handler.rb
|
144
|
+
- lib/active_support/multibyte/handlers/utf8_handler_proc.rb
|
126
145
|
- lib/active_support/values/time_zone.rb
|
146
|
+
- lib/active_support/values/unicode_tables.dat
|
127
147
|
- lib/active_support/vendor/builder
|
128
148
|
- lib/active_support/vendor/builder.rb
|
149
|
+
- lib/active_support/vendor/xml_simple.rb
|
129
150
|
- lib/active_support/vendor/builder/blankslate.rb
|
151
|
+
- lib/active_support/vendor/builder/xchar.rb
|
130
152
|
- lib/active_support/vendor/builder/xmlbase.rb
|
131
153
|
- lib/active_support/vendor/builder/xmlevents.rb
|
132
154
|
- lib/active_support/vendor/builder/xmlmarkup.rb
|
@@ -1,28 +0,0 @@
|
|
1
|
-
***************
|
2
|
-
*** 21,33 ****
|
3
|
-
options[:builder].instruct! unless options.delete(:skip_instruct)
|
4
|
-
|
5
|
-
options[:builder].__send__(options[:root]) do
|
6
|
-
- for key in keys
|
7
|
-
- value = self[key]
|
8
|
-
|
9
|
-
- case value.class.to_s # TODO: Figure out why I have to to_s the class to do comparisons in order for tests to run
|
10
|
-
- when "Hash"
|
11
|
-
value.to_xml(options.merge({ :root => key, :skip_instruct => true }))
|
12
|
-
- when "Array"
|
13
|
-
value.to_xml(options.merge({ :root => key, :children => key.to_s.singularize, :skip_instruct => true}))
|
14
|
-
else
|
15
|
-
type_name = XML_TYPE_NAMES[value.class.to_s]
|
16
|
-
--- 21,32 ----
|
17
|
-
options[:builder].instruct! unless options.delete(:skip_instruct)
|
18
|
-
|
19
|
-
options[:builder].__send__(options[:root]) do
|
20
|
-
+ each do |key, value|
|
21
|
-
|
22
|
-
+ case value
|
23
|
-
+ when ::Hash
|
24
|
-
value.to_xml(options.merge({ :root => key, :skip_instruct => true }))
|
25
|
-
+ when ::Array
|
26
|
-
value.to_xml(options.merge({ :root => key, :children => key.to_s.singularize, :skip_instruct => true}))
|
27
|
-
else
|
28
|
-
type_name = XML_TYPE_NAMES[value.class.to_s]
|