activesupport 4.0.13 → 4.2.11.3

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.

Files changed (166) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +406 -418
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +7 -2
  5. data/lib/active_support/backtrace_cleaner.rb +8 -8
  6. data/lib/active_support/benchmarkable.rb +0 -10
  7. data/lib/active_support/cache/file_store.rb +32 -22
  8. data/lib/active_support/cache/mem_cache_store.rb +5 -7
  9. data/lib/active_support/cache/memory_store.rb +1 -0
  10. data/lib/active_support/cache/strategy/local_cache.rb +11 -30
  11. data/lib/active_support/cache/strategy/local_cache_middleware.rb +44 -0
  12. data/lib/active_support/cache.rb +75 -41
  13. data/lib/active_support/callbacks.rb +482 -261
  14. data/lib/active_support/concern.rb +23 -7
  15. data/lib/active_support/configurable.rb +1 -1
  16. data/lib/active_support/core_ext/array/access.rb +11 -1
  17. data/lib/active_support/core_ext/array/conversions.rb +2 -17
  18. data/lib/active_support/core_ext/array/grouping.rb +29 -12
  19. data/lib/active_support/core_ext/array/prepend_and_append.rb +2 -2
  20. data/lib/active_support/core_ext/array.rb +0 -1
  21. data/lib/active_support/core_ext/big_decimal/conversions.rb +0 -15
  22. data/lib/active_support/core_ext/big_decimal/yaml_conversions.rb +16 -0
  23. data/lib/active_support/core_ext/class/attribute.rb +1 -2
  24. data/lib/active_support/core_ext/class/attribute_accessors.rb +4 -170
  25. data/lib/active_support/core_ext/class/delegating_attributes.rb +13 -8
  26. data/lib/active_support/core_ext/class/subclasses.rb +0 -2
  27. data/lib/active_support/core_ext/class.rb +0 -1
  28. data/lib/active_support/core_ext/date/calculations.rb +10 -0
  29. data/lib/active_support/core_ext/date/conversions.rb +9 -1
  30. data/lib/active_support/core_ext/date/zones.rb +2 -33
  31. data/lib/active_support/core_ext/date_and_time/calculations.rb +41 -11
  32. data/lib/active_support/core_ext/date_and_time/compatibility.rb +15 -0
  33. data/lib/active_support/core_ext/date_and_time/zones.rb +41 -0
  34. data/lib/active_support/core_ext/date_time/calculations.rb +45 -22
  35. data/lib/active_support/core_ext/date_time/compatibility.rb +16 -0
  36. data/lib/active_support/core_ext/date_time/conversions.rb +4 -2
  37. data/lib/active_support/core_ext/date_time/zones.rb +3 -21
  38. data/lib/active_support/core_ext/date_time.rb +1 -0
  39. data/lib/active_support/core_ext/digest/uuid.rb +51 -0
  40. data/lib/active_support/core_ext/enumerable.rb +17 -1
  41. data/lib/active_support/core_ext/file/atomic.rb +1 -1
  42. data/lib/active_support/core_ext/hash/compact.rb +24 -0
  43. data/lib/active_support/core_ext/hash/conversions.rb +9 -8
  44. data/lib/active_support/core_ext/hash/except.rb +8 -2
  45. data/lib/active_support/core_ext/hash/indifferent_access.rb +1 -0
  46. data/lib/active_support/core_ext/hash/keys.rb +25 -19
  47. data/lib/active_support/core_ext/hash/slice.rb +8 -2
  48. data/lib/active_support/core_ext/hash/transform_values.rb +23 -0
  49. data/lib/active_support/core_ext/hash.rb +2 -1
  50. data/lib/active_support/core_ext/integer/time.rb +0 -15
  51. data/lib/active_support/core_ext/kernel/concern.rb +10 -0
  52. data/lib/active_support/core_ext/kernel/debugger.rb +1 -1
  53. data/lib/active_support/core_ext/kernel/reporting.rb +13 -2
  54. data/lib/active_support/core_ext/kernel.rb +3 -2
  55. data/lib/active_support/core_ext/load_error.rb +4 -1
  56. data/lib/active_support/core_ext/marshal.rb +8 -5
  57. data/lib/active_support/core_ext/module/aliasing.rb +2 -2
  58. data/lib/active_support/core_ext/module/attr_internal.rb +2 -1
  59. data/lib/active_support/core_ext/module/attribute_accessors.rb +160 -14
  60. data/lib/active_support/core_ext/module/concerning.rb +135 -0
  61. data/lib/active_support/core_ext/module/delegation.rb +53 -25
  62. data/lib/active_support/core_ext/module/deprecation.rb +0 -2
  63. data/lib/active_support/core_ext/module/introspection.rb +0 -16
  64. data/lib/active_support/core_ext/module/method_transplanting.rb +13 -0
  65. data/lib/active_support/core_ext/module.rb +1 -0
  66. data/lib/active_support/core_ext/numeric/conversions.rb +11 -3
  67. data/lib/active_support/core_ext/numeric/time.rb +4 -29
  68. data/lib/active_support/core_ext/object/blank.rb +44 -18
  69. data/lib/active_support/core_ext/object/deep_dup.rb +6 -6
  70. data/lib/active_support/core_ext/object/duplicable.rb +72 -33
  71. data/lib/active_support/core_ext/object/inclusion.rb +16 -15
  72. data/lib/active_support/core_ext/object/itself.rb +15 -0
  73. data/lib/active_support/core_ext/object/json.rb +197 -0
  74. data/lib/active_support/core_ext/object/to_query.rb +14 -6
  75. data/lib/active_support/core_ext/object/try.rb +36 -14
  76. data/lib/active_support/core_ext/object/with_options.rb +30 -3
  77. data/lib/active_support/core_ext/object.rb +2 -1
  78. data/lib/active_support/core_ext/string/access.rb +35 -35
  79. data/lib/active_support/core_ext/string/conversions.rb +10 -9
  80. data/lib/active_support/core_ext/string/exclude.rb +3 -3
  81. data/lib/active_support/core_ext/string/filters.rb +51 -3
  82. data/lib/active_support/core_ext/string/inflections.rb +15 -10
  83. data/lib/active_support/core_ext/string/output_safety.rb +97 -33
  84. data/lib/active_support/core_ext/string/zones.rb +1 -0
  85. data/lib/active_support/core_ext/thread.rb +12 -5
  86. data/lib/active_support/core_ext/time/calculations.rb +47 -68
  87. data/lib/active_support/core_ext/time/compatibility.rb +14 -0
  88. data/lib/active_support/core_ext/time/conversions.rb +4 -2
  89. data/lib/active_support/core_ext/time/zones.rb +2 -20
  90. data/lib/active_support/core_ext/time.rb +1 -0
  91. data/lib/active_support/core_ext.rb +0 -1
  92. data/lib/active_support/dependencies/autoload.rb +1 -1
  93. data/lib/active_support/dependencies.rb +64 -25
  94. data/lib/active_support/deprecation/behaviors.rb +4 -4
  95. data/lib/active_support/deprecation.rb +4 -4
  96. data/lib/active_support/duration.rb +55 -11
  97. data/lib/active_support/file_update_checker.rb +1 -1
  98. data/lib/active_support/gem_version.rb +15 -0
  99. data/lib/active_support/hash_with_indifferent_access.rb +39 -11
  100. data/lib/active_support/i18n.rb +4 -4
  101. data/lib/active_support/i18n_railtie.rb +1 -7
  102. data/lib/active_support/inflections.rb +6 -1
  103. data/lib/active_support/inflector/inflections.rb +19 -19
  104. data/lib/active_support/inflector/methods.rb +66 -25
  105. data/lib/active_support/json/decoding.rb +15 -22
  106. data/lib/active_support/json/encoding.rb +125 -286
  107. data/lib/active_support/key_generator.rb +8 -10
  108. data/lib/active_support/lazy_load_hooks.rb +1 -1
  109. data/lib/active_support/log_subscriber/test_helper.rb +1 -1
  110. data/lib/active_support/logger.rb +51 -1
  111. data/lib/active_support/logger_silence.rb +7 -4
  112. data/lib/active_support/logger_thread_safe_level.rb +32 -0
  113. data/lib/active_support/message_encryptor.rb +14 -6
  114. data/lib/active_support/message_verifier.rb +16 -12
  115. data/lib/active_support/multibyte/chars.rb +2 -3
  116. data/lib/active_support/multibyte/unicode.rb +46 -58
  117. data/lib/active_support/notifications/fanout.rb +12 -7
  118. data/lib/active_support/notifications/instrumenter.rb +2 -1
  119. data/lib/active_support/notifications.rb +11 -6
  120. data/lib/active_support/number_helper/number_converter.rb +182 -0
  121. data/lib/active_support/number_helper/number_to_currency_converter.rb +46 -0
  122. data/lib/active_support/number_helper/number_to_delimited_converter.rb +23 -0
  123. data/lib/active_support/number_helper/number_to_human_converter.rb +66 -0
  124. data/lib/active_support/number_helper/number_to_human_size_converter.rb +58 -0
  125. data/lib/active_support/number_helper/number_to_percentage_converter.rb +12 -0
  126. data/lib/active_support/number_helper/number_to_phone_converter.rb +49 -0
  127. data/lib/active_support/number_helper/number_to_rounded_converter.rb +87 -0
  128. data/lib/active_support/number_helper.rb +32 -324
  129. data/lib/active_support/ordered_options.rb +8 -0
  130. data/lib/active_support/per_thread_registry.rb +13 -10
  131. data/lib/active_support/security_utils.rb +27 -0
  132. data/lib/active_support/subscriber.rb +35 -3
  133. data/lib/active_support/test_case.rb +52 -19
  134. data/lib/active_support/testing/assertions.rb +1 -31
  135. data/lib/active_support/testing/autorun.rb +2 -2
  136. data/lib/active_support/testing/constant_lookup.rb +1 -5
  137. data/lib/active_support/testing/declarative.rb +7 -21
  138. data/lib/active_support/testing/isolation.rb +29 -69
  139. data/lib/active_support/testing/setup_and_teardown.rb +17 -2
  140. data/lib/active_support/testing/tagged_logging.rb +2 -2
  141. data/lib/active_support/testing/time_helpers.rb +134 -0
  142. data/lib/active_support/time.rb +0 -2
  143. data/lib/active_support/time_with_zone.rb +60 -40
  144. data/lib/active_support/values/time_zone.rb +101 -101
  145. data/lib/active_support/values/unicode_tables.dat +0 -0
  146. data/lib/active_support/version.rb +4 -7
  147. data/lib/active_support/xml_mini/jdom.rb +6 -5
  148. data/lib/active_support/xml_mini/libxml.rb +1 -3
  149. data/lib/active_support/xml_mini/libxmlsax.rb +1 -4
  150. data/lib/active_support/xml_mini/nokogiri.rb +1 -3
  151. data/lib/active_support/xml_mini/nokogirisax.rb +1 -3
  152. data/lib/active_support/xml_mini/rexml.rb +7 -8
  153. data/lib/active_support/xml_mini.rb +33 -15
  154. data/lib/active_support.rb +27 -2
  155. metadata +43 -43
  156. data/lib/active_support/basic_object.rb +0 -11
  157. data/lib/active_support/buffered_logger.rb +0 -21
  158. data/lib/active_support/core_ext/array/uniq_by.rb +0 -19
  159. data/lib/active_support/core_ext/hash/diff.rb +0 -14
  160. data/lib/active_support/core_ext/logger.rb +0 -67
  161. data/lib/active_support/core_ext/object/to_json.rb +0 -27
  162. data/lib/active_support/core_ext/proc.rb +0 -17
  163. data/lib/active_support/core_ext/string/encoding.rb +0 -8
  164. data/lib/active_support/file_watcher.rb +0 -36
  165. data/lib/active_support/json/variable.rb +0 -18
  166. data/lib/active_support/testing/pending.rb +0 -14
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.13
4
+ version: 4.2.11.3
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: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2020-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -16,76 +16,62 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.6'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 0.6.9
19
+ version: '0.7'
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
- version: '0.6'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.6.9
33
- - !ruby/object:Gem::Dependency
34
- name: multi_json
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.3'
40
- type: :runtime
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '1.3'
26
+ version: '0.7'
47
27
  - !ruby/object:Gem::Dependency
48
28
  name: tzinfo
49
29
  requirement: !ruby/object:Gem::Requirement
50
30
  requirements:
51
31
  - - "~>"
52
32
  - !ruby/object:Gem::Version
53
- version: 0.3.37
33
+ version: '1.1'
54
34
  type: :runtime
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
37
  requirements:
58
38
  - - "~>"
59
39
  - !ruby/object:Gem::Version
60
- version: 0.3.37
40
+ version: '1.1'
61
41
  - !ruby/object:Gem::Dependency
62
42
  name: minitest
63
43
  requirement: !ruby/object:Gem::Requirement
64
44
  requirements:
65
45
  - - "~>"
66
46
  - !ruby/object:Gem::Version
67
- version: '4.2'
47
+ version: '5.1'
68
48
  type: :runtime
69
49
  prerelease: false
70
50
  version_requirements: !ruby/object:Gem::Requirement
71
51
  requirements:
72
52
  - - "~>"
73
53
  - !ruby/object:Gem::Version
74
- version: '4.2'
54
+ version: '5.1'
75
55
  - !ruby/object:Gem::Dependency
76
56
  name: thread_safe
77
57
  requirement: !ruby/object:Gem::Requirement
78
58
  requirements:
79
59
  - - "~>"
80
60
  - !ruby/object:Gem::Version
81
- version: '0.1'
61
+ version: '0.3'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.3.4
82
65
  type: :runtime
83
66
  prerelease: false
84
67
  version_requirements: !ruby/object:Gem::Requirement
85
68
  requirements:
86
69
  - - "~>"
87
70
  - !ruby/object:Gem::Version
88
- version: '0.1'
71
+ version: '0.3'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.3.4
89
75
  description: A toolkit of support libraries and Ruby core extensions extracted from
90
76
  the Rails framework. Rich support for multibyte strings, internationalization, time
91
77
  zones, and testing.
@@ -100,9 +86,7 @@ files:
100
86
  - lib/active_support.rb
101
87
  - lib/active_support/all.rb
102
88
  - lib/active_support/backtrace_cleaner.rb
103
- - lib/active_support/basic_object.rb
104
89
  - lib/active_support/benchmarkable.rb
105
- - lib/active_support/buffered_logger.rb
106
90
  - lib/active_support/builder.rb
107
91
  - lib/active_support/cache.rb
108
92
  - lib/active_support/cache/file_store.rb
@@ -110,6 +94,7 @@ files:
110
94
  - lib/active_support/cache/memory_store.rb
111
95
  - lib/active_support/cache/null_store.rb
112
96
  - lib/active_support/cache/strategy/local_cache.rb
97
+ - lib/active_support/cache/strategy/local_cache_middleware.rb
113
98
  - lib/active_support/callbacks.rb
114
99
  - lib/active_support/concern.rb
115
100
  - lib/active_support/concurrency/latch.rb
@@ -121,11 +106,11 @@ files:
121
106
  - lib/active_support/core_ext/array/extract_options.rb
122
107
  - lib/active_support/core_ext/array/grouping.rb
123
108
  - lib/active_support/core_ext/array/prepend_and_append.rb
124
- - lib/active_support/core_ext/array/uniq_by.rb
125
109
  - lib/active_support/core_ext/array/wrap.rb
126
110
  - lib/active_support/core_ext/benchmark.rb
127
111
  - lib/active_support/core_ext/big_decimal.rb
128
112
  - lib/active_support/core_ext/big_decimal/conversions.rb
113
+ - lib/active_support/core_ext/big_decimal/yaml_conversions.rb
129
114
  - lib/active_support/core_ext/class.rb
130
115
  - lib/active_support/core_ext/class/attribute.rb
131
116
  - lib/active_support/core_ext/class/attribute_accessors.rb
@@ -137,43 +122,50 @@ files:
137
122
  - lib/active_support/core_ext/date/conversions.rb
138
123
  - lib/active_support/core_ext/date/zones.rb
139
124
  - lib/active_support/core_ext/date_and_time/calculations.rb
125
+ - lib/active_support/core_ext/date_and_time/compatibility.rb
126
+ - lib/active_support/core_ext/date_and_time/zones.rb
140
127
  - lib/active_support/core_ext/date_time.rb
141
128
  - lib/active_support/core_ext/date_time/acts_like.rb
142
129
  - lib/active_support/core_ext/date_time/calculations.rb
130
+ - lib/active_support/core_ext/date_time/compatibility.rb
143
131
  - lib/active_support/core_ext/date_time/conversions.rb
144
132
  - lib/active_support/core_ext/date_time/zones.rb
133
+ - lib/active_support/core_ext/digest/uuid.rb
145
134
  - lib/active_support/core_ext/enumerable.rb
146
135
  - lib/active_support/core_ext/file.rb
147
136
  - lib/active_support/core_ext/file/atomic.rb
148
137
  - lib/active_support/core_ext/hash.rb
138
+ - lib/active_support/core_ext/hash/compact.rb
149
139
  - lib/active_support/core_ext/hash/conversions.rb
150
140
  - lib/active_support/core_ext/hash/deep_merge.rb
151
- - lib/active_support/core_ext/hash/diff.rb
152
141
  - lib/active_support/core_ext/hash/except.rb
153
142
  - lib/active_support/core_ext/hash/indifferent_access.rb
154
143
  - lib/active_support/core_ext/hash/keys.rb
155
144
  - lib/active_support/core_ext/hash/reverse_merge.rb
156
145
  - lib/active_support/core_ext/hash/slice.rb
146
+ - lib/active_support/core_ext/hash/transform_values.rb
157
147
  - lib/active_support/core_ext/integer.rb
158
148
  - lib/active_support/core_ext/integer/inflections.rb
159
149
  - lib/active_support/core_ext/integer/multiple.rb
160
150
  - lib/active_support/core_ext/integer/time.rb
161
151
  - lib/active_support/core_ext/kernel.rb
162
152
  - lib/active_support/core_ext/kernel/agnostics.rb
153
+ - lib/active_support/core_ext/kernel/concern.rb
163
154
  - lib/active_support/core_ext/kernel/debugger.rb
164
155
  - lib/active_support/core_ext/kernel/reporting.rb
165
156
  - lib/active_support/core_ext/kernel/singleton_class.rb
166
157
  - lib/active_support/core_ext/load_error.rb
167
- - lib/active_support/core_ext/logger.rb
168
158
  - lib/active_support/core_ext/marshal.rb
169
159
  - lib/active_support/core_ext/module.rb
170
160
  - lib/active_support/core_ext/module/aliasing.rb
171
161
  - lib/active_support/core_ext/module/anonymous.rb
172
162
  - lib/active_support/core_ext/module/attr_internal.rb
173
163
  - lib/active_support/core_ext/module/attribute_accessors.rb
164
+ - lib/active_support/core_ext/module/concerning.rb
174
165
  - lib/active_support/core_ext/module/delegation.rb
175
166
  - lib/active_support/core_ext/module/deprecation.rb
176
167
  - lib/active_support/core_ext/module/introspection.rb
168
+ - lib/active_support/core_ext/module/method_transplanting.rb
177
169
  - lib/active_support/core_ext/module/qualified_const.rb
178
170
  - lib/active_support/core_ext/module/reachable.rb
179
171
  - lib/active_support/core_ext/module/remove_method.rb
@@ -190,12 +182,12 @@ files:
190
182
  - lib/active_support/core_ext/object/duplicable.rb
191
183
  - lib/active_support/core_ext/object/inclusion.rb
192
184
  - lib/active_support/core_ext/object/instance_variables.rb
193
- - lib/active_support/core_ext/object/to_json.rb
185
+ - lib/active_support/core_ext/object/itself.rb
186
+ - lib/active_support/core_ext/object/json.rb
194
187
  - lib/active_support/core_ext/object/to_param.rb
195
188
  - lib/active_support/core_ext/object/to_query.rb
196
189
  - lib/active_support/core_ext/object/try.rb
197
190
  - lib/active_support/core_ext/object/with_options.rb
198
- - lib/active_support/core_ext/proc.rb
199
191
  - lib/active_support/core_ext/range.rb
200
192
  - lib/active_support/core_ext/range/conversions.rb
201
193
  - lib/active_support/core_ext/range/each.rb
@@ -206,7 +198,6 @@ files:
206
198
  - lib/active_support/core_ext/string/access.rb
207
199
  - lib/active_support/core_ext/string/behavior.rb
208
200
  - lib/active_support/core_ext/string/conversions.rb
209
- - lib/active_support/core_ext/string/encoding.rb
210
201
  - lib/active_support/core_ext/string/exclude.rb
211
202
  - lib/active_support/core_ext/string/filters.rb
212
203
  - lib/active_support/core_ext/string/indent.rb
@@ -222,6 +213,7 @@ files:
222
213
  - lib/active_support/core_ext/time.rb
223
214
  - lib/active_support/core_ext/time/acts_like.rb
224
215
  - lib/active_support/core_ext/time/calculations.rb
216
+ - lib/active_support/core_ext/time/compatibility.rb
225
217
  - lib/active_support/core_ext/time/conversions.rb
226
218
  - lib/active_support/core_ext/time/marshal.rb
227
219
  - lib/active_support/core_ext/time/zones.rb
@@ -237,7 +229,7 @@ files:
237
229
  - lib/active_support/descendants_tracker.rb
238
230
  - lib/active_support/duration.rb
239
231
  - lib/active_support/file_update_checker.rb
240
- - lib/active_support/file_watcher.rb
232
+ - lib/active_support/gem_version.rb
241
233
  - lib/active_support/gzip.rb
242
234
  - lib/active_support/hash_with_indifferent_access.rb
243
235
  - lib/active_support/i18n.rb
@@ -250,7 +242,6 @@ files:
250
242
  - lib/active_support/json.rb
251
243
  - lib/active_support/json/decoding.rb
252
244
  - lib/active_support/json/encoding.rb
253
- - lib/active_support/json/variable.rb
254
245
  - lib/active_support/key_generator.rb
255
246
  - lib/active_support/lazy_load_hooks.rb
256
247
  - lib/active_support/locale/en.yml
@@ -258,6 +249,7 @@ files:
258
249
  - lib/active_support/log_subscriber/test_helper.rb
259
250
  - lib/active_support/logger.rb
260
251
  - lib/active_support/logger_silence.rb
252
+ - lib/active_support/logger_thread_safe_level.rb
261
253
  - lib/active_support/message_encryptor.rb
262
254
  - lib/active_support/message_verifier.rb
263
255
  - lib/active_support/multibyte.rb
@@ -267,6 +259,14 @@ files:
267
259
  - lib/active_support/notifications/fanout.rb
268
260
  - lib/active_support/notifications/instrumenter.rb
269
261
  - lib/active_support/number_helper.rb
262
+ - lib/active_support/number_helper/number_converter.rb
263
+ - lib/active_support/number_helper/number_to_currency_converter.rb
264
+ - lib/active_support/number_helper/number_to_delimited_converter.rb
265
+ - lib/active_support/number_helper/number_to_human_converter.rb
266
+ - lib/active_support/number_helper/number_to_human_size_converter.rb
267
+ - lib/active_support/number_helper/number_to_percentage_converter.rb
268
+ - lib/active_support/number_helper/number_to_phone_converter.rb
269
+ - lib/active_support/number_helper/number_to_rounded_converter.rb
270
270
  - lib/active_support/option_merger.rb
271
271
  - lib/active_support/ordered_hash.rb
272
272
  - lib/active_support/ordered_options.rb
@@ -275,6 +275,7 @@ files:
275
275
  - lib/active_support/rails.rb
276
276
  - lib/active_support/railtie.rb
277
277
  - lib/active_support/rescuable.rb
278
+ - lib/active_support/security_utils.rb
278
279
  - lib/active_support/string_inquirer.rb
279
280
  - lib/active_support/subscriber.rb
280
281
  - lib/active_support/tagged_logging.rb
@@ -285,9 +286,9 @@ files:
285
286
  - lib/active_support/testing/declarative.rb
286
287
  - lib/active_support/testing/deprecation.rb
287
288
  - lib/active_support/testing/isolation.rb
288
- - lib/active_support/testing/pending.rb
289
289
  - lib/active_support/testing/setup_and_teardown.rb
290
290
  - lib/active_support/testing/tagged_logging.rb
291
+ - lib/active_support/testing/time_helpers.rb
291
292
  - lib/active_support/time.rb
292
293
  - lib/active_support/time_with_zone.rb
293
294
  - lib/active_support/values/time_zone.rb
@@ -321,8 +322,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
321
322
  - !ruby/object:Gem::Version
322
323
  version: '0'
323
324
  requirements: []
324
- rubyforge_project:
325
- rubygems_version: 2.4.5
325
+ rubygems_version: 3.0.3
326
326
  signing_key:
327
327
  specification_version: 4
328
328
  summary: A toolkit of support libraries and Ruby core extensions extracted from the
@@ -1,11 +0,0 @@
1
- require 'active_support/deprecation'
2
- require 'active_support/proxy_object'
3
-
4
- module ActiveSupport
5
- class BasicObject < ProxyObject # :nodoc:
6
- def self.inherited(*)
7
- ::ActiveSupport::Deprecation.warn 'ActiveSupport::BasicObject is deprecated! Use ActiveSupport::ProxyObject instead.'
8
- super
9
- end
10
- end
11
- end
@@ -1,21 +0,0 @@
1
- require 'active_support/deprecation'
2
- require 'active_support/logger'
3
-
4
- module ActiveSupport
5
- class BufferedLogger < Logger
6
-
7
- def initialize(*args)
8
- self.class._deprecation_warning
9
- super
10
- end
11
-
12
- def self.inherited(*)
13
- _deprecation_warning
14
- super
15
- end
16
-
17
- def self._deprecation_warning
18
- ::ActiveSupport::Deprecation.warn 'ActiveSupport::BufferedLogger is deprecated! Use ActiveSupport::Logger instead.'
19
- end
20
- end
21
- end
@@ -1,19 +0,0 @@
1
- class Array
2
- # *DEPRECATED*: Use <tt>Array#uniq</tt> instead.
3
- #
4
- # Returns a unique array based on the criteria in the block.
5
- #
6
- # [1, 2, 3, 4].uniq_by { |i| i.odd? } # => [1, 2]
7
- def uniq_by(&block)
8
- ActiveSupport::Deprecation.warn 'uniq_by is deprecated. Use Array#uniq instead'
9
- uniq(&block)
10
- end
11
-
12
- # *DEPRECATED*: Use <tt>Array#uniq!</tt> instead.
13
- #
14
- # Same as +uniq_by+, but modifies +self+.
15
- def uniq_by!(&block)
16
- ActiveSupport::Deprecation.warn 'uniq_by! is deprecated. Use Array#uniq! instead'
17
- uniq!(&block)
18
- end
19
- end
@@ -1,14 +0,0 @@
1
- class Hash
2
- # Returns a hash that represents the difference between two hashes.
3
- #
4
- # {1 => 2}.diff(1 => 2) # => {}
5
- # {1 => 2}.diff(1 => 3) # => {1 => 2}
6
- # {}.diff(1 => 2) # => {1 => 2}
7
- # {1 => 2, 3 => 4}.diff(1 => 2) # => {3 => 4}
8
- def diff(other)
9
- ActiveSupport::Deprecation.warn "Hash#diff is no longer used inside of Rails, and is being deprecated with no replacement. If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead."
10
- dup.
11
- delete_if { |k, v| other[k] == v }.
12
- merge!(other.dup.delete_if { |k, v| has_key?(k) })
13
- end
14
- end
@@ -1,67 +0,0 @@
1
- require 'active_support/core_ext/class/attribute_accessors'
2
- require 'active_support/deprecation'
3
- require 'active_support/logger_silence'
4
-
5
- ActiveSupport::Deprecation.warn 'this file is deprecated and will be removed'
6
-
7
- # Adds the 'around_level' method to Logger.
8
- class Logger #:nodoc:
9
- def self.define_around_helper(level)
10
- module_eval <<-end_eval, __FILE__, __LINE__ + 1
11
- def around_#{level}(before_message, after_message) # def around_debug(before_message, after_message, &block)
12
- self.#{level}(before_message) # self.debug(before_message)
13
- return_value = yield(self) # return_value = yield(self)
14
- self.#{level}(after_message) # self.debug(after_message)
15
- return_value # return_value
16
- end # end
17
- end_eval
18
- end
19
- [:debug, :info, :error, :fatal].each {|level| define_around_helper(level) }
20
- end
21
-
22
- require 'logger'
23
-
24
- # Extensions to the built-in Ruby logger.
25
- #
26
- # If you want to use the default log formatter as defined in the Ruby core, then you
27
- # will need to set the formatter for the logger as in:
28
- #
29
- # logger.formatter = Formatter.new
30
- #
31
- # You can then specify the datetime format, for example:
32
- #
33
- # logger.datetime_format = "%Y-%m-%d"
34
- #
35
- # Note: This logger is deprecated in favor of ActiveSupport::Logger
36
- class Logger
37
- include LoggerSilence
38
-
39
- alias :old_datetime_format= :datetime_format=
40
- # Logging date-time format (string passed to +strftime+). Ignored if the formatter
41
- # does not respond to datetime_format=.
42
- def datetime_format=(format)
43
- formatter.datetime_format = format if formatter.respond_to?(:datetime_format=)
44
- end
45
-
46
- alias :old_datetime_format :datetime_format
47
- # Get the logging datetime format. Returns nil if the formatter does not support
48
- # datetime formatting.
49
- def datetime_format
50
- formatter.datetime_format if formatter.respond_to?(:datetime_format)
51
- end
52
-
53
- alias :old_initialize :initialize
54
- # Overwrite initialize to set a default formatter.
55
- def initialize(*args)
56
- old_initialize(*args)
57
- self.formatter = SimpleFormatter.new
58
- end
59
-
60
- # Simple formatter which only displays the message.
61
- class SimpleFormatter < Logger::Formatter
62
- # This method is invoked when a log event occurs
63
- def call(severity, timestamp, progname, msg)
64
- "#{String === msg ? msg : msg.inspect}\n"
65
- end
66
- end
67
- end
@@ -1,27 +0,0 @@
1
- # Hack to load json gem first so we can overwrite its to_json.
2
- begin
3
- require 'json'
4
- rescue LoadError
5
- end
6
-
7
- # The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting
8
- # their default behavior. That said, we need to define the basic to_json method in all of them,
9
- # otherwise they will always use to_json gem implementation, which is backwards incompatible in
10
- # several cases (for instance, the JSON implementation for Hash does not work) with inheritance
11
- # and consequently classes as ActiveSupport::OrderedHash cannot be serialized to json.
12
- [Object, Array, FalseClass, Float, Hash, Integer, NilClass, String, TrueClass].each do |klass|
13
- klass.class_eval do
14
- # Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
15
- def to_json(options = nil)
16
- ActiveSupport::JSON.encode(self, options)
17
- end
18
- end
19
- end
20
-
21
- module Process
22
- class Status
23
- def as_json(options = nil)
24
- { :exitstatus => exitstatus, :pid => pid }
25
- end
26
- end
27
- end
@@ -1,17 +0,0 @@
1
- require "active_support/core_ext/kernel/singleton_class"
2
- require "active_support/deprecation"
3
-
4
- class Proc #:nodoc:
5
- def bind(object)
6
- ActiveSupport::Deprecation.warn 'Proc#bind is deprecated and will be removed in future versions'
7
-
8
- block, time = self, Time.now
9
- object.class_eval do
10
- method_name = "__bind_#{time.to_i}_#{time.usec}"
11
- define_method(method_name, &block)
12
- method = instance_method(method_name)
13
- remove_method(method_name)
14
- method
15
- end.bind(object)
16
- end
17
- end
@@ -1,8 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- class String
4
- def encoding_aware?
5
- ActiveSupport::Deprecation.warn 'String#encoding_aware? is deprecated'
6
- true
7
- end
8
- end
@@ -1,36 +0,0 @@
1
- module ActiveSupport
2
- class FileWatcher
3
- class Backend
4
- def initialize(path, watcher)
5
- @watcher = watcher
6
- @path = path
7
- end
8
-
9
- def trigger(files)
10
- @watcher.trigger(files)
11
- end
12
- end
13
-
14
- def initialize
15
- @regex_matchers = {}
16
- end
17
-
18
- def watch(pattern, &block)
19
- @regex_matchers[pattern] = block
20
- end
21
-
22
- def trigger(files)
23
- trigger_files = Hash.new { |h,k| h[k] = Hash.new { |h2,k2| h2[k2] = [] } }
24
-
25
- files.each do |file, state|
26
- @regex_matchers.each do |pattern, block|
27
- trigger_files[block][state] << file if pattern === file
28
- end
29
- end
30
-
31
- trigger_files.each do |block, payload|
32
- block.call payload
33
- end
34
- end
35
- end
36
- end
@@ -1,18 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- module ActiveSupport
4
- module JSON
5
- # Deprecated: A string that returns itself as its JSON-encoded form.
6
- class Variable < String
7
- def initialize(*args)
8
- message = 'ActiveSupport::JSON::Variable is deprecated and will be removed in Rails 4.1. ' \
9
- 'For your own custom JSON literals, define #as_json and #encode_json yourself.'
10
- ActiveSupport::Deprecation.warn message
11
- super
12
- end
13
-
14
- def as_json(options = nil) self end #:nodoc:
15
- def encode_json(encoder) self end #:nodoc:
16
- end
17
- end
18
- end
@@ -1,14 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- module ActiveSupport
4
- module Testing
5
- module Pending # :nodoc:
6
- unless defined?(Spec)
7
- def pending(description = "", &block)
8
- ActiveSupport::Deprecation.warn("#pending is deprecated and will be removed in Rails 4.1, please use #skip instead.")
9
- skip(description.blank? ? nil : description)
10
- end
11
- end
12
- end
13
- end
14
- end