activesupport 4.0.12 → 7.0.2.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.

Files changed (295) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +249 -501
  3. data/MIT-LICENSE +2 -2
  4. data/README.rdoc +10 -5
  5. data/lib/active_support/actionable_error.rb +48 -0
  6. data/lib/active_support/all.rb +5 -3
  7. data/lib/active_support/array_inquirer.rb +48 -0
  8. data/lib/active_support/backtrace_cleaner.rb +41 -13
  9. data/lib/active_support/benchmarkable.rb +7 -15
  10. data/lib/active_support/builder.rb +3 -1
  11. data/lib/active_support/cache/file_store.rb +96 -74
  12. data/lib/active_support/cache/mem_cache_store.rb +211 -103
  13. data/lib/active_support/cache/memory_store.rb +90 -58
  14. data/lib/active_support/cache/null_store.rb +19 -7
  15. data/lib/active_support/cache/redis_cache_store.rb +468 -0
  16. data/lib/active_support/cache/strategy/local_cache.rb +86 -83
  17. data/lib/active_support/cache/strategy/local_cache_middleware.rb +45 -0
  18. data/lib/active_support/cache.rb +580 -241
  19. data/lib/active_support/callbacks.rb +812 -425
  20. data/lib/active_support/code_generator.rb +65 -0
  21. data/lib/active_support/concern.rb +103 -14
  22. data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +33 -0
  23. data/lib/active_support/concurrency/share_lock.rb +226 -0
  24. data/lib/active_support/configurable.rb +21 -19
  25. data/lib/active_support/configuration_file.rb +51 -0
  26. data/lib/active_support/core_ext/array/access.rb +47 -1
  27. data/lib/active_support/core_ext/array/conversions.rb +35 -44
  28. data/lib/active_support/core_ext/array/deprecated_conversions.rb +25 -0
  29. data/lib/active_support/core_ext/array/extract.rb +21 -0
  30. data/lib/active_support/core_ext/array/extract_options.rb +2 -0
  31. data/lib/active_support/core_ext/array/grouping.rb +26 -16
  32. data/lib/active_support/core_ext/array/inquiry.rb +19 -0
  33. data/lib/active_support/core_ext/array/wrap.rb +7 -4
  34. data/lib/active_support/core_ext/array.rb +10 -7
  35. data/lib/active_support/core_ext/benchmark.rb +5 -3
  36. data/lib/active_support/core_ext/big_decimal/conversions.rb +9 -26
  37. data/lib/active_support/core_ext/big_decimal.rb +3 -1
  38. data/lib/active_support/core_ext/class/attribute.rb +52 -49
  39. data/lib/active_support/core_ext/class/attribute_accessors.rb +5 -169
  40. data/lib/active_support/core_ext/class/subclasses.rb +25 -26
  41. data/lib/active_support/core_ext/class.rb +4 -4
  42. data/lib/active_support/core_ext/date/acts_like.rb +3 -1
  43. data/lib/active_support/core_ext/date/blank.rb +14 -0
  44. data/lib/active_support/core_ext/date/calculations.rb +31 -18
  45. data/lib/active_support/core_ext/date/conversions.rb +43 -32
  46. data/lib/active_support/core_ext/date/deprecated_conversions.rb +26 -0
  47. data/lib/active_support/core_ext/date/zones.rb +5 -34
  48. data/lib/active_support/core_ext/date.rb +7 -4
  49. data/lib/active_support/core_ext/date_and_time/calculations.rb +198 -66
  50. data/lib/active_support/core_ext/date_and_time/compatibility.rb +31 -0
  51. data/lib/active_support/core_ext/date_and_time/zones.rb +40 -0
  52. data/lib/active_support/core_ext/date_time/acts_like.rb +4 -2
  53. data/lib/active_support/core_ext/date_time/blank.rb +14 -0
  54. data/lib/active_support/core_ext/date_time/calculations.rb +79 -38
  55. data/lib/active_support/core_ext/date_time/compatibility.rb +18 -0
  56. data/lib/active_support/core_ext/date_time/conversions.rb +31 -26
  57. data/lib/active_support/core_ext/date_time/deprecated_conversions.rb +22 -0
  58. data/lib/active_support/core_ext/date_time.rb +8 -4
  59. data/lib/active_support/core_ext/digest/uuid.rb +79 -0
  60. data/lib/active_support/core_ext/digest.rb +3 -0
  61. data/lib/active_support/core_ext/enumerable.rb +249 -17
  62. data/lib/active_support/core_ext/file/atomic.rb +41 -32
  63. data/lib/active_support/core_ext/file.rb +3 -1
  64. data/lib/active_support/core_ext/hash/conversions.rb +71 -49
  65. data/lib/active_support/core_ext/hash/deep_merge.rb +9 -13
  66. data/lib/active_support/core_ext/hash/deep_transform_values.rb +46 -0
  67. data/lib/active_support/core_ext/hash/except.rb +14 -5
  68. data/lib/active_support/core_ext/hash/indifferent_access.rb +5 -3
  69. data/lib/active_support/core_ext/hash/keys.rb +39 -56
  70. data/lib/active_support/core_ext/hash/reverse_merge.rb +5 -2
  71. data/lib/active_support/core_ext/hash/slice.rb +8 -23
  72. data/lib/active_support/core_ext/hash.rb +10 -8
  73. data/lib/active_support/core_ext/integer/inflections.rb +3 -1
  74. data/lib/active_support/core_ext/integer/multiple.rb +3 -1
  75. data/lib/active_support/core_ext/integer/time.rb +11 -33
  76. data/lib/active_support/core_ext/integer.rb +5 -3
  77. data/lib/active_support/core_ext/kernel/concern.rb +14 -0
  78. data/lib/active_support/core_ext/kernel/reporting.rb +9 -78
  79. data/lib/active_support/core_ext/kernel/singleton_class.rb +2 -0
  80. data/lib/active_support/core_ext/kernel.rb +5 -4
  81. data/lib/active_support/core_ext/load_error.rb +5 -21
  82. data/lib/active_support/core_ext/module/aliasing.rb +6 -44
  83. data/lib/active_support/core_ext/module/anonymous.rb +12 -1
  84. data/lib/active_support/core_ext/module/attr_internal.rb +8 -8
  85. data/lib/active_support/core_ext/module/attribute_accessors.rb +186 -44
  86. data/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +157 -0
  87. data/lib/active_support/core_ext/module/concerning.rb +140 -0
  88. data/lib/active_support/core_ext/module/delegation.rb +172 -45
  89. data/lib/active_support/core_ext/module/deprecation.rb +3 -3
  90. data/lib/active_support/core_ext/module/introspection.rb +23 -38
  91. data/lib/active_support/core_ext/module/redefine_method.rb +40 -0
  92. data/lib/active_support/core_ext/module/remove_method.rb +8 -3
  93. data/lib/active_support/core_ext/module.rb +13 -10
  94. data/lib/active_support/core_ext/name_error.rb +45 -4
  95. data/lib/active_support/core_ext/numeric/bytes.rb +22 -0
  96. data/lib/active_support/core_ext/numeric/conversions.rb +135 -127
  97. data/lib/active_support/core_ext/numeric/deprecated_conversions.rb +60 -0
  98. data/lib/active_support/core_ext/numeric/time.rb +37 -50
  99. data/lib/active_support/core_ext/numeric.rb +6 -3
  100. data/lib/active_support/core_ext/object/acts_like.rb +41 -6
  101. data/lib/active_support/core_ext/object/blank.rb +70 -20
  102. data/lib/active_support/core_ext/object/conversions.rb +6 -4
  103. data/lib/active_support/core_ext/object/deep_dup.rb +19 -10
  104. data/lib/active_support/core_ext/object/duplicable.rb +17 -47
  105. data/lib/active_support/core_ext/object/inclusion.rb +18 -15
  106. data/lib/active_support/core_ext/object/instance_variables.rb +3 -1
  107. data/lib/active_support/core_ext/object/json.rb +244 -0
  108. data/lib/active_support/core_ext/object/to_param.rb +3 -1
  109. data/lib/active_support/core_ext/object/to_query.rb +21 -8
  110. data/lib/active_support/core_ext/object/try.rb +106 -26
  111. data/lib/active_support/core_ext/object/with_options.rb +64 -5
  112. data/lib/active_support/core_ext/object.rb +14 -12
  113. data/lib/active_support/core_ext/pathname/existence.rb +21 -0
  114. data/lib/active_support/core_ext/pathname.rb +3 -0
  115. data/lib/active_support/core_ext/range/compare_range.rb +57 -0
  116. data/lib/active_support/core_ext/range/conversions.rb +37 -15
  117. data/lib/active_support/core_ext/range/deprecated_conversions.rb +26 -0
  118. data/lib/active_support/core_ext/range/each.rb +18 -17
  119. data/lib/active_support/core_ext/range/include_time_with_zone.rb +7 -0
  120. data/lib/active_support/core_ext/range/overlaps.rb +2 -0
  121. data/lib/active_support/core_ext/range.rb +7 -4
  122. data/lib/active_support/core_ext/regexp.rb +10 -1
  123. data/lib/active_support/core_ext/securerandom.rb +45 -0
  124. data/lib/active_support/core_ext/string/access.rb +42 -51
  125. data/lib/active_support/core_ext/string/behavior.rb +3 -1
  126. data/lib/active_support/core_ext/string/conversions.rb +18 -13
  127. data/lib/active_support/core_ext/string/exclude.rb +5 -3
  128. data/lib/active_support/core_ext/string/filters.rb +97 -7
  129. data/lib/active_support/core_ext/string/indent.rb +6 -4
  130. data/lib/active_support/core_ext/string/inflections.rb +106 -25
  131. data/lib/active_support/core_ext/string/inquiry.rb +4 -1
  132. data/lib/active_support/core_ext/string/multibyte.rb +18 -9
  133. data/lib/active_support/core_ext/string/output_safety.rb +227 -54
  134. data/lib/active_support/core_ext/string/starts_ends_with.rb +4 -2
  135. data/lib/active_support/core_ext/string/strip.rb +6 -5
  136. data/lib/active_support/core_ext/string/zones.rb +4 -1
  137. data/lib/active_support/core_ext/string.rb +15 -13
  138. data/lib/active_support/core_ext/symbol/starts_ends_with.rb +6 -0
  139. data/lib/active_support/core_ext/symbol.rb +3 -0
  140. data/lib/active_support/core_ext/time/acts_like.rb +3 -1
  141. data/lib/active_support/core_ext/time/calculations.rb +178 -116
  142. data/lib/active_support/core_ext/time/compatibility.rb +16 -0
  143. data/lib/active_support/core_ext/time/conversions.rb +37 -25
  144. data/lib/active_support/core_ext/time/deprecated_conversions.rb +22 -0
  145. data/lib/active_support/core_ext/time/zones.rb +44 -42
  146. data/lib/active_support/core_ext/time.rb +8 -5
  147. data/lib/active_support/core_ext/uri.rb +4 -25
  148. data/lib/active_support/core_ext.rb +4 -2
  149. data/lib/active_support/current_attributes/test_helper.rb +13 -0
  150. data/lib/active_support/current_attributes.rb +226 -0
  151. data/lib/active_support/dependencies/autoload.rb +3 -1
  152. data/lib/active_support/dependencies/interlock.rb +49 -0
  153. data/lib/active_support/dependencies/require_dependency.rb +28 -0
  154. data/lib/active_support/dependencies.rb +71 -696
  155. data/lib/active_support/deprecation/behaviors.rb +65 -16
  156. data/lib/active_support/deprecation/constant_accessor.rb +52 -0
  157. data/lib/active_support/deprecation/disallowed.rb +56 -0
  158. data/lib/active_support/deprecation/instance_delegator.rb +16 -2
  159. data/lib/active_support/deprecation/method_wrappers.rb +62 -21
  160. data/lib/active_support/deprecation/proxy_wrappers.rb +82 -31
  161. data/lib/active_support/deprecation/reporting.rb +81 -18
  162. data/lib/active_support/deprecation.rb +19 -11
  163. data/lib/active_support/descendants_tracker.rb +192 -34
  164. data/lib/active_support/digest.rb +22 -0
  165. data/lib/active_support/duration/iso8601_parser.rb +123 -0
  166. data/lib/active_support/duration/iso8601_serializer.rb +67 -0
  167. data/lib/active_support/duration.rb +437 -39
  168. data/lib/active_support/encrypted_configuration.rb +56 -0
  169. data/lib/active_support/encrypted_file.rb +117 -0
  170. data/lib/active_support/environment_inquirer.rb +20 -0
  171. data/lib/active_support/error_reporter.rb +117 -0
  172. data/lib/active_support/evented_file_update_checker.rb +170 -0
  173. data/lib/active_support/execution_context/test_helper.rb +13 -0
  174. data/lib/active_support/execution_context.rb +53 -0
  175. data/lib/active_support/execution_wrapper.rb +151 -0
  176. data/lib/active_support/executor/test_helper.rb +7 -0
  177. data/lib/active_support/executor.rb +8 -0
  178. data/lib/active_support/file_update_checker.rb +62 -37
  179. data/lib/active_support/fork_tracker.rb +71 -0
  180. data/lib/active_support/gem_version.rb +17 -0
  181. data/lib/active_support/gzip.rb +7 -5
  182. data/lib/active_support/hash_with_indifferent_access.rb +207 -54
  183. data/lib/active_support/html_safe_translation.rb +43 -0
  184. data/lib/active_support/i18n.rb +10 -6
  185. data/lib/active_support/i18n_railtie.rb +48 -19
  186. data/lib/active_support/inflections.rb +19 -12
  187. data/lib/active_support/inflector/inflections.rb +97 -37
  188. data/lib/active_support/inflector/methods.rb +192 -157
  189. data/lib/active_support/inflector/transliterate.rb +83 -33
  190. data/lib/active_support/inflector.rb +7 -5
  191. data/lib/active_support/isolated_execution_state.rb +64 -0
  192. data/lib/active_support/json/decoding.rb +37 -42
  193. data/lib/active_support/json/encoding.rb +93 -293
  194. data/lib/active_support/json.rb +4 -2
  195. data/lib/active_support/key_generator.rb +30 -47
  196. data/lib/active_support/lazy_load_hooks.rb +54 -21
  197. data/lib/active_support/locale/en.rb +33 -0
  198. data/lib/active_support/locale/en.yml +10 -4
  199. data/lib/active_support/log_subscriber/test_helper.rb +14 -12
  200. data/lib/active_support/log_subscriber.rb +61 -18
  201. data/lib/active_support/logger.rb +40 -4
  202. data/lib/active_support/logger_silence.rb +17 -20
  203. data/lib/active_support/logger_thread_safe_level.rb +69 -0
  204. data/lib/active_support/message_encryptor.rb +178 -55
  205. data/lib/active_support/message_verifier.rb +195 -26
  206. data/lib/active_support/messages/metadata.rb +80 -0
  207. data/lib/active_support/messages/rotation_configuration.rb +23 -0
  208. data/lib/active_support/messages/rotator.rb +57 -0
  209. data/lib/active_support/multibyte/chars.rb +45 -92
  210. data/lib/active_support/multibyte/unicode.rb +44 -377
  211. data/lib/active_support/multibyte.rb +5 -3
  212. data/lib/active_support/notifications/fanout.rb +177 -44
  213. data/lib/active_support/notifications/instrumenter.rb +117 -17
  214. data/lib/active_support/notifications.rb +106 -39
  215. data/lib/active_support/number_helper/number_converter.rb +181 -0
  216. data/lib/active_support/number_helper/number_to_currency_converter.rb +46 -0
  217. data/lib/active_support/number_helper/number_to_delimited_converter.rb +30 -0
  218. data/lib/active_support/number_helper/number_to_human_converter.rb +69 -0
  219. data/lib/active_support/number_helper/number_to_human_size_converter.rb +60 -0
  220. data/lib/active_support/number_helper/number_to_percentage_converter.rb +16 -0
  221. data/lib/active_support/number_helper/number_to_phone_converter.rb +59 -0
  222. data/lib/active_support/number_helper/number_to_rounded_converter.rb +59 -0
  223. data/lib/active_support/number_helper/rounding_helper.rb +46 -0
  224. data/lib/active_support/number_helper.rb +152 -394
  225. data/lib/active_support/option_merger.rb +18 -5
  226. data/lib/active_support/ordered_hash.rb +8 -6
  227. data/lib/active_support/ordered_options.rb +43 -7
  228. data/lib/active_support/parameter_filter.rb +138 -0
  229. data/lib/active_support/per_thread_registry.rb +24 -11
  230. data/lib/active_support/proxy_object.rb +2 -0
  231. data/lib/active_support/rails.rb +10 -11
  232. data/lib/active_support/railtie.rb +118 -12
  233. data/lib/active_support/reloader.rb +130 -0
  234. data/lib/active_support/rescuable.rb +112 -57
  235. data/lib/active_support/ruby_features.rb +7 -0
  236. data/lib/active_support/secure_compare_rotator.rb +51 -0
  237. data/lib/active_support/security_utils.rb +38 -0
  238. data/lib/active_support/string_inquirer.rb +11 -4
  239. data/lib/active_support/subscriber.rb +109 -39
  240. data/lib/active_support/tagged_logging.rb +54 -17
  241. data/lib/active_support/test_case.rb +121 -37
  242. data/lib/active_support/testing/assertions.rb +177 -39
  243. data/lib/active_support/testing/autorun.rb +5 -3
  244. data/lib/active_support/testing/constant_lookup.rb +3 -6
  245. data/lib/active_support/testing/declarative.rb +10 -22
  246. data/lib/active_support/testing/deprecation.rb +65 -11
  247. data/lib/active_support/testing/file_fixtures.rb +38 -0
  248. data/lib/active_support/testing/isolation.rb +56 -87
  249. data/lib/active_support/testing/method_call_assertions.rb +70 -0
  250. data/lib/active_support/testing/parallelization/server.rb +82 -0
  251. data/lib/active_support/testing/parallelization/worker.rb +103 -0
  252. data/lib/active_support/testing/parallelization.rb +55 -0
  253. data/lib/active_support/testing/parallelize_executor.rb +76 -0
  254. data/lib/active_support/testing/setup_and_teardown.rb +30 -10
  255. data/lib/active_support/testing/stream.rb +41 -0
  256. data/lib/active_support/testing/tagged_logging.rb +6 -4
  257. data/lib/active_support/testing/time_helpers.rb +246 -0
  258. data/lib/active_support/time.rb +13 -13
  259. data/lib/active_support/time_with_zone.rb +315 -90
  260. data/lib/active_support/values/time_zone.rb +306 -135
  261. data/lib/active_support/version.rb +6 -7
  262. data/lib/active_support/xml_mini/jdom.rb +117 -115
  263. data/lib/active_support/xml_mini/libxml.rb +22 -21
  264. data/lib/active_support/xml_mini/libxmlsax.rb +17 -19
  265. data/lib/active_support/xml_mini/nokogiri.rb +19 -19
  266. data/lib/active_support/xml_mini/nokogirisax.rb +16 -17
  267. data/lib/active_support/xml_mini/rexml.rb +25 -17
  268. data/lib/active_support/xml_mini.rb +67 -56
  269. data/lib/active_support.rb +58 -3
  270. metadata +125 -66
  271. data/lib/active_support/basic_object.rb +0 -11
  272. data/lib/active_support/buffered_logger.rb +0 -21
  273. data/lib/active_support/concurrency/latch.rb +0 -27
  274. data/lib/active_support/core_ext/array/prepend_and_append.rb +0 -7
  275. data/lib/active_support/core_ext/array/uniq_by.rb +0 -19
  276. data/lib/active_support/core_ext/class/delegating_attributes.rb +0 -40
  277. data/lib/active_support/core_ext/date_time/zones.rb +0 -24
  278. data/lib/active_support/core_ext/hash/diff.rb +0 -14
  279. data/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
  280. data/lib/active_support/core_ext/kernel/debugger.rb +0 -10
  281. data/lib/active_support/core_ext/logger.rb +0 -67
  282. data/lib/active_support/core_ext/marshal.rb +0 -21
  283. data/lib/active_support/core_ext/module/qualified_const.rb +0 -52
  284. data/lib/active_support/core_ext/module/reachable.rb +0 -8
  285. data/lib/active_support/core_ext/object/to_json.rb +0 -27
  286. data/lib/active_support/core_ext/proc.rb +0 -17
  287. data/lib/active_support/core_ext/range/include_range.rb +0 -23
  288. data/lib/active_support/core_ext/string/encoding.rb +0 -8
  289. data/lib/active_support/core_ext/struct.rb +0 -6
  290. data/lib/active_support/core_ext/thread.rb +0 -79
  291. data/lib/active_support/core_ext/time/marshal.rb +0 -30
  292. data/lib/active_support/file_watcher.rb +0 -36
  293. data/lib/active_support/json/variable.rb +0 -18
  294. data/lib/active_support/testing/pending.rb +0 -14
  295. data/lib/active_support/values/unicode_tables.dat +0 -0
metadata CHANGED
@@ -1,91 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.12
4
+ version: 7.0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-16 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.6'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
- version: 0.6.9
19
+ version: '1.6'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '0.6'
30
27
  - - ">="
31
28
  - !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
- - - "~>"
29
+ version: '1.6'
30
+ - - "<"
38
31
  - !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'
32
+ version: '2'
47
33
  - !ruby/object:Gem::Dependency
48
34
  name: tzinfo
49
35
  requirement: !ruby/object:Gem::Requirement
50
36
  requirements:
51
37
  - - "~>"
52
38
  - !ruby/object:Gem::Version
53
- version: 0.3.37
39
+ version: '2.0'
54
40
  type: :runtime
55
41
  prerelease: false
56
42
  version_requirements: !ruby/object:Gem::Requirement
57
43
  requirements:
58
44
  - - "~>"
59
45
  - !ruby/object:Gem::Version
60
- version: 0.3.37
46
+ version: '2.0'
61
47
  - !ruby/object:Gem::Dependency
62
- name: minitest
48
+ name: concurrent-ruby
63
49
  requirement: !ruby/object:Gem::Requirement
64
50
  requirements:
65
51
  - - "~>"
66
52
  - !ruby/object:Gem::Version
67
- version: '4.2'
53
+ version: '1.0'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 1.0.2
68
57
  type: :runtime
69
58
  prerelease: false
70
59
  version_requirements: !ruby/object:Gem::Requirement
71
60
  requirements:
72
61
  - - "~>"
73
62
  - !ruby/object:Gem::Version
74
- version: '4.2'
63
+ version: '1.0'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 1.0.2
75
67
  - !ruby/object:Gem::Dependency
76
- name: thread_safe
68
+ name: minitest
77
69
  requirement: !ruby/object:Gem::Requirement
78
70
  requirements:
79
- - - "~>"
71
+ - - ">="
80
72
  - !ruby/object:Gem::Version
81
- version: '0.1'
73
+ version: '5.1'
82
74
  type: :runtime
83
75
  prerelease: false
84
76
  version_requirements: !ruby/object:Gem::Requirement
85
77
  requirements:
86
- - - "~>"
78
+ - - ">="
87
79
  - !ruby/object:Gem::Version
88
- version: '0.1'
80
+ version: '5.1'
89
81
  description: A toolkit of support libraries and Ruby core extensions extracted from
90
82
  the Rails framework. Rich support for multibyte strings, internationalization, time
91
83
  zones, and testing.
@@ -98,30 +90,36 @@ files:
98
90
  - MIT-LICENSE
99
91
  - README.rdoc
100
92
  - lib/active_support.rb
93
+ - lib/active_support/actionable_error.rb
101
94
  - lib/active_support/all.rb
95
+ - lib/active_support/array_inquirer.rb
102
96
  - lib/active_support/backtrace_cleaner.rb
103
- - lib/active_support/basic_object.rb
104
97
  - lib/active_support/benchmarkable.rb
105
- - lib/active_support/buffered_logger.rb
106
98
  - lib/active_support/builder.rb
107
99
  - lib/active_support/cache.rb
108
100
  - lib/active_support/cache/file_store.rb
109
101
  - lib/active_support/cache/mem_cache_store.rb
110
102
  - lib/active_support/cache/memory_store.rb
111
103
  - lib/active_support/cache/null_store.rb
104
+ - lib/active_support/cache/redis_cache_store.rb
112
105
  - lib/active_support/cache/strategy/local_cache.rb
106
+ - lib/active_support/cache/strategy/local_cache_middleware.rb
113
107
  - lib/active_support/callbacks.rb
108
+ - lib/active_support/code_generator.rb
114
109
  - lib/active_support/concern.rb
115
- - lib/active_support/concurrency/latch.rb
110
+ - lib/active_support/concurrency/load_interlock_aware_monitor.rb
111
+ - lib/active_support/concurrency/share_lock.rb
116
112
  - lib/active_support/configurable.rb
113
+ - lib/active_support/configuration_file.rb
117
114
  - lib/active_support/core_ext.rb
118
115
  - lib/active_support/core_ext/array.rb
119
116
  - lib/active_support/core_ext/array/access.rb
120
117
  - lib/active_support/core_ext/array/conversions.rb
118
+ - lib/active_support/core_ext/array/deprecated_conversions.rb
119
+ - lib/active_support/core_ext/array/extract.rb
121
120
  - lib/active_support/core_ext/array/extract_options.rb
122
121
  - lib/active_support/core_ext/array/grouping.rb
123
- - lib/active_support/core_ext/array/prepend_and_append.rb
124
- - lib/active_support/core_ext/array/uniq_by.rb
122
+ - lib/active_support/core_ext/array/inquiry.rb
125
123
  - lib/active_support/core_ext/array/wrap.rb
126
124
  - lib/active_support/core_ext/benchmark.rb
127
125
  - lib/active_support/core_ext/big_decimal.rb
@@ -129,26 +127,33 @@ files:
129
127
  - lib/active_support/core_ext/class.rb
130
128
  - lib/active_support/core_ext/class/attribute.rb
131
129
  - lib/active_support/core_ext/class/attribute_accessors.rb
132
- - lib/active_support/core_ext/class/delegating_attributes.rb
133
130
  - lib/active_support/core_ext/class/subclasses.rb
134
131
  - lib/active_support/core_ext/date.rb
135
132
  - lib/active_support/core_ext/date/acts_like.rb
133
+ - lib/active_support/core_ext/date/blank.rb
136
134
  - lib/active_support/core_ext/date/calculations.rb
137
135
  - lib/active_support/core_ext/date/conversions.rb
136
+ - lib/active_support/core_ext/date/deprecated_conversions.rb
138
137
  - lib/active_support/core_ext/date/zones.rb
139
138
  - lib/active_support/core_ext/date_and_time/calculations.rb
139
+ - lib/active_support/core_ext/date_and_time/compatibility.rb
140
+ - lib/active_support/core_ext/date_and_time/zones.rb
140
141
  - lib/active_support/core_ext/date_time.rb
141
142
  - lib/active_support/core_ext/date_time/acts_like.rb
143
+ - lib/active_support/core_ext/date_time/blank.rb
142
144
  - lib/active_support/core_ext/date_time/calculations.rb
145
+ - lib/active_support/core_ext/date_time/compatibility.rb
143
146
  - lib/active_support/core_ext/date_time/conversions.rb
144
- - lib/active_support/core_ext/date_time/zones.rb
147
+ - lib/active_support/core_ext/date_time/deprecated_conversions.rb
148
+ - lib/active_support/core_ext/digest.rb
149
+ - lib/active_support/core_ext/digest/uuid.rb
145
150
  - lib/active_support/core_ext/enumerable.rb
146
151
  - lib/active_support/core_ext/file.rb
147
152
  - lib/active_support/core_ext/file/atomic.rb
148
153
  - lib/active_support/core_ext/hash.rb
149
154
  - lib/active_support/core_ext/hash/conversions.rb
150
155
  - lib/active_support/core_ext/hash/deep_merge.rb
151
- - lib/active_support/core_ext/hash/diff.rb
156
+ - lib/active_support/core_ext/hash/deep_transform_values.rb
152
157
  - lib/active_support/core_ext/hash/except.rb
153
158
  - lib/active_support/core_ext/hash/indifferent_access.rb
154
159
  - lib/active_support/core_ext/hash/keys.rb
@@ -159,28 +164,27 @@ files:
159
164
  - lib/active_support/core_ext/integer/multiple.rb
160
165
  - lib/active_support/core_ext/integer/time.rb
161
166
  - lib/active_support/core_ext/kernel.rb
162
- - lib/active_support/core_ext/kernel/agnostics.rb
163
- - lib/active_support/core_ext/kernel/debugger.rb
167
+ - lib/active_support/core_ext/kernel/concern.rb
164
168
  - lib/active_support/core_ext/kernel/reporting.rb
165
169
  - lib/active_support/core_ext/kernel/singleton_class.rb
166
170
  - lib/active_support/core_ext/load_error.rb
167
- - lib/active_support/core_ext/logger.rb
168
- - lib/active_support/core_ext/marshal.rb
169
171
  - lib/active_support/core_ext/module.rb
170
172
  - lib/active_support/core_ext/module/aliasing.rb
171
173
  - lib/active_support/core_ext/module/anonymous.rb
172
174
  - lib/active_support/core_ext/module/attr_internal.rb
173
175
  - lib/active_support/core_ext/module/attribute_accessors.rb
176
+ - lib/active_support/core_ext/module/attribute_accessors_per_thread.rb
177
+ - lib/active_support/core_ext/module/concerning.rb
174
178
  - lib/active_support/core_ext/module/delegation.rb
175
179
  - lib/active_support/core_ext/module/deprecation.rb
176
180
  - lib/active_support/core_ext/module/introspection.rb
177
- - lib/active_support/core_ext/module/qualified_const.rb
178
- - lib/active_support/core_ext/module/reachable.rb
181
+ - lib/active_support/core_ext/module/redefine_method.rb
179
182
  - lib/active_support/core_ext/module/remove_method.rb
180
183
  - lib/active_support/core_ext/name_error.rb
181
184
  - lib/active_support/core_ext/numeric.rb
182
185
  - lib/active_support/core_ext/numeric/bytes.rb
183
186
  - lib/active_support/core_ext/numeric/conversions.rb
187
+ - lib/active_support/core_ext/numeric/deprecated_conversions.rb
184
188
  - lib/active_support/core_ext/numeric/time.rb
185
189
  - lib/active_support/core_ext/object.rb
186
190
  - lib/active_support/core_ext/object/acts_like.rb
@@ -190,23 +194,26 @@ files:
190
194
  - lib/active_support/core_ext/object/duplicable.rb
191
195
  - lib/active_support/core_ext/object/inclusion.rb
192
196
  - lib/active_support/core_ext/object/instance_variables.rb
193
- - lib/active_support/core_ext/object/to_json.rb
197
+ - lib/active_support/core_ext/object/json.rb
194
198
  - lib/active_support/core_ext/object/to_param.rb
195
199
  - lib/active_support/core_ext/object/to_query.rb
196
200
  - lib/active_support/core_ext/object/try.rb
197
201
  - lib/active_support/core_ext/object/with_options.rb
198
- - lib/active_support/core_ext/proc.rb
202
+ - lib/active_support/core_ext/pathname.rb
203
+ - lib/active_support/core_ext/pathname/existence.rb
199
204
  - lib/active_support/core_ext/range.rb
205
+ - lib/active_support/core_ext/range/compare_range.rb
200
206
  - lib/active_support/core_ext/range/conversions.rb
207
+ - lib/active_support/core_ext/range/deprecated_conversions.rb
201
208
  - lib/active_support/core_ext/range/each.rb
202
- - lib/active_support/core_ext/range/include_range.rb
209
+ - lib/active_support/core_ext/range/include_time_with_zone.rb
203
210
  - lib/active_support/core_ext/range/overlaps.rb
204
211
  - lib/active_support/core_ext/regexp.rb
212
+ - lib/active_support/core_ext/securerandom.rb
205
213
  - lib/active_support/core_ext/string.rb
206
214
  - lib/active_support/core_ext/string/access.rb
207
215
  - lib/active_support/core_ext/string/behavior.rb
208
216
  - lib/active_support/core_ext/string/conversions.rb
209
- - lib/active_support/core_ext/string/encoding.rb
210
217
  - lib/active_support/core_ext/string/exclude.rb
211
218
  - lib/active_support/core_ext/string/filters.rb
212
219
  - lib/active_support/core_ext/string/indent.rb
@@ -217,29 +224,51 @@ files:
217
224
  - lib/active_support/core_ext/string/starts_ends_with.rb
218
225
  - lib/active_support/core_ext/string/strip.rb
219
226
  - lib/active_support/core_ext/string/zones.rb
220
- - lib/active_support/core_ext/struct.rb
221
- - lib/active_support/core_ext/thread.rb
227
+ - lib/active_support/core_ext/symbol.rb
228
+ - lib/active_support/core_ext/symbol/starts_ends_with.rb
222
229
  - lib/active_support/core_ext/time.rb
223
230
  - lib/active_support/core_ext/time/acts_like.rb
224
231
  - lib/active_support/core_ext/time/calculations.rb
232
+ - lib/active_support/core_ext/time/compatibility.rb
225
233
  - lib/active_support/core_ext/time/conversions.rb
226
- - lib/active_support/core_ext/time/marshal.rb
234
+ - lib/active_support/core_ext/time/deprecated_conversions.rb
227
235
  - lib/active_support/core_ext/time/zones.rb
228
236
  - lib/active_support/core_ext/uri.rb
237
+ - lib/active_support/current_attributes.rb
238
+ - lib/active_support/current_attributes/test_helper.rb
229
239
  - lib/active_support/dependencies.rb
230
240
  - lib/active_support/dependencies/autoload.rb
241
+ - lib/active_support/dependencies/interlock.rb
242
+ - lib/active_support/dependencies/require_dependency.rb
231
243
  - lib/active_support/deprecation.rb
232
244
  - lib/active_support/deprecation/behaviors.rb
245
+ - lib/active_support/deprecation/constant_accessor.rb
246
+ - lib/active_support/deprecation/disallowed.rb
233
247
  - lib/active_support/deprecation/instance_delegator.rb
234
248
  - lib/active_support/deprecation/method_wrappers.rb
235
249
  - lib/active_support/deprecation/proxy_wrappers.rb
236
250
  - lib/active_support/deprecation/reporting.rb
237
251
  - lib/active_support/descendants_tracker.rb
252
+ - lib/active_support/digest.rb
238
253
  - lib/active_support/duration.rb
254
+ - lib/active_support/duration/iso8601_parser.rb
255
+ - lib/active_support/duration/iso8601_serializer.rb
256
+ - lib/active_support/encrypted_configuration.rb
257
+ - lib/active_support/encrypted_file.rb
258
+ - lib/active_support/environment_inquirer.rb
259
+ - lib/active_support/error_reporter.rb
260
+ - lib/active_support/evented_file_update_checker.rb
261
+ - lib/active_support/execution_context.rb
262
+ - lib/active_support/execution_context/test_helper.rb
263
+ - lib/active_support/execution_wrapper.rb
264
+ - lib/active_support/executor.rb
265
+ - lib/active_support/executor/test_helper.rb
239
266
  - lib/active_support/file_update_checker.rb
240
- - lib/active_support/file_watcher.rb
267
+ - lib/active_support/fork_tracker.rb
268
+ - lib/active_support/gem_version.rb
241
269
  - lib/active_support/gzip.rb
242
270
  - lib/active_support/hash_with_indifferent_access.rb
271
+ - lib/active_support/html_safe_translation.rb
243
272
  - lib/active_support/i18n.rb
244
273
  - lib/active_support/i18n_railtie.rb
245
274
  - lib/active_support/inflections.rb
@@ -247,19 +276,24 @@ files:
247
276
  - lib/active_support/inflector/inflections.rb
248
277
  - lib/active_support/inflector/methods.rb
249
278
  - lib/active_support/inflector/transliterate.rb
279
+ - lib/active_support/isolated_execution_state.rb
250
280
  - lib/active_support/json.rb
251
281
  - lib/active_support/json/decoding.rb
252
282
  - lib/active_support/json/encoding.rb
253
- - lib/active_support/json/variable.rb
254
283
  - lib/active_support/key_generator.rb
255
284
  - lib/active_support/lazy_load_hooks.rb
285
+ - lib/active_support/locale/en.rb
256
286
  - lib/active_support/locale/en.yml
257
287
  - lib/active_support/log_subscriber.rb
258
288
  - lib/active_support/log_subscriber/test_helper.rb
259
289
  - lib/active_support/logger.rb
260
290
  - lib/active_support/logger_silence.rb
291
+ - lib/active_support/logger_thread_safe_level.rb
261
292
  - lib/active_support/message_encryptor.rb
262
293
  - lib/active_support/message_verifier.rb
294
+ - lib/active_support/messages/metadata.rb
295
+ - lib/active_support/messages/rotation_configuration.rb
296
+ - lib/active_support/messages/rotator.rb
263
297
  - lib/active_support/multibyte.rb
264
298
  - lib/active_support/multibyte/chars.rb
265
299
  - lib/active_support/multibyte/unicode.rb
@@ -267,14 +301,28 @@ files:
267
301
  - lib/active_support/notifications/fanout.rb
268
302
  - lib/active_support/notifications/instrumenter.rb
269
303
  - lib/active_support/number_helper.rb
304
+ - lib/active_support/number_helper/number_converter.rb
305
+ - lib/active_support/number_helper/number_to_currency_converter.rb
306
+ - lib/active_support/number_helper/number_to_delimited_converter.rb
307
+ - lib/active_support/number_helper/number_to_human_converter.rb
308
+ - lib/active_support/number_helper/number_to_human_size_converter.rb
309
+ - lib/active_support/number_helper/number_to_percentage_converter.rb
310
+ - lib/active_support/number_helper/number_to_phone_converter.rb
311
+ - lib/active_support/number_helper/number_to_rounded_converter.rb
312
+ - lib/active_support/number_helper/rounding_helper.rb
270
313
  - lib/active_support/option_merger.rb
271
314
  - lib/active_support/ordered_hash.rb
272
315
  - lib/active_support/ordered_options.rb
316
+ - lib/active_support/parameter_filter.rb
273
317
  - lib/active_support/per_thread_registry.rb
274
318
  - lib/active_support/proxy_object.rb
275
319
  - lib/active_support/rails.rb
276
320
  - lib/active_support/railtie.rb
321
+ - lib/active_support/reloader.rb
277
322
  - lib/active_support/rescuable.rb
323
+ - lib/active_support/ruby_features.rb
324
+ - lib/active_support/secure_compare_rotator.rb
325
+ - lib/active_support/security_utils.rb
278
326
  - lib/active_support/string_inquirer.rb
279
327
  - lib/active_support/subscriber.rb
280
328
  - lib/active_support/tagged_logging.rb
@@ -284,14 +332,20 @@ files:
284
332
  - lib/active_support/testing/constant_lookup.rb
285
333
  - lib/active_support/testing/declarative.rb
286
334
  - lib/active_support/testing/deprecation.rb
335
+ - lib/active_support/testing/file_fixtures.rb
287
336
  - lib/active_support/testing/isolation.rb
288
- - lib/active_support/testing/pending.rb
337
+ - lib/active_support/testing/method_call_assertions.rb
338
+ - lib/active_support/testing/parallelization.rb
339
+ - lib/active_support/testing/parallelization/server.rb
340
+ - lib/active_support/testing/parallelization/worker.rb
341
+ - lib/active_support/testing/parallelize_executor.rb
289
342
  - lib/active_support/testing/setup_and_teardown.rb
343
+ - lib/active_support/testing/stream.rb
290
344
  - lib/active_support/testing/tagged_logging.rb
345
+ - lib/active_support/testing/time_helpers.rb
291
346
  - lib/active_support/time.rb
292
347
  - lib/active_support/time_with_zone.rb
293
348
  - lib/active_support/values/time_zone.rb
294
- - lib/active_support/values/unicode_tables.dat
295
349
  - lib/active_support/version.rb
296
350
  - lib/active_support/xml_mini.rb
297
351
  - lib/active_support/xml_mini/jdom.rb
@@ -300,11 +354,17 @@ files:
300
354
  - lib/active_support/xml_mini/nokogiri.rb
301
355
  - lib/active_support/xml_mini/nokogirisax.rb
302
356
  - lib/active_support/xml_mini/rexml.rb
303
- homepage: http://www.rubyonrails.org
357
+ homepage: https://rubyonrails.org
304
358
  licenses:
305
359
  - MIT
306
- metadata: {}
307
- post_install_message:
360
+ metadata:
361
+ bug_tracker_uri: https://github.com/rails/rails/issues
362
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.2.4/activesupport/CHANGELOG.md
363
+ documentation_uri: https://api.rubyonrails.org/v7.0.2.4/
364
+ mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
365
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.2.4/activesupport
366
+ rubygems_mfa_required: 'true'
367
+ post_install_message:
308
368
  rdoc_options:
309
369
  - "--encoding"
310
370
  - UTF-8
@@ -314,16 +374,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
314
374
  requirements:
315
375
  - - ">="
316
376
  - !ruby/object:Gem::Version
317
- version: 1.9.3
377
+ version: 2.7.0
318
378
  required_rubygems_version: !ruby/object:Gem::Requirement
319
379
  requirements:
320
380
  - - ">="
321
381
  - !ruby/object:Gem::Version
322
382
  version: '0'
323
383
  requirements: []
324
- rubyforge_project:
325
- rubygems_version: 2.4.2
326
- signing_key:
384
+ rubygems_version: 3.1.6
385
+ signing_key:
327
386
  specification_version: 4
328
387
  summary: A toolkit of support libraries and Ruby core extensions extracted from the
329
388
  Rails framework.
@@ -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,27 +0,0 @@
1
- require 'thread'
2
- require 'monitor'
3
-
4
- module ActiveSupport
5
- module Concurrency
6
- class Latch
7
- def initialize(count = 1)
8
- @count = count
9
- @lock = Monitor.new
10
- @cv = @lock.new_cond
11
- end
12
-
13
- def release
14
- @lock.synchronize do
15
- @count -= 1 if @count > 0
16
- @cv.broadcast if @count.zero?
17
- end
18
- end
19
-
20
- def await
21
- @lock.synchronize do
22
- @cv.wait_while { @count > 0 }
23
- end
24
- end
25
- end
26
- end
27
- end
@@ -1,7 +0,0 @@
1
- class Array
2
- # The human way of thinking about adding stuff to the end of a list is with append
3
- alias_method :append, :<<
4
-
5
- # The human way of thinking about adding stuff to the beginning of a list is with prepend
6
- alias_method :prepend, :unshift
7
- 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,40 +0,0 @@
1
- require 'active_support/core_ext/kernel/singleton_class'
2
- require 'active_support/core_ext/module/remove_method'
3
-
4
- class Class
5
- def superclass_delegating_accessor(name, options = {})
6
- # Create private _name and _name= methods that can still be used if the public
7
- # methods are overridden. This allows
8
- _superclass_delegating_accessor("_#{name}")
9
-
10
- # Generate the public methods name, name=, and name?
11
- # These methods dispatch to the private _name, and _name= methods, making them
12
- # overridable
13
- singleton_class.send(:define_method, name) { send("_#{name}") }
14
- singleton_class.send(:define_method, "#{name}?") { !!send("_#{name}") }
15
- singleton_class.send(:define_method, "#{name}=") { |value| send("_#{name}=", value) }
16
-
17
- # If an instance_reader is needed, generate methods for name and name= on the
18
- # class itself, so instances will be able to see them
19
- define_method(name) { send("_#{name}") } if options[:instance_reader] != false
20
- define_method("#{name}?") { !!send("#{name}") } if options[:instance_reader] != false
21
- end
22
-
23
- private
24
- # Take the object being set and store it in a method. This gives us automatic
25
- # inheritance behavior, without having to store the object in an instance
26
- # variable and look up the superclass chain manually.
27
- def _stash_object_in_method(object, method, instance_reader = true)
28
- singleton_class.remove_possible_method(method)
29
- singleton_class.send(:define_method, method) { object }
30
- remove_possible_method(method)
31
- define_method(method) { object } if instance_reader
32
- end
33
-
34
- def _superclass_delegating_accessor(name, options = {})
35
- singleton_class.send(:define_method, "#{name}=") do |value|
36
- _stash_object_in_method(value, name, options[:instance_reader] != false)
37
- end
38
- send("#{name}=", nil)
39
- end
40
- end
@@ -1,24 +0,0 @@
1
- require 'active_support/core_ext/time/zones'
2
-
3
- class DateTime
4
- # Returns the simultaneous time in <tt>Time.zone</tt>.
5
- #
6
- # Time.zone = 'Hawaii' # => 'Hawaii'
7
- # DateTime.new(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00
8
- #
9
- # This method is similar to Time#localtime, except that it uses <tt>Time.zone</tt>
10
- # as the local zone instead of the operating system's time zone.
11
- #
12
- # You can also pass in a TimeZone instance or string that identifies a TimeZone
13
- # as an argument, and the conversion will be based on that zone instead of
14
- # <tt>Time.zone</tt>.
15
- #
16
- # DateTime.new(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00
17
- def in_time_zone(zone = ::Time.zone)
18
- if zone
19
- ActiveSupport::TimeWithZone.new(utc? ? self : getutc, ::Time.find_zone!(zone))
20
- else
21
- self
22
- end
23
- end
24
- 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,11 +0,0 @@
1
- class Object
2
- # Makes backticks behave (somewhat more) similarly on all platforms.
3
- # On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the
4
- # spawned shell prints a message to stderr and sets $?. We emulate
5
- # Unix on the former but not the latter.
6
- def `(command) #:nodoc:
7
- super
8
- rescue Errno::ENOENT => e
9
- STDERR.puts "#$0: #{e}"
10
- end
11
- end
@@ -1,10 +0,0 @@
1
- module Kernel
2
- unless respond_to?(:debugger)
3
- # Starts a debugging session if the +debugger+ gem has been loaded (call rails server --debugger to do load it).
4
- def debugger
5
- message = "\n***** Debugger requested, but was not available (ensure the debugger gem is listed in Gemfile/installed as gem): Start server with --debugger to enable *****\n"
6
- defined?(Rails) ? Rails.logger.info(message) : $stderr.puts(message)
7
- end
8
- alias breakpoint debugger unless respond_to?(:breakpoint)
9
- end
10
- end