activesupport 5.0.0 → 6.1.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.

Files changed (268) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +343 -590
  3. data/MIT-LICENSE +1 -1
  4. data/README.rdoc +5 -4
  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 +11 -5
  8. data/lib/active_support/backtrace_cleaner.rb +33 -5
  9. data/lib/active_support/benchmarkable.rb +5 -3
  10. data/lib/active_support/builder.rb +3 -1
  11. data/lib/active_support/cache/file_store.rb +45 -53
  12. data/lib/active_support/cache/mem_cache_store.rb +81 -79
  13. data/lib/active_support/cache/memory_store.rb +69 -41
  14. data/lib/active_support/cache/null_store.rb +11 -4
  15. data/lib/active_support/cache/redis_cache_store.rb +493 -0
  16. data/lib/active_support/cache/strategy/local_cache.rb +74 -37
  17. data/lib/active_support/cache/strategy/local_cache_middleware.rb +10 -9
  18. data/lib/active_support/cache.rb +332 -161
  19. data/lib/active_support/callbacks.rb +657 -586
  20. data/lib/active_support/concern.rb +79 -6
  21. data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +35 -0
  22. data/lib/active_support/concurrency/share_lock.rb +59 -19
  23. data/lib/active_support/configurable.rb +15 -17
  24. data/lib/active_support/configuration_file.rb +46 -0
  25. data/lib/active_support/core_ext/array/access.rb +21 -7
  26. data/lib/active_support/core_ext/array/conversions.rb +20 -18
  27. data/lib/active_support/core_ext/array/extract.rb +21 -0
  28. data/lib/active_support/core_ext/array/extract_options.rb +2 -0
  29. data/lib/active_support/core_ext/array/grouping.rb +3 -1
  30. data/lib/active_support/core_ext/array/inquiry.rb +3 -1
  31. data/lib/active_support/core_ext/array/wrap.rb +2 -0
  32. data/lib/active_support/core_ext/array.rb +9 -7
  33. data/lib/active_support/core_ext/benchmark.rb +5 -3
  34. data/lib/active_support/core_ext/big_decimal/conversions.rb +6 -6
  35. data/lib/active_support/core_ext/big_decimal.rb +3 -1
  36. data/lib/active_support/core_ext/class/attribute.rb +52 -49
  37. data/lib/active_support/core_ext/class/attribute_accessors.rb +3 -1
  38. data/lib/active_support/core_ext/class/subclasses.rb +18 -26
  39. data/lib/active_support/core_ext/class.rb +4 -2
  40. data/lib/active_support/core_ext/date/acts_like.rb +3 -1
  41. data/lib/active_support/core_ext/date/blank.rb +3 -1
  42. data/lib/active_support/core_ext/date/calculations.rb +16 -13
  43. data/lib/active_support/core_ext/date/conversions.rb +23 -21
  44. data/lib/active_support/core_ext/date/zones.rb +4 -2
  45. data/lib/active_support/core_ext/date.rb +7 -5
  46. data/lib/active_support/core_ext/date_and_time/calculations.rb +82 -53
  47. data/lib/active_support/core_ext/date_and_time/compatibility.rb +18 -5
  48. data/lib/active_support/core_ext/date_and_time/zones.rb +9 -9
  49. data/lib/active_support/core_ext/date_time/acts_like.rb +4 -2
  50. data/lib/active_support/core_ext/date_time/blank.rb +3 -1
  51. data/lib/active_support/core_ext/date_time/calculations.rb +23 -11
  52. data/lib/active_support/core_ext/date_time/compatibility.rb +15 -2
  53. data/lib/active_support/core_ext/date_time/conversions.rb +14 -13
  54. data/lib/active_support/core_ext/date_time.rb +7 -5
  55. data/lib/active_support/core_ext/digest/uuid.rb +7 -5
  56. data/lib/active_support/core_ext/digest.rb +3 -0
  57. data/lib/active_support/core_ext/enumerable.rb +165 -29
  58. data/lib/active_support/core_ext/file/atomic.rb +7 -5
  59. data/lib/active_support/core_ext/file.rb +3 -1
  60. data/lib/active_support/core_ext/hash/conversions.rb +40 -39
  61. data/lib/active_support/core_ext/hash/deep_merge.rb +8 -12
  62. data/lib/active_support/core_ext/hash/deep_transform_values.rb +46 -0
  63. data/lib/active_support/core_ext/hash/except.rb +4 -2
  64. data/lib/active_support/core_ext/hash/indifferent_access.rb +3 -2
  65. data/lib/active_support/core_ext/hash/keys.rb +9 -36
  66. data/lib/active_support/core_ext/hash/reverse_merge.rb +5 -2
  67. data/lib/active_support/core_ext/hash/slice.rb +8 -29
  68. data/lib/active_support/core_ext/hash.rb +10 -9
  69. data/lib/active_support/core_ext/integer/inflections.rb +3 -1
  70. data/lib/active_support/core_ext/integer/multiple.rb +3 -1
  71. data/lib/active_support/core_ext/integer/time.rb +11 -18
  72. data/lib/active_support/core_ext/integer.rb +5 -3
  73. data/lib/active_support/core_ext/kernel/concern.rb +3 -1
  74. data/lib/active_support/core_ext/kernel/reporting.rb +3 -1
  75. data/lib/active_support/core_ext/kernel/singleton_class.rb +2 -0
  76. data/lib/active_support/core_ext/kernel.rb +5 -4
  77. data/lib/active_support/core_ext/load_error.rb +2 -23
  78. data/lib/active_support/core_ext/marshal.rb +6 -2
  79. data/lib/active_support/core_ext/module/aliasing.rb +5 -48
  80. data/lib/active_support/core_ext/module/anonymous.rb +2 -0
  81. data/lib/active_support/core_ext/module/attr_internal.rb +7 -5
  82. data/lib/active_support/core_ext/module/attribute_accessors.rb +53 -59
  83. data/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +31 -24
  84. data/lib/active_support/core_ext/module/concerning.rb +16 -11
  85. data/lib/active_support/core_ext/module/delegation.rb +159 -44
  86. data/lib/active_support/core_ext/module/deprecation.rb +2 -0
  87. data/lib/active_support/core_ext/module/introspection.rb +23 -26
  88. data/lib/active_support/core_ext/module/redefine_method.rb +40 -0
  89. data/lib/active_support/core_ext/module/remove_method.rb +5 -23
  90. data/lib/active_support/core_ext/module.rb +13 -12
  91. data/lib/active_support/core_ext/name_error.rb +36 -2
  92. data/lib/active_support/core_ext/numeric/bytes.rb +2 -0
  93. data/lib/active_support/core_ext/numeric/conversions.rb +129 -134
  94. data/lib/active_support/core_ext/numeric/time.rb +18 -26
  95. data/lib/active_support/core_ext/numeric.rb +5 -4
  96. data/lib/active_support/core_ext/object/acts_like.rb +12 -1
  97. data/lib/active_support/core_ext/object/blank.rb +14 -2
  98. data/lib/active_support/core_ext/object/conversions.rb +6 -4
  99. data/lib/active_support/core_ext/object/deep_dup.rb +4 -2
  100. data/lib/active_support/core_ext/object/duplicable.rb +13 -62
  101. data/lib/active_support/core_ext/object/inclusion.rb +3 -1
  102. data/lib/active_support/core_ext/object/instance_variables.rb +2 -0
  103. data/lib/active_support/core_ext/object/json.rb +42 -15
  104. data/lib/active_support/core_ext/object/to_param.rb +3 -1
  105. data/lib/active_support/core_ext/object/to_query.rb +10 -5
  106. data/lib/active_support/core_ext/object/try.rb +20 -8
  107. data/lib/active_support/core_ext/object/with_options.rb +15 -2
  108. data/lib/active_support/core_ext/object.rb +14 -12
  109. data/lib/active_support/core_ext/range/compare_range.rb +82 -0
  110. data/lib/active_support/core_ext/range/conversions.rb +35 -25
  111. data/lib/active_support/core_ext/range/each.rb +5 -2
  112. data/lib/active_support/core_ext/range/include_time_with_zone.rb +28 -0
  113. data/lib/active_support/core_ext/range/overlaps.rb +2 -0
  114. data/lib/active_support/core_ext/range.rb +7 -4
  115. data/lib/active_support/core_ext/regexp.rb +10 -1
  116. data/lib/active_support/core_ext/securerandom.rb +28 -6
  117. data/lib/active_support/core_ext/string/access.rb +9 -18
  118. data/lib/active_support/core_ext/string/behavior.rb +2 -0
  119. data/lib/active_support/core_ext/string/conversions.rb +5 -2
  120. data/lib/active_support/core_ext/string/exclude.rb +2 -0
  121. data/lib/active_support/core_ext/string/filters.rb +47 -4
  122. data/lib/active_support/core_ext/string/indent.rb +6 -4
  123. data/lib/active_support/core_ext/string/inflections.rb +78 -29
  124. data/lib/active_support/core_ext/string/inquiry.rb +4 -1
  125. data/lib/active_support/core_ext/string/multibyte.rb +10 -5
  126. data/lib/active_support/core_ext/string/output_safety.rb +86 -31
  127. data/lib/active_support/core_ext/string/starts_ends_with.rb +4 -2
  128. data/lib/active_support/core_ext/string/strip.rb +5 -1
  129. data/lib/active_support/core_ext/string/zones.rb +4 -2
  130. data/lib/active_support/core_ext/string.rb +15 -13
  131. data/lib/active_support/core_ext/symbol/starts_ends_with.rb +14 -0
  132. data/lib/active_support/core_ext/symbol.rb +3 -0
  133. data/lib/active_support/core_ext/time/acts_like.rb +3 -1
  134. data/lib/active_support/core_ext/time/calculations.rb +117 -45
  135. data/lib/active_support/core_ext/time/compatibility.rb +13 -2
  136. data/lib/active_support/core_ext/time/conversions.rb +18 -12
  137. data/lib/active_support/core_ext/time/zones.rb +9 -7
  138. data/lib/active_support/core_ext/time.rb +7 -5
  139. data/lib/active_support/core_ext/uri.rb +12 -7
  140. data/lib/active_support/core_ext.rb +3 -2
  141. data/lib/active_support/current_attributes/test_helper.rb +13 -0
  142. data/lib/active_support/current_attributes.rb +208 -0
  143. data/lib/active_support/dependencies/autoload.rb +2 -0
  144. data/lib/active_support/dependencies/interlock.rb +7 -1
  145. data/lib/active_support/dependencies/zeitwerk_integration.rb +117 -0
  146. data/lib/active_support/dependencies.rb +172 -98
  147. data/lib/active_support/deprecation/behaviors.rb +45 -13
  148. data/lib/active_support/deprecation/constant_accessor.rb +52 -0
  149. data/lib/active_support/deprecation/disallowed.rb +56 -0
  150. data/lib/active_support/deprecation/instance_delegator.rb +16 -2
  151. data/lib/active_support/deprecation/method_wrappers.rb +32 -17
  152. data/lib/active_support/deprecation/proxy_wrappers.rb +35 -7
  153. data/lib/active_support/deprecation/reporting.rb +61 -16
  154. data/lib/active_support/deprecation.rb +17 -9
  155. data/lib/active_support/descendants_tracker.rb +61 -9
  156. data/lib/active_support/digest.rb +20 -0
  157. data/lib/active_support/duration/iso8601_parser.rb +67 -66
  158. data/lib/active_support/duration/iso8601_serializer.rb +25 -17
  159. data/lib/active_support/duration.rb +349 -46
  160. data/lib/active_support/encrypted_configuration.rb +45 -0
  161. data/lib/active_support/encrypted_file.rb +117 -0
  162. data/lib/active_support/environment_inquirer.rb +20 -0
  163. data/lib/active_support/evented_file_update_checker.rb +88 -112
  164. data/lib/active_support/execution_wrapper.rb +25 -13
  165. data/lib/active_support/executor.rb +3 -1
  166. data/lib/active_support/file_update_checker.rb +56 -51
  167. data/lib/active_support/fork_tracker.rb +62 -0
  168. data/lib/active_support/gem_version.rb +4 -2
  169. data/lib/active_support/gzip.rb +7 -5
  170. data/lib/active_support/hash_with_indifferent_access.rb +153 -49
  171. data/lib/active_support/i18n.rb +9 -6
  172. data/lib/active_support/i18n_railtie.rb +30 -20
  173. data/lib/active_support/inflections.rb +13 -11
  174. data/lib/active_support/inflector/inflections.rb +28 -15
  175. data/lib/active_support/inflector/methods.rb +120 -109
  176. data/lib/active_support/inflector/transliterate.rb +60 -25
  177. data/lib/active_support/inflector.rb +7 -5
  178. data/lib/active_support/json/decoding.rb +30 -29
  179. data/lib/active_support/json/encoding.rb +22 -11
  180. data/lib/active_support/json.rb +4 -2
  181. data/lib/active_support/key_generator.rb +6 -36
  182. data/lib/active_support/lazy_load_hooks.rb +53 -20
  183. data/lib/active_support/locale/en.rb +33 -0
  184. data/lib/active_support/locale/en.yml +7 -3
  185. data/lib/active_support/log_subscriber/test_helper.rb +11 -9
  186. data/lib/active_support/log_subscriber.rb +51 -18
  187. data/lib/active_support/logger.rb +9 -22
  188. data/lib/active_support/logger_silence.rb +14 -21
  189. data/lib/active_support/logger_thread_safe_level.rb +55 -8
  190. data/lib/active_support/message_encryptor.rb +170 -53
  191. data/lib/active_support/message_verifier.rb +91 -20
  192. data/lib/active_support/messages/metadata.rb +80 -0
  193. data/lib/active_support/messages/rotation_configuration.rb +23 -0
  194. data/lib/active_support/messages/rotator.rb +57 -0
  195. data/lib/active_support/multibyte/chars.rb +24 -78
  196. data/lib/active_support/multibyte/unicode.rb +21 -352
  197. data/lib/active_support/multibyte.rb +4 -2
  198. data/lib/active_support/notifications/fanout.rb +121 -19
  199. data/lib/active_support/notifications/instrumenter.rb +78 -14
  200. data/lib/active_support/notifications.rb +80 -12
  201. data/lib/active_support/number_helper/number_converter.rb +17 -16
  202. data/lib/active_support/number_helper/number_to_currency_converter.rb +6 -9
  203. data/lib/active_support/number_helper/number_to_delimited_converter.rb +5 -3
  204. data/lib/active_support/number_helper/number_to_human_converter.rb +13 -12
  205. data/lib/active_support/number_helper/number_to_human_size_converter.rb +11 -13
  206. data/lib/active_support/number_helper/number_to_percentage_converter.rb +5 -1
  207. data/lib/active_support/number_helper/number_to_phone_converter.rb +5 -4
  208. data/lib/active_support/number_helper/number_to_rounded_converter.rb +18 -55
  209. data/lib/active_support/number_helper/rounding_helper.rb +50 -0
  210. data/lib/active_support/number_helper.rb +45 -16
  211. data/lib/active_support/option_merger.rb +25 -4
  212. data/lib/active_support/ordered_hash.rb +6 -4
  213. data/lib/active_support/ordered_options.rb +23 -9
  214. data/lib/active_support/parameter_filter.rb +133 -0
  215. data/lib/active_support/per_thread_registry.rb +7 -5
  216. data/lib/active_support/proxy_object.rb +2 -0
  217. data/lib/active_support/rails.rb +8 -9
  218. data/lib/active_support/railtie.rb +62 -11
  219. data/lib/active_support/reloader.rb +12 -11
  220. data/lib/active_support/rescuable.rb +20 -11
  221. data/lib/active_support/secure_compare_rotator.rb +51 -0
  222. data/lib/active_support/security_utils.rb +26 -15
  223. data/lib/active_support/string_inquirer.rb +12 -3
  224. data/lib/active_support/subscriber.rb +77 -23
  225. data/lib/active_support/tagged_logging.rb +52 -17
  226. data/lib/active_support/test_case.rb +106 -29
  227. data/lib/active_support/testing/assertions.rb +144 -8
  228. data/lib/active_support/testing/autorun.rb +5 -10
  229. data/lib/active_support/testing/constant_lookup.rb +2 -1
  230. data/lib/active_support/testing/declarative.rb +3 -1
  231. data/lib/active_support/testing/deprecation.rb +4 -2
  232. data/lib/active_support/testing/file_fixtures.rb +4 -0
  233. data/lib/active_support/testing/isolation.rb +19 -24
  234. data/lib/active_support/testing/method_call_assertions.rb +31 -2
  235. data/lib/active_support/testing/parallelization/server.rb +78 -0
  236. data/lib/active_support/testing/parallelization/worker.rb +100 -0
  237. data/lib/active_support/testing/parallelization.rb +51 -0
  238. data/lib/active_support/testing/setup_and_teardown.rb +13 -8
  239. data/lib/active_support/testing/stream.rb +30 -29
  240. data/lib/active_support/testing/tagged_logging.rb +3 -1
  241. data/lib/active_support/testing/time_helpers.rb +125 -24
  242. data/lib/active_support/time.rb +14 -12
  243. data/lib/active_support/time_with_zone.rb +142 -55
  244. data/lib/active_support/values/time_zone.rb +160 -53
  245. data/lib/active_support/version.rb +3 -1
  246. data/lib/active_support/xml_mini/jdom.rb +115 -114
  247. data/lib/active_support/xml_mini/libxml.rb +15 -14
  248. data/lib/active_support/xml_mini/libxmlsax.rb +16 -18
  249. data/lib/active_support/xml_mini/nokogiri.rb +13 -13
  250. data/lib/active_support/xml_mini/nokogirisax.rb +15 -16
  251. data/lib/active_support/xml_mini/rexml.rb +18 -9
  252. data/lib/active_support/xml_mini.rb +44 -42
  253. data/lib/active_support.rb +19 -10
  254. metadata +79 -37
  255. data/lib/active_support/concurrency/latch.rb +0 -19
  256. data/lib/active_support/core_ext/array/prepend_and_append.rb +0 -7
  257. data/lib/active_support/core_ext/hash/compact.rb +0 -20
  258. data/lib/active_support/core_ext/hash/transform_values.rb +0 -29
  259. data/lib/active_support/core_ext/kernel/agnostics.rb +0 -11
  260. data/lib/active_support/core_ext/kernel/debugger.rb +0 -3
  261. data/lib/active_support/core_ext/module/method_transplanting.rb +0 -3
  262. data/lib/active_support/core_ext/module/qualified_const.rb +0 -70
  263. data/lib/active_support/core_ext/module/reachable.rb +0 -8
  264. data/lib/active_support/core_ext/numeric/inquiry.rb +0 -26
  265. data/lib/active_support/core_ext/range/include_range.rb +0 -23
  266. data/lib/active_support/core_ext/struct.rb +0 -3
  267. data/lib/active_support/core_ext/time/marshal.rb +0 -3
  268. data/lib/active_support/values/unicode_tables.dat +0 -0
metadata CHANGED
@@ -1,77 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 6.1.0
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: 2016-06-30 00:00:00.000000000 Z
11
+ date: 2020-12-09 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
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.6'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.7'
22
+ version: '2'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '0.7'
29
+ version: '1.6'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: tzinfo
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
32
38
  - !ruby/object:Gem::Version
33
- version: '1.1'
39
+ version: '2.0'
34
40
  type: :runtime
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
- version: '1.1'
46
+ version: '2.0'
41
47
  - !ruby/object:Gem::Dependency
42
- name: minitest
48
+ name: concurrent-ruby
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '5.1'
53
+ version: '1.0'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 1.0.2
48
57
  type: :runtime
49
58
  prerelease: false
50
59
  version_requirements: !ruby/object:Gem::Requirement
51
60
  requirements:
52
61
  - - "~>"
53
62
  - !ruby/object:Gem::Version
54
- version: '5.1'
63
+ version: '1.0'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 1.0.2
55
67
  - !ruby/object:Gem::Dependency
56
- name: concurrent-ruby
68
+ name: zeitwerk
57
69
  requirement: !ruby/object:Gem::Requirement
58
70
  requirements:
59
71
  - - "~>"
60
72
  - !ruby/object:Gem::Version
61
- version: '1.0'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 1.0.2
73
+ version: '2.3'
65
74
  type: :runtime
66
75
  prerelease: false
67
76
  version_requirements: !ruby/object:Gem::Requirement
68
77
  requirements:
69
78
  - - "~>"
70
79
  - !ruby/object:Gem::Version
71
- version: '1.0'
80
+ version: '2.3'
81
+ - !ruby/object:Gem::Dependency
82
+ name: minitest
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
72
85
  - - ">="
73
86
  - !ruby/object:Gem::Version
74
- version: 1.0.2
87
+ version: '5.1'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '5.1'
75
95
  description: A toolkit of support libraries and Ruby core extensions extracted from
76
96
  the Rails framework. Rich support for multibyte strings, internationalization, time
77
97
  zones, and testing.
@@ -84,6 +104,7 @@ files:
84
104
  - MIT-LICENSE
85
105
  - README.rdoc
86
106
  - lib/active_support.rb
107
+ - lib/active_support/actionable_error.rb
87
108
  - lib/active_support/all.rb
88
109
  - lib/active_support/array_inquirer.rb
89
110
  - lib/active_support/backtrace_cleaner.rb
@@ -94,21 +115,23 @@ files:
94
115
  - lib/active_support/cache/mem_cache_store.rb
95
116
  - lib/active_support/cache/memory_store.rb
96
117
  - lib/active_support/cache/null_store.rb
118
+ - lib/active_support/cache/redis_cache_store.rb
97
119
  - lib/active_support/cache/strategy/local_cache.rb
98
120
  - lib/active_support/cache/strategy/local_cache_middleware.rb
99
121
  - lib/active_support/callbacks.rb
100
122
  - lib/active_support/concern.rb
101
- - lib/active_support/concurrency/latch.rb
123
+ - lib/active_support/concurrency/load_interlock_aware_monitor.rb
102
124
  - lib/active_support/concurrency/share_lock.rb
103
125
  - lib/active_support/configurable.rb
126
+ - lib/active_support/configuration_file.rb
104
127
  - lib/active_support/core_ext.rb
105
128
  - lib/active_support/core_ext/array.rb
106
129
  - lib/active_support/core_ext/array/access.rb
107
130
  - lib/active_support/core_ext/array/conversions.rb
131
+ - lib/active_support/core_ext/array/extract.rb
108
132
  - lib/active_support/core_ext/array/extract_options.rb
109
133
  - lib/active_support/core_ext/array/grouping.rb
110
134
  - lib/active_support/core_ext/array/inquiry.rb
111
- - lib/active_support/core_ext/array/prepend_and_append.rb
112
135
  - lib/active_support/core_ext/array/wrap.rb
113
136
  - lib/active_support/core_ext/benchmark.rb
114
137
  - lib/active_support/core_ext/big_decimal.rb
@@ -132,28 +155,26 @@ files:
132
155
  - lib/active_support/core_ext/date_time/calculations.rb
133
156
  - lib/active_support/core_ext/date_time/compatibility.rb
134
157
  - lib/active_support/core_ext/date_time/conversions.rb
158
+ - lib/active_support/core_ext/digest.rb
135
159
  - lib/active_support/core_ext/digest/uuid.rb
136
160
  - lib/active_support/core_ext/enumerable.rb
137
161
  - lib/active_support/core_ext/file.rb
138
162
  - lib/active_support/core_ext/file/atomic.rb
139
163
  - lib/active_support/core_ext/hash.rb
140
- - lib/active_support/core_ext/hash/compact.rb
141
164
  - lib/active_support/core_ext/hash/conversions.rb
142
165
  - lib/active_support/core_ext/hash/deep_merge.rb
166
+ - lib/active_support/core_ext/hash/deep_transform_values.rb
143
167
  - lib/active_support/core_ext/hash/except.rb
144
168
  - lib/active_support/core_ext/hash/indifferent_access.rb
145
169
  - lib/active_support/core_ext/hash/keys.rb
146
170
  - lib/active_support/core_ext/hash/reverse_merge.rb
147
171
  - lib/active_support/core_ext/hash/slice.rb
148
- - lib/active_support/core_ext/hash/transform_values.rb
149
172
  - lib/active_support/core_ext/integer.rb
150
173
  - lib/active_support/core_ext/integer/inflections.rb
151
174
  - lib/active_support/core_ext/integer/multiple.rb
152
175
  - lib/active_support/core_ext/integer/time.rb
153
176
  - lib/active_support/core_ext/kernel.rb
154
- - lib/active_support/core_ext/kernel/agnostics.rb
155
177
  - lib/active_support/core_ext/kernel/concern.rb
156
- - lib/active_support/core_ext/kernel/debugger.rb
157
178
  - lib/active_support/core_ext/kernel/reporting.rb
158
179
  - lib/active_support/core_ext/kernel/singleton_class.rb
159
180
  - lib/active_support/core_ext/load_error.rb
@@ -168,15 +189,12 @@ files:
168
189
  - lib/active_support/core_ext/module/delegation.rb
169
190
  - lib/active_support/core_ext/module/deprecation.rb
170
191
  - lib/active_support/core_ext/module/introspection.rb
171
- - lib/active_support/core_ext/module/method_transplanting.rb
172
- - lib/active_support/core_ext/module/qualified_const.rb
173
- - lib/active_support/core_ext/module/reachable.rb
192
+ - lib/active_support/core_ext/module/redefine_method.rb
174
193
  - lib/active_support/core_ext/module/remove_method.rb
175
194
  - lib/active_support/core_ext/name_error.rb
176
195
  - lib/active_support/core_ext/numeric.rb
177
196
  - lib/active_support/core_ext/numeric/bytes.rb
178
197
  - lib/active_support/core_ext/numeric/conversions.rb
179
- - lib/active_support/core_ext/numeric/inquiry.rb
180
198
  - lib/active_support/core_ext/numeric/time.rb
181
199
  - lib/active_support/core_ext/object.rb
182
200
  - lib/active_support/core_ext/object/acts_like.rb
@@ -192,9 +210,10 @@ files:
192
210
  - lib/active_support/core_ext/object/try.rb
193
211
  - lib/active_support/core_ext/object/with_options.rb
194
212
  - lib/active_support/core_ext/range.rb
213
+ - lib/active_support/core_ext/range/compare_range.rb
195
214
  - lib/active_support/core_ext/range/conversions.rb
196
215
  - lib/active_support/core_ext/range/each.rb
197
- - lib/active_support/core_ext/range/include_range.rb
216
+ - lib/active_support/core_ext/range/include_time_with_zone.rb
198
217
  - lib/active_support/core_ext/range/overlaps.rb
199
218
  - lib/active_support/core_ext/regexp.rb
200
219
  - lib/active_support/core_ext/securerandom.rb
@@ -212,32 +231,42 @@ files:
212
231
  - lib/active_support/core_ext/string/starts_ends_with.rb
213
232
  - lib/active_support/core_ext/string/strip.rb
214
233
  - lib/active_support/core_ext/string/zones.rb
215
- - lib/active_support/core_ext/struct.rb
234
+ - lib/active_support/core_ext/symbol.rb
235
+ - lib/active_support/core_ext/symbol/starts_ends_with.rb
216
236
  - lib/active_support/core_ext/time.rb
217
237
  - lib/active_support/core_ext/time/acts_like.rb
218
238
  - lib/active_support/core_ext/time/calculations.rb
219
239
  - lib/active_support/core_ext/time/compatibility.rb
220
240
  - lib/active_support/core_ext/time/conversions.rb
221
- - lib/active_support/core_ext/time/marshal.rb
222
241
  - lib/active_support/core_ext/time/zones.rb
223
242
  - lib/active_support/core_ext/uri.rb
243
+ - lib/active_support/current_attributes.rb
244
+ - lib/active_support/current_attributes/test_helper.rb
224
245
  - lib/active_support/dependencies.rb
225
246
  - lib/active_support/dependencies/autoload.rb
226
247
  - lib/active_support/dependencies/interlock.rb
248
+ - lib/active_support/dependencies/zeitwerk_integration.rb
227
249
  - lib/active_support/deprecation.rb
228
250
  - lib/active_support/deprecation/behaviors.rb
251
+ - lib/active_support/deprecation/constant_accessor.rb
252
+ - lib/active_support/deprecation/disallowed.rb
229
253
  - lib/active_support/deprecation/instance_delegator.rb
230
254
  - lib/active_support/deprecation/method_wrappers.rb
231
255
  - lib/active_support/deprecation/proxy_wrappers.rb
232
256
  - lib/active_support/deprecation/reporting.rb
233
257
  - lib/active_support/descendants_tracker.rb
258
+ - lib/active_support/digest.rb
234
259
  - lib/active_support/duration.rb
235
260
  - lib/active_support/duration/iso8601_parser.rb
236
261
  - lib/active_support/duration/iso8601_serializer.rb
262
+ - lib/active_support/encrypted_configuration.rb
263
+ - lib/active_support/encrypted_file.rb
264
+ - lib/active_support/environment_inquirer.rb
237
265
  - lib/active_support/evented_file_update_checker.rb
238
266
  - lib/active_support/execution_wrapper.rb
239
267
  - lib/active_support/executor.rb
240
268
  - lib/active_support/file_update_checker.rb
269
+ - lib/active_support/fork_tracker.rb
241
270
  - lib/active_support/gem_version.rb
242
271
  - lib/active_support/gzip.rb
243
272
  - lib/active_support/hash_with_indifferent_access.rb
@@ -253,6 +282,7 @@ files:
253
282
  - lib/active_support/json/encoding.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
@@ -261,6 +291,9 @@ files:
261
291
  - lib/active_support/logger_thread_safe_level.rb
262
292
  - lib/active_support/message_encryptor.rb
263
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
264
297
  - lib/active_support/multibyte.rb
265
298
  - lib/active_support/multibyte/chars.rb
266
299
  - lib/active_support/multibyte/unicode.rb
@@ -276,15 +309,18 @@ files:
276
309
  - lib/active_support/number_helper/number_to_percentage_converter.rb
277
310
  - lib/active_support/number_helper/number_to_phone_converter.rb
278
311
  - lib/active_support/number_helper/number_to_rounded_converter.rb
312
+ - lib/active_support/number_helper/rounding_helper.rb
279
313
  - lib/active_support/option_merger.rb
280
314
  - lib/active_support/ordered_hash.rb
281
315
  - lib/active_support/ordered_options.rb
316
+ - lib/active_support/parameter_filter.rb
282
317
  - lib/active_support/per_thread_registry.rb
283
318
  - lib/active_support/proxy_object.rb
284
319
  - lib/active_support/rails.rb
285
320
  - lib/active_support/railtie.rb
286
321
  - lib/active_support/reloader.rb
287
322
  - lib/active_support/rescuable.rb
323
+ - lib/active_support/secure_compare_rotator.rb
288
324
  - lib/active_support/security_utils.rb
289
325
  - lib/active_support/string_inquirer.rb
290
326
  - lib/active_support/subscriber.rb
@@ -298,6 +334,9 @@ files:
298
334
  - lib/active_support/testing/file_fixtures.rb
299
335
  - lib/active_support/testing/isolation.rb
300
336
  - lib/active_support/testing/method_call_assertions.rb
337
+ - lib/active_support/testing/parallelization.rb
338
+ - lib/active_support/testing/parallelization/server.rb
339
+ - lib/active_support/testing/parallelization/worker.rb
301
340
  - lib/active_support/testing/setup_and_teardown.rb
302
341
  - lib/active_support/testing/stream.rb
303
342
  - lib/active_support/testing/tagged_logging.rb
@@ -305,7 +344,6 @@ files:
305
344
  - lib/active_support/time.rb
306
345
  - lib/active_support/time_with_zone.rb
307
346
  - lib/active_support/values/time_zone.rb
308
- - lib/active_support/values/unicode_tables.dat
309
347
  - lib/active_support/version.rb
310
348
  - lib/active_support/xml_mini.rb
311
349
  - lib/active_support/xml_mini/jdom.rb
@@ -314,10 +352,15 @@ files:
314
352
  - lib/active_support/xml_mini/nokogiri.rb
315
353
  - lib/active_support/xml_mini/nokogirisax.rb
316
354
  - lib/active_support/xml_mini/rexml.rb
317
- homepage: http://rubyonrails.org
355
+ homepage: https://rubyonrails.org
318
356
  licenses:
319
357
  - MIT
320
- metadata: {}
358
+ metadata:
359
+ bug_tracker_uri: https://github.com/rails/rails/issues
360
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.0/activesupport/CHANGELOG.md
361
+ documentation_uri: https://api.rubyonrails.org/v6.1.0/
362
+ mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
363
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.0/activesupport
321
364
  post_install_message:
322
365
  rdoc_options:
323
366
  - "--encoding"
@@ -328,15 +371,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
328
371
  requirements:
329
372
  - - ">="
330
373
  - !ruby/object:Gem::Version
331
- version: 2.2.2
374
+ version: 2.5.0
332
375
  required_rubygems_version: !ruby/object:Gem::Requirement
333
376
  requirements:
334
377
  - - ">="
335
378
  - !ruby/object:Gem::Version
336
379
  version: '0'
337
380
  requirements: []
338
- rubyforge_project:
339
- rubygems_version: 2.6.4
381
+ rubygems_version: 3.1.4
340
382
  signing_key:
341
383
  specification_version: 4
342
384
  summary: A toolkit of support libraries and Ruby core extensions extracted from the
@@ -1,19 +0,0 @@
1
- require 'concurrent/atomic/count_down_latch'
2
-
3
- module ActiveSupport
4
- module Concurrency
5
- class Latch < Concurrent::CountDownLatch
6
-
7
- def initialize(count = 1)
8
- ActiveSupport::Deprecation.warn("ActiveSupport::Concurrency::Latch is deprecated. Please use Concurrent::CountDownLatch instead.")
9
- super(count)
10
- end
11
-
12
- alias_method :release, :count_down
13
-
14
- def await
15
- wait(nil)
16
- end
17
- end
18
- end
19
- 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,20 +0,0 @@
1
- class Hash
2
- # Returns a hash with non +nil+ values.
3
- #
4
- # hash = { a: true, b: false, c: nil}
5
- # hash.compact # => { a: true, b: false}
6
- # hash # => { a: true, b: false, c: nil}
7
- # { c: nil }.compact # => {}
8
- def compact
9
- self.select { |_, value| !value.nil? }
10
- end
11
-
12
- # Replaces current hash with non +nil+ values.
13
- #
14
- # hash = { a: true, b: false, c: nil}
15
- # hash.compact! # => { a: true, b: false}
16
- # hash # => { a: true, b: false}
17
- def compact!
18
- self.reject! { |_, value| value.nil? }
19
- end
20
- end
@@ -1,29 +0,0 @@
1
- class Hash
2
- # Returns a new hash with the results of running +block+ once for every value.
3
- # The keys are unchanged.
4
- #
5
- # { a: 1, b: 2, c: 3 }.transform_values { |x| x * 2 } # => { a: 2, b: 4, c: 6 }
6
- #
7
- # If you do not provide a +block+, it will return an Enumerator
8
- # for chaining with other methods:
9
- #
10
- # { a: 1, b: 2 }.transform_values.with_index { |v, i| [v, i].join.to_i } # => { a: 10, b: 21 }
11
- def transform_values
12
- return enum_for(:transform_values) { size } unless block_given?
13
- return {} if empty?
14
- result = self.class.new
15
- each do |key, value|
16
- result[key] = yield(value)
17
- end
18
- result
19
- end
20
-
21
- # Destructively converts all values using the +block+ operations.
22
- # Same as +transform_values+ but modifies +self+.
23
- def transform_values!
24
- return enum_for(:transform_values!) { size } unless block_given?
25
- each do |key, value|
26
- self[key] = yield(value)
27
- end
28
- end
29
- 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,3 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- ActiveSupport::Deprecation.warn("This file is deprecated and will be removed in Rails 5.1 with no replacement.")
@@ -1,3 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- ActiveSupport::Deprecation.warn("This file is deprecated and will be removed in Rails 5.1 with no replacement.")
@@ -1,70 +0,0 @@
1
- require 'active_support/core_ext/string/inflections'
2
-
3
- #--
4
- # Allows code reuse in the methods below without polluting Module.
5
- #++
6
-
7
- module ActiveSupport
8
- module QualifiedConstUtils
9
- def self.raise_if_absolute(path)
10
- raise NameError.new("wrong constant name #$&") if path =~ /\A::[^:]+/
11
- end
12
-
13
- def self.names(path)
14
- path.split('::')
15
- end
16
- end
17
- end
18
-
19
- ##
20
- # Extends the API for constants to be able to deal with qualified names. Arguments
21
- # are assumed to be relative to the receiver.
22
- #
23
- #--
24
- # Qualified names are required to be relative because we are extending existing
25
- # methods that expect constant names, ie, relative paths of length 1. For example,
26
- # Object.const_get('::String') raises NameError and so does qualified_const_get.
27
- #++
28
- class Module
29
- def qualified_const_defined?(path, search_parents=true)
30
- ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
31
- Module#qualified_const_defined? is deprecated in favour of the builtin
32
- Module#const_defined? and will be removed in Rails 5.1.
33
- MESSAGE
34
-
35
- ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)
36
-
37
- ActiveSupport::QualifiedConstUtils.names(path).inject(self) do |mod, name|
38
- return unless mod.const_defined?(name, search_parents)
39
- mod.const_get(name)
40
- end
41
- return true
42
- end
43
-
44
- def qualified_const_get(path)
45
- ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
46
- Module#qualified_const_get is deprecated in favour of the builtin
47
- Module#const_get and will be removed in Rails 5.1.
48
- MESSAGE
49
-
50
- ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)
51
-
52
- ActiveSupport::QualifiedConstUtils.names(path).inject(self) do |mod, name|
53
- mod.const_get(name)
54
- end
55
- end
56
-
57
- def qualified_const_set(path, value)
58
- ActiveSupport::Deprecation.warn(<<-MESSAGE.squish)
59
- Module#qualified_const_set is deprecated in favour of the builtin
60
- Module#const_set and will be removed in Rails 5.1.
61
- MESSAGE
62
-
63
- ActiveSupport::QualifiedConstUtils.raise_if_absolute(path)
64
-
65
- const_name = path.demodulize
66
- mod_name = path.deconstantize
67
- mod = mod_name.empty? ? self : const_get(mod_name)
68
- mod.const_set(const_name, value)
69
- end
70
- end
@@ -1,8 +0,0 @@
1
- require 'active_support/core_ext/module/anonymous'
2
- require 'active_support/core_ext/string/inflections'
3
-
4
- class Module
5
- def reachable? #:nodoc:
6
- !anonymous? && name.safe_constantize.equal?(self)
7
- end
8
- end
@@ -1,26 +0,0 @@
1
- unless 1.respond_to?(:positive?) # TODO: Remove this file when we drop support to ruby < 2.3
2
- class Numeric
3
- # Returns true if the number is positive.
4
- #
5
- # 1.positive? # => true
6
- # 0.positive? # => false
7
- # -1.positive? # => false
8
- def positive?
9
- self > 0
10
- end
11
-
12
- # Returns true if the number is negative.
13
- #
14
- # -1.negative? # => true
15
- # 0.negative? # => false
16
- # 1.negative? # => false
17
- def negative?
18
- self < 0
19
- end
20
- end
21
-
22
- class Complex
23
- undef :positive?
24
- undef :negative?
25
- end
26
- end
@@ -1,23 +0,0 @@
1
- module ActiveSupport
2
- module IncludeWithRange #:nodoc:
3
- # Extends the default Range#include? to support range comparisons.
4
- # (1..5).include?(1..5) # => true
5
- # (1..5).include?(2..3) # => true
6
- # (1..5).include?(2..6) # => false
7
- #
8
- # The native Range#include? behavior is untouched.
9
- # ('a'..'f').include?('c') # => true
10
- # (5..9).include?(11) # => false
11
- def include?(value)
12
- if value.is_a?(::Range)
13
- # 1...10 includes 1..9 but it does not include 1..10.
14
- operator = exclude_end? && !value.exclude_end? ? :< : :<=
15
- super(value.first) && value.last.send(operator, last)
16
- else
17
- super
18
- end
19
- end
20
- end
21
- end
22
-
23
- Range.prepend(ActiveSupport::IncludeWithRange)
@@ -1,3 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- ActiveSupport::Deprecation.warn("This file is deprecated and will be removed in Rails 5.1 with no replacement.")
@@ -1,3 +0,0 @@
1
- require 'active_support/deprecation'
2
-
3
- ActiveSupport::Deprecation.warn("This is deprecated and will be removed in Rails 5.1 with no replacement.")