activesupport 4.2.0 → 5.2.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 (254) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +366 -232
  3. data/MIT-LICENSE +2 -2
  4. data/README.rdoc +4 -5
  5. data/lib/active_support.rb +17 -7
  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 +7 -5
  9. data/lib/active_support/benchmarkable.rb +6 -4
  10. data/lib/active_support/builder.rb +3 -1
  11. data/lib/active_support/cache.rb +271 -177
  12. data/lib/active_support/cache/file_store.rb +41 -35
  13. data/lib/active_support/cache/mem_cache_store.rb +97 -88
  14. data/lib/active_support/cache/memory_store.rb +27 -30
  15. data/lib/active_support/cache/null_store.rb +7 -8
  16. data/lib/active_support/cache/redis_cache_store.rb +454 -0
  17. data/lib/active_support/cache/strategy/local_cache.rb +67 -34
  18. data/lib/active_support/cache/strategy/local_cache_middleware.rb +10 -9
  19. data/lib/active_support/callbacks.rb +654 -560
  20. data/lib/active_support/concern.rb +5 -3
  21. data/lib/active_support/concurrency/load_interlock_aware_monitor.rb +17 -0
  22. data/lib/active_support/concurrency/share_lock.rb +227 -0
  23. data/lib/active_support/configurable.rb +8 -5
  24. data/lib/active_support/core_ext.rb +3 -1
  25. data/lib/active_support/core_ext/array.rb +9 -6
  26. data/lib/active_support/core_ext/array/access.rb +29 -1
  27. data/lib/active_support/core_ext/array/conversions.rb +22 -18
  28. data/lib/active_support/core_ext/array/extract_options.rb +2 -0
  29. data/lib/active_support/core_ext/array/grouping.rb +11 -18
  30. data/lib/active_support/core_ext/array/inquiry.rb +19 -0
  31. data/lib/active_support/core_ext/array/prepend_and_append.rb +5 -3
  32. data/lib/active_support/core_ext/array/wrap.rb +7 -4
  33. data/lib/active_support/core_ext/benchmark.rb +3 -1
  34. data/lib/active_support/core_ext/big_decimal.rb +3 -1
  35. data/lib/active_support/core_ext/big_decimal/conversions.rb +10 -12
  36. data/lib/active_support/core_ext/class.rb +4 -3
  37. data/lib/active_support/core_ext/class/attribute.rb +41 -22
  38. data/lib/active_support/core_ext/class/attribute_accessors.rb +3 -1
  39. data/lib/active_support/core_ext/class/subclasses.rb +20 -8
  40. data/lib/active_support/core_ext/date.rb +6 -4
  41. data/lib/active_support/core_ext/date/acts_like.rb +3 -1
  42. data/lib/active_support/core_ext/date/blank.rb +14 -0
  43. data/lib/active_support/core_ext/date/calculations.rb +11 -9
  44. data/lib/active_support/core_ext/date/conversions.rb +31 -23
  45. data/lib/active_support/core_ext/date/zones.rb +4 -2
  46. data/lib/active_support/core_ext/date_and_time/calculations.rb +179 -56
  47. data/lib/active_support/core_ext/date_and_time/compatibility.rb +16 -0
  48. data/lib/active_support/core_ext/date_and_time/zones.rb +12 -12
  49. data/lib/active_support/core_ext/date_time.rb +7 -4
  50. data/lib/active_support/core_ext/date_time/acts_like.rb +4 -2
  51. data/lib/active_support/core_ext/date_time/blank.rb +14 -0
  52. data/lib/active_support/core_ext/date_time/calculations.rb +58 -20
  53. data/lib/active_support/core_ext/date_time/compatibility.rb +18 -0
  54. data/lib/active_support/core_ext/date_time/conversions.rb +16 -12
  55. data/lib/active_support/core_ext/digest/uuid.rb +7 -5
  56. data/lib/active_support/core_ext/enumerable.rb +107 -28
  57. data/lib/active_support/core_ext/file.rb +3 -1
  58. data/lib/active_support/core_ext/file/atomic.rb +38 -31
  59. data/lib/active_support/core_ext/hash.rb +11 -9
  60. data/lib/active_support/core_ext/hash/compact.rb +24 -15
  61. data/lib/active_support/core_ext/hash/conversions.rb +63 -43
  62. data/lib/active_support/core_ext/hash/deep_merge.rb +9 -13
  63. data/lib/active_support/core_ext/hash/except.rb +11 -8
  64. data/lib/active_support/core_ext/hash/indifferent_access.rb +4 -3
  65. data/lib/active_support/core_ext/hash/keys.rb +33 -27
  66. data/lib/active_support/core_ext/hash/reverse_merge.rb +5 -2
  67. data/lib/active_support/core_ext/hash/slice.rb +8 -8
  68. data/lib/active_support/core_ext/hash/transform_values.rb +16 -7
  69. data/lib/active_support/core_ext/integer.rb +5 -3
  70. data/lib/active_support/core_ext/integer/inflections.rb +3 -1
  71. data/lib/active_support/core_ext/integer/multiple.rb +2 -0
  72. data/lib/active_support/core_ext/integer/time.rb +11 -33
  73. data/lib/active_support/core_ext/kernel.rb +6 -5
  74. data/lib/active_support/core_ext/kernel/agnostics.rb +2 -0
  75. data/lib/active_support/core_ext/kernel/concern.rb +5 -1
  76. data/lib/active_support/core_ext/kernel/reporting.rb +4 -83
  77. data/lib/active_support/core_ext/kernel/singleton_class.rb +2 -0
  78. data/lib/active_support/core_ext/load_error.rb +3 -22
  79. data/lib/active_support/core_ext/marshal.rb +13 -10
  80. data/lib/active_support/core_ext/module.rb +14 -11
  81. data/lib/active_support/core_ext/module/aliasing.rb +6 -44
  82. data/lib/active_support/core_ext/module/anonymous.rb +12 -1
  83. data/lib/active_support/core_ext/module/attr_internal.rb +8 -9
  84. data/lib/active_support/core_ext/module/attribute_accessors.rb +43 -40
  85. data/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +150 -0
  86. data/lib/active_support/core_ext/module/concerning.rb +11 -12
  87. data/lib/active_support/core_ext/module/delegation.rb +121 -39
  88. data/lib/active_support/core_ext/module/deprecation.rb +4 -2
  89. data/lib/active_support/core_ext/module/introspection.rb +9 -9
  90. data/lib/active_support/core_ext/module/reachable.rb +5 -2
  91. data/lib/active_support/core_ext/module/redefine_method.rb +49 -0
  92. data/lib/active_support/core_ext/module/remove_method.rb +8 -3
  93. data/lib/active_support/core_ext/name_error.rb +22 -2
  94. data/lib/active_support/core_ext/numeric.rb +6 -3
  95. data/lib/active_support/core_ext/numeric/bytes.rb +22 -0
  96. data/lib/active_support/core_ext/numeric/conversions.rb +79 -74
  97. data/lib/active_support/core_ext/numeric/inquiry.rb +28 -0
  98. data/lib/active_support/core_ext/numeric/time.rb +35 -38
  99. data/lib/active_support/core_ext/object.rb +14 -13
  100. data/lib/active_support/core_ext/object/acts_like.rb +12 -1
  101. data/lib/active_support/core_ext/object/blank.rb +29 -4
  102. data/lib/active_support/core_ext/object/conversions.rb +6 -4
  103. data/lib/active_support/core_ext/object/deep_dup.rb +13 -4
  104. data/lib/active_support/core_ext/object/duplicable.rb +98 -45
  105. data/lib/active_support/core_ext/object/inclusion.rb +5 -3
  106. data/lib/active_support/core_ext/object/instance_variables.rb +3 -1
  107. data/lib/active_support/core_ext/object/json.rb +49 -19
  108. data/lib/active_support/core_ext/object/to_param.rb +3 -1
  109. data/lib/active_support/core_ext/object/to_query.rb +6 -4
  110. data/lib/active_support/core_ext/object/try.rb +70 -22
  111. data/lib/active_support/core_ext/object/with_options.rb +16 -3
  112. data/lib/active_support/core_ext/range.rb +7 -4
  113. data/lib/active_support/core_ext/range/conversions.rb +27 -7
  114. data/lib/active_support/core_ext/range/each.rb +19 -17
  115. data/lib/active_support/core_ext/range/include_range.rb +21 -19
  116. data/lib/active_support/core_ext/range/include_time_with_zone.rb +23 -0
  117. data/lib/active_support/core_ext/range/overlaps.rb +2 -0
  118. data/lib/active_support/core_ext/regexp.rb +6 -0
  119. data/lib/active_support/core_ext/securerandom.rb +25 -0
  120. data/lib/active_support/core_ext/string.rb +15 -13
  121. data/lib/active_support/core_ext/string/access.rb +9 -7
  122. data/lib/active_support/core_ext/string/behavior.rb +3 -1
  123. data/lib/active_support/core_ext/string/conversions.rb +8 -5
  124. data/lib/active_support/core_ext/string/exclude.rb +2 -0
  125. data/lib/active_support/core_ext/string/filters.rb +10 -8
  126. data/lib/active_support/core_ext/string/indent.rb +6 -4
  127. data/lib/active_support/core_ext/string/inflections.rb +61 -24
  128. data/lib/active_support/core_ext/string/inquiry.rb +3 -1
  129. data/lib/active_support/core_ext/string/multibyte.rb +15 -7
  130. data/lib/active_support/core_ext/string/output_safety.rb +35 -35
  131. data/lib/active_support/core_ext/string/starts_ends_with.rb +2 -0
  132. data/lib/active_support/core_ext/string/strip.rb +4 -5
  133. data/lib/active_support/core_ext/string/zones.rb +4 -2
  134. data/lib/active_support/core_ext/time.rb +7 -5
  135. data/lib/active_support/core_ext/time/acts_like.rb +3 -1
  136. data/lib/active_support/core_ext/time/calculations.rb +101 -51
  137. data/lib/active_support/core_ext/time/compatibility.rb +16 -0
  138. data/lib/active_support/core_ext/time/conversions.rb +20 -13
  139. data/lib/active_support/core_ext/time/zones.rb +41 -7
  140. data/lib/active_support/core_ext/uri.rb +5 -4
  141. data/lib/active_support/current_attributes.rb +195 -0
  142. data/lib/active_support/dependencies.rb +143 -160
  143. data/lib/active_support/dependencies/autoload.rb +2 -0
  144. data/lib/active_support/dependencies/interlock.rb +57 -0
  145. data/lib/active_support/deprecation.rb +12 -9
  146. data/lib/active_support/deprecation/behaviors.rb +41 -12
  147. data/lib/active_support/deprecation/constant_accessor.rb +52 -0
  148. data/lib/active_support/deprecation/instance_delegator.rb +17 -2
  149. data/lib/active_support/deprecation/method_wrappers.rb +54 -21
  150. data/lib/active_support/deprecation/proxy_wrappers.rb +56 -28
  151. data/lib/active_support/deprecation/reporting.rb +32 -12
  152. data/lib/active_support/descendants_tracker.rb +2 -0
  153. data/lib/active_support/digest.rb +20 -0
  154. data/lib/active_support/duration.rb +326 -30
  155. data/lib/active_support/duration/iso8601_parser.rb +125 -0
  156. data/lib/active_support/duration/iso8601_serializer.rb +55 -0
  157. data/lib/active_support/encrypted_configuration.rb +49 -0
  158. data/lib/active_support/encrypted_file.rb +99 -0
  159. data/lib/active_support/evented_file_update_checker.rb +205 -0
  160. data/lib/active_support/execution_wrapper.rb +128 -0
  161. data/lib/active_support/executor.rb +8 -0
  162. data/lib/active_support/file_update_checker.rb +63 -37
  163. data/lib/active_support/gem_version.rb +4 -2
  164. data/lib/active_support/gzip.rb +7 -5
  165. data/lib/active_support/hash_with_indifferent_access.rb +130 -30
  166. data/lib/active_support/i18n.rb +8 -6
  167. data/lib/active_support/i18n_railtie.rb +34 -14
  168. data/lib/active_support/inflections.rb +13 -11
  169. data/lib/active_support/inflector.rb +7 -5
  170. data/lib/active_support/inflector/inflections.rb +61 -12
  171. data/lib/active_support/inflector/methods.rb +161 -136
  172. data/lib/active_support/inflector/transliterate.rb +48 -27
  173. data/lib/active_support/json.rb +4 -2
  174. data/lib/active_support/json/decoding.rb +16 -13
  175. data/lib/active_support/json/encoding.rb +15 -57
  176. data/lib/active_support/key_generator.rb +25 -25
  177. data/lib/active_support/lazy_load_hooks.rb +50 -20
  178. data/lib/active_support/locale/en.yml +2 -0
  179. data/lib/active_support/log_subscriber.rb +13 -10
  180. data/lib/active_support/log_subscriber/test_helper.rb +14 -12
  181. data/lib/active_support/logger.rb +54 -3
  182. data/lib/active_support/logger_silence.rb +12 -7
  183. data/lib/active_support/logger_thread_safe_level.rb +33 -0
  184. data/lib/active_support/message_encryptor.rb +173 -51
  185. data/lib/active_support/message_verifier.rb +150 -17
  186. data/lib/active_support/messages/metadata.rb +71 -0
  187. data/lib/active_support/messages/rotation_configuration.rb +22 -0
  188. data/lib/active_support/messages/rotator.rb +56 -0
  189. data/lib/active_support/multibyte.rb +4 -2
  190. data/lib/active_support/multibyte/chars.rb +37 -24
  191. data/lib/active_support/multibyte/unicode.rb +100 -96
  192. data/lib/active_support/notifications.rb +11 -7
  193. data/lib/active_support/notifications/fanout.rb +10 -8
  194. data/lib/active_support/notifications/instrumenter.rb +27 -7
  195. data/lib/active_support/number_helper.rb +94 -68
  196. data/lib/active_support/number_helper/number_converter.rb +13 -11
  197. data/lib/active_support/number_helper/number_to_currency_converter.rb +9 -9
  198. data/lib/active_support/number_helper/number_to_delimited_converter.rb +9 -3
  199. data/lib/active_support/number_helper/number_to_human_converter.rb +11 -9
  200. data/lib/active_support/number_helper/number_to_human_size_converter.rb +9 -8
  201. data/lib/active_support/number_helper/number_to_percentage_converter.rb +3 -1
  202. data/lib/active_support/number_helper/number_to_phone_converter.rb +13 -4
  203. data/lib/active_support/number_helper/number_to_rounded_converter.rb +23 -56
  204. data/lib/active_support/number_helper/rounding_helper.rb +66 -0
  205. data/lib/active_support/option_merger.rb +3 -1
  206. data/lib/active_support/ordered_hash.rb +6 -4
  207. data/lib/active_support/ordered_options.rb +22 -4
  208. data/lib/active_support/per_thread_registry.rb +13 -6
  209. data/lib/active_support/proxy_object.rb +2 -0
  210. data/lib/active_support/rails.rb +16 -8
  211. data/lib/active_support/railtie.rb +43 -9
  212. data/lib/active_support/reloader.rb +131 -0
  213. data/lib/active_support/rescuable.rb +108 -53
  214. data/lib/active_support/security_utils.rb +17 -6
  215. data/lib/active_support/string_inquirer.rb +11 -3
  216. data/lib/active_support/subscriber.rb +15 -14
  217. data/lib/active_support/tagged_logging.rb +14 -11
  218. data/lib/active_support/test_case.rb +18 -46
  219. data/lib/active_support/testing/assertions.rb +137 -20
  220. data/lib/active_support/testing/autorun.rb +4 -2
  221. data/lib/active_support/testing/constant_lookup.rb +2 -1
  222. data/lib/active_support/testing/declarative.rb +3 -1
  223. data/lib/active_support/testing/deprecation.rb +14 -10
  224. data/lib/active_support/testing/file_fixtures.rb +36 -0
  225. data/lib/active_support/testing/isolation.rb +34 -25
  226. data/lib/active_support/testing/method_call_assertions.rb +43 -0
  227. data/lib/active_support/testing/setup_and_teardown.rb +12 -3
  228. data/lib/active_support/testing/stream.rb +44 -0
  229. data/lib/active_support/testing/tagged_logging.rb +3 -1
  230. data/lib/active_support/testing/time_helpers.rb +96 -27
  231. data/lib/active_support/time.rb +14 -12
  232. data/lib/active_support/time_with_zone.rb +195 -53
  233. data/lib/active_support/values/time_zone.rb +200 -61
  234. data/lib/active_support/values/unicode_tables.dat +0 -0
  235. data/lib/active_support/version.rb +3 -1
  236. data/lib/active_support/xml_mini.rb +69 -51
  237. data/lib/active_support/xml_mini/jdom.rb +116 -113
  238. data/lib/active_support/xml_mini/libxml.rb +17 -16
  239. data/lib/active_support/xml_mini/libxmlsax.rb +16 -18
  240. data/lib/active_support/xml_mini/nokogiri.rb +15 -15
  241. data/lib/active_support/xml_mini/nokogirisax.rb +15 -16
  242. data/lib/active_support/xml_mini/rexml.rb +17 -16
  243. metadata +55 -43
  244. data/lib/active_support/concurrency/latch.rb +0 -27
  245. data/lib/active_support/core_ext/big_decimal/yaml_conversions.rb +0 -14
  246. data/lib/active_support/core_ext/class/delegating_attributes.rb +0 -45
  247. data/lib/active_support/core_ext/date_time/zones.rb +0 -6
  248. data/lib/active_support/core_ext/kernel/debugger.rb +0 -10
  249. data/lib/active_support/core_ext/module/method_transplanting.rb +0 -11
  250. data/lib/active_support/core_ext/module/qualified_const.rb +0 -52
  251. data/lib/active_support/core_ext/object/itself.rb +0 -15
  252. data/lib/active_support/core_ext/struct.rb +0 -6
  253. data/lib/active_support/core_ext/thread.rb +0 -86
  254. data/lib/active_support/core_ext/time/marshal.rb +0 -30
@@ -1,11 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
- require 'nokogiri'
4
+ require "nokogiri"
3
5
  rescue LoadError => e
4
6
  $stderr.puts "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install"
5
7
  raise e
6
8
  end
7
- require 'active_support/core_ext/object/blank'
8
- require 'stringio'
9
+ require "active_support/core_ext/object/blank"
10
+ require "stringio"
9
11
 
10
12
  module ActiveSupport
11
13
  module XmlMini_NokogiriSAX #:nodoc:
@@ -14,9 +16,8 @@ module ActiveSupport
14
16
  # Class that will build the hash while the XML document
15
17
  # is being parsed using SAX events.
16
18
  class HashBuilder < Nokogiri::XML::SAX::Document
17
-
18
- CONTENT_KEY = '__content__'.freeze
19
- HASH_SIZE_KEY = '__hash_size__'.freeze
19
+ CONTENT_KEY = "__content__".freeze
20
+ HASH_SIZE_KEY = "__hash_size__".freeze
20
21
 
21
22
  attr_reader :hash
22
23
 
@@ -38,20 +39,20 @@ module ActiveSupport
38
39
  end
39
40
 
40
41
  def start_element(name, attrs = [])
41
- new_hash = { CONTENT_KEY => '' }.merge!(Hash[attrs])
42
+ new_hash = { CONTENT_KEY => "".dup }.merge!(Hash[attrs])
42
43
  new_hash[HASH_SIZE_KEY] = new_hash.size + 1
43
44
 
44
45
  case current_hash[name]
45
- when Array then current_hash[name] << new_hash
46
- when Hash then current_hash[name] = [current_hash[name], new_hash]
47
- when nil then current_hash[name] = new_hash
46
+ when Array then current_hash[name] << new_hash
47
+ when Hash then current_hash[name] = [current_hash[name], new_hash]
48
+ when nil then current_hash[name] = new_hash
48
49
  end
49
50
 
50
51
  @hash_stack.push(new_hash)
51
52
  end
52
53
 
53
54
  def end_element(name)
54
- if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ''
55
+ if current_hash.length > current_hash.delete(HASH_SIZE_KEY) && current_hash[CONTENT_KEY].blank? || current_hash[CONTENT_KEY] == ""
55
56
  current_hash.delete(CONTENT_KEY)
56
57
  end
57
58
  @hash_stack.pop
@@ -69,15 +70,13 @@ module ActiveSupport
69
70
 
70
71
  def parse(data)
71
72
  if !data.respond_to?(:read)
72
- data = StringIO.new(data || '')
73
+ data = StringIO.new(data || "")
73
74
  end
74
75
 
75
- char = data.getc
76
- if char.nil?
76
+ if data.eof?
77
77
  {}
78
78
  else
79
- data.ungetc(char)
80
- document = self.document_class.new
79
+ document = document_class.new
81
80
  parser = Nokogiri::XML::SAX::Parser.new(document)
82
81
  parser.parse(data)
83
82
  document.hash
@@ -1,12 +1,14 @@
1
- require 'active_support/core_ext/kernel/reporting'
2
- require 'active_support/core_ext/object/blank'
3
- require 'stringio'
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/core_ext/kernel/reporting"
4
+ require "active_support/core_ext/object/blank"
5
+ require "stringio"
4
6
 
5
7
  module ActiveSupport
6
8
  module XmlMini_REXML #:nodoc:
7
9
  extend self
8
10
 
9
- CONTENT_KEY = '__content__'.freeze
11
+ CONTENT_KEY = "__content__".freeze
10
12
 
11
13
  # Parse an XML Document string or IO into a simple hash.
12
14
  #
@@ -17,19 +19,17 @@ module ActiveSupport
17
19
  # XML Document string or IO to parse
18
20
  def parse(data)
19
21
  if !data.respond_to?(:read)
20
- data = StringIO.new(data || '')
22
+ data = StringIO.new(data || "")
21
23
  end
22
24
 
23
- char = data.getc
24
- if char.nil?
25
+ if data.eof?
25
26
  {}
26
27
  else
27
- data.ungetc(char)
28
- silence_warnings { require 'rexml/document' } unless defined?(REXML::Document)
28
+ silence_warnings { require "rexml/document" } unless defined?(REXML::Document)
29
29
  doc = REXML::Document.new(data)
30
30
 
31
31
  if doc.root
32
- merge_element!({}, doc.root)
32
+ merge_element!({}, doc.root, XmlMini.depth)
33
33
  else
34
34
  raise REXML::ParseException,
35
35
  "The document #{doc.to_s.inspect} does not have a valid root"
@@ -44,19 +44,20 @@ module ActiveSupport
44
44
  # Hash to merge the converted element into.
45
45
  # element::
46
46
  # XML element to merge into hash
47
- def merge_element!(hash, element)
48
- merge!(hash, element.name, collapse(element))
47
+ def merge_element!(hash, element, depth)
48
+ raise REXML::ParseException, "The document is too deep" if depth == 0
49
+ merge!(hash, element.name, collapse(element, depth))
49
50
  end
50
51
 
51
52
  # Actually converts an XML document element into a data structure.
52
53
  #
53
54
  # element::
54
55
  # The document element to be collapsed.
55
- def collapse(element)
56
+ def collapse(element, depth)
56
57
  hash = get_attributes(element)
57
58
 
58
59
  if element.has_elements?
59
- element.each_element {|child| merge_element!(hash, child) }
60
+ element.each_element { |child| merge_element!(hash, child, depth - 1) }
60
61
  merge_texts!(hash, element) unless empty_content?(element)
61
62
  hash
62
63
  else
@@ -75,7 +76,7 @@ module ActiveSupport
75
76
  hash
76
77
  else
77
78
  # must use value to prevent double-escaping
78
- texts = ''
79
+ texts = "".dup
79
80
  element.texts.each { |t| texts << t.value }
80
81
  merge!(hash, CONTENT_KEY, texts)
81
82
  end
@@ -114,7 +115,7 @@ module ActiveSupport
114
115
  # XML element to extract attributes from.
115
116
  def get_attributes(element)
116
117
  attributes = {}
117
- element.attributes.each { |n,v| attributes[n] = v }
118
+ element.attributes.each { |n, v| attributes[n] = v }
118
119
  attributes
119
120
  end
120
121
 
metadata CHANGED
@@ -1,49 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 5.2.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: 2014-12-20 00:00:00.000000000 Z
11
+ date: 2018-04-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
18
  - !ruby/object:Gem::Version
19
19
  version: '0.7'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
20
+ - - "<"
25
21
  - !ruby/object:Gem::Version
26
- version: '0.7'
27
- - !ruby/object:Gem::Dependency
28
- name: json
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '1.7'
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 1.7.7
22
+ version: '2'
37
23
  type: :runtime
38
24
  prerelease: false
39
25
  version_requirements: !ruby/object:Gem::Requirement
40
26
  requirements:
41
- - - "~>"
42
- - !ruby/object:Gem::Version
43
- version: '1.7'
44
27
  - - ">="
45
28
  - !ruby/object:Gem::Version
46
- version: 1.7.7
29
+ version: '0.7'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2'
47
33
  - !ruby/object:Gem::Dependency
48
34
  name: tzinfo
49
35
  requirement: !ruby/object:Gem::Requirement
@@ -73,25 +59,25 @@ dependencies:
73
59
  - !ruby/object:Gem::Version
74
60
  version: '5.1'
75
61
  - !ruby/object:Gem::Dependency
76
- name: thread_safe
62
+ name: concurrent-ruby
77
63
  requirement: !ruby/object:Gem::Requirement
78
64
  requirements:
79
65
  - - "~>"
80
66
  - !ruby/object:Gem::Version
81
- version: '0.3'
67
+ version: '1.0'
82
68
  - - ">="
83
69
  - !ruby/object:Gem::Version
84
- version: 0.3.4
70
+ version: 1.0.2
85
71
  type: :runtime
86
72
  prerelease: false
87
73
  version_requirements: !ruby/object:Gem::Requirement
88
74
  requirements:
89
75
  - - "~>"
90
76
  - !ruby/object:Gem::Version
91
- version: '0.3'
77
+ version: '1.0'
92
78
  - - ">="
93
79
  - !ruby/object:Gem::Version
94
- version: 0.3.4
80
+ version: 1.0.2
95
81
  description: A toolkit of support libraries and Ruby core extensions extracted from
96
82
  the Rails framework. Rich support for multibyte strings, internationalization, time
97
83
  zones, and testing.
@@ -105,6 +91,7 @@ files:
105
91
  - README.rdoc
106
92
  - lib/active_support.rb
107
93
  - lib/active_support/all.rb
94
+ - lib/active_support/array_inquirer.rb
108
95
  - lib/active_support/backtrace_cleaner.rb
109
96
  - lib/active_support/benchmarkable.rb
110
97
  - lib/active_support/builder.rb
@@ -113,11 +100,13 @@ files:
113
100
  - lib/active_support/cache/mem_cache_store.rb
114
101
  - lib/active_support/cache/memory_store.rb
115
102
  - lib/active_support/cache/null_store.rb
103
+ - lib/active_support/cache/redis_cache_store.rb
116
104
  - lib/active_support/cache/strategy/local_cache.rb
117
105
  - lib/active_support/cache/strategy/local_cache_middleware.rb
118
106
  - lib/active_support/callbacks.rb
119
107
  - lib/active_support/concern.rb
120
- - lib/active_support/concurrency/latch.rb
108
+ - lib/active_support/concurrency/load_interlock_aware_monitor.rb
109
+ - lib/active_support/concurrency/share_lock.rb
121
110
  - lib/active_support/configurable.rb
122
111
  - lib/active_support/core_ext.rb
123
112
  - lib/active_support/core_ext/array.rb
@@ -125,29 +114,31 @@ files:
125
114
  - lib/active_support/core_ext/array/conversions.rb
126
115
  - lib/active_support/core_ext/array/extract_options.rb
127
116
  - lib/active_support/core_ext/array/grouping.rb
117
+ - lib/active_support/core_ext/array/inquiry.rb
128
118
  - lib/active_support/core_ext/array/prepend_and_append.rb
129
119
  - lib/active_support/core_ext/array/wrap.rb
130
120
  - lib/active_support/core_ext/benchmark.rb
131
121
  - lib/active_support/core_ext/big_decimal.rb
132
122
  - lib/active_support/core_ext/big_decimal/conversions.rb
133
- - lib/active_support/core_ext/big_decimal/yaml_conversions.rb
134
123
  - lib/active_support/core_ext/class.rb
135
124
  - lib/active_support/core_ext/class/attribute.rb
136
125
  - lib/active_support/core_ext/class/attribute_accessors.rb
137
- - lib/active_support/core_ext/class/delegating_attributes.rb
138
126
  - lib/active_support/core_ext/class/subclasses.rb
139
127
  - lib/active_support/core_ext/date.rb
140
128
  - lib/active_support/core_ext/date/acts_like.rb
129
+ - lib/active_support/core_ext/date/blank.rb
141
130
  - lib/active_support/core_ext/date/calculations.rb
142
131
  - lib/active_support/core_ext/date/conversions.rb
143
132
  - lib/active_support/core_ext/date/zones.rb
144
133
  - lib/active_support/core_ext/date_and_time/calculations.rb
134
+ - lib/active_support/core_ext/date_and_time/compatibility.rb
145
135
  - lib/active_support/core_ext/date_and_time/zones.rb
146
136
  - lib/active_support/core_ext/date_time.rb
147
137
  - lib/active_support/core_ext/date_time/acts_like.rb
138
+ - lib/active_support/core_ext/date_time/blank.rb
148
139
  - lib/active_support/core_ext/date_time/calculations.rb
140
+ - lib/active_support/core_ext/date_time/compatibility.rb
149
141
  - lib/active_support/core_ext/date_time/conversions.rb
150
- - lib/active_support/core_ext/date_time/zones.rb
151
142
  - lib/active_support/core_ext/digest/uuid.rb
152
143
  - lib/active_support/core_ext/enumerable.rb
153
144
  - lib/active_support/core_ext/file.rb
@@ -169,7 +160,6 @@ files:
169
160
  - lib/active_support/core_ext/kernel.rb
170
161
  - lib/active_support/core_ext/kernel/agnostics.rb
171
162
  - lib/active_support/core_ext/kernel/concern.rb
172
- - lib/active_support/core_ext/kernel/debugger.rb
173
163
  - lib/active_support/core_ext/kernel/reporting.rb
174
164
  - lib/active_support/core_ext/kernel/singleton_class.rb
175
165
  - lib/active_support/core_ext/load_error.rb
@@ -179,18 +169,19 @@ files:
179
169
  - lib/active_support/core_ext/module/anonymous.rb
180
170
  - lib/active_support/core_ext/module/attr_internal.rb
181
171
  - lib/active_support/core_ext/module/attribute_accessors.rb
172
+ - lib/active_support/core_ext/module/attribute_accessors_per_thread.rb
182
173
  - lib/active_support/core_ext/module/concerning.rb
183
174
  - lib/active_support/core_ext/module/delegation.rb
184
175
  - lib/active_support/core_ext/module/deprecation.rb
185
176
  - lib/active_support/core_ext/module/introspection.rb
186
- - lib/active_support/core_ext/module/method_transplanting.rb
187
- - lib/active_support/core_ext/module/qualified_const.rb
188
177
  - lib/active_support/core_ext/module/reachable.rb
178
+ - lib/active_support/core_ext/module/redefine_method.rb
189
179
  - lib/active_support/core_ext/module/remove_method.rb
190
180
  - lib/active_support/core_ext/name_error.rb
191
181
  - lib/active_support/core_ext/numeric.rb
192
182
  - lib/active_support/core_ext/numeric/bytes.rb
193
183
  - lib/active_support/core_ext/numeric/conversions.rb
184
+ - lib/active_support/core_ext/numeric/inquiry.rb
194
185
  - lib/active_support/core_ext/numeric/time.rb
195
186
  - lib/active_support/core_ext/object.rb
196
187
  - lib/active_support/core_ext/object/acts_like.rb
@@ -200,7 +191,6 @@ files:
200
191
  - lib/active_support/core_ext/object/duplicable.rb
201
192
  - lib/active_support/core_ext/object/inclusion.rb
202
193
  - lib/active_support/core_ext/object/instance_variables.rb
203
- - lib/active_support/core_ext/object/itself.rb
204
194
  - lib/active_support/core_ext/object/json.rb
205
195
  - lib/active_support/core_ext/object/to_param.rb
206
196
  - lib/active_support/core_ext/object/to_query.rb
@@ -210,8 +200,10 @@ files:
210
200
  - lib/active_support/core_ext/range/conversions.rb
211
201
  - lib/active_support/core_ext/range/each.rb
212
202
  - lib/active_support/core_ext/range/include_range.rb
203
+ - lib/active_support/core_ext/range/include_time_with_zone.rb
213
204
  - lib/active_support/core_ext/range/overlaps.rb
214
205
  - lib/active_support/core_ext/regexp.rb
206
+ - lib/active_support/core_ext/securerandom.rb
215
207
  - lib/active_support/core_ext/string.rb
216
208
  - lib/active_support/core_ext/string/access.rb
217
209
  - lib/active_support/core_ext/string/behavior.rb
@@ -226,25 +218,34 @@ files:
226
218
  - lib/active_support/core_ext/string/starts_ends_with.rb
227
219
  - lib/active_support/core_ext/string/strip.rb
228
220
  - lib/active_support/core_ext/string/zones.rb
229
- - lib/active_support/core_ext/struct.rb
230
- - lib/active_support/core_ext/thread.rb
231
221
  - lib/active_support/core_ext/time.rb
232
222
  - lib/active_support/core_ext/time/acts_like.rb
233
223
  - lib/active_support/core_ext/time/calculations.rb
224
+ - lib/active_support/core_ext/time/compatibility.rb
234
225
  - lib/active_support/core_ext/time/conversions.rb
235
- - lib/active_support/core_ext/time/marshal.rb
236
226
  - lib/active_support/core_ext/time/zones.rb
237
227
  - lib/active_support/core_ext/uri.rb
228
+ - lib/active_support/current_attributes.rb
238
229
  - lib/active_support/dependencies.rb
239
230
  - lib/active_support/dependencies/autoload.rb
231
+ - lib/active_support/dependencies/interlock.rb
240
232
  - lib/active_support/deprecation.rb
241
233
  - lib/active_support/deprecation/behaviors.rb
234
+ - lib/active_support/deprecation/constant_accessor.rb
242
235
  - lib/active_support/deprecation/instance_delegator.rb
243
236
  - lib/active_support/deprecation/method_wrappers.rb
244
237
  - lib/active_support/deprecation/proxy_wrappers.rb
245
238
  - lib/active_support/deprecation/reporting.rb
246
239
  - lib/active_support/descendants_tracker.rb
240
+ - lib/active_support/digest.rb
247
241
  - lib/active_support/duration.rb
242
+ - lib/active_support/duration/iso8601_parser.rb
243
+ - lib/active_support/duration/iso8601_serializer.rb
244
+ - lib/active_support/encrypted_configuration.rb
245
+ - lib/active_support/encrypted_file.rb
246
+ - lib/active_support/evented_file_update_checker.rb
247
+ - lib/active_support/execution_wrapper.rb
248
+ - lib/active_support/executor.rb
248
249
  - lib/active_support/file_update_checker.rb
249
250
  - lib/active_support/gem_version.rb
250
251
  - lib/active_support/gzip.rb
@@ -266,8 +267,12 @@ files:
266
267
  - lib/active_support/log_subscriber/test_helper.rb
267
268
  - lib/active_support/logger.rb
268
269
  - lib/active_support/logger_silence.rb
270
+ - lib/active_support/logger_thread_safe_level.rb
269
271
  - lib/active_support/message_encryptor.rb
270
272
  - lib/active_support/message_verifier.rb
273
+ - lib/active_support/messages/metadata.rb
274
+ - lib/active_support/messages/rotation_configuration.rb
275
+ - lib/active_support/messages/rotator.rb
271
276
  - lib/active_support/multibyte.rb
272
277
  - lib/active_support/multibyte/chars.rb
273
278
  - lib/active_support/multibyte/unicode.rb
@@ -283,6 +288,7 @@ files:
283
288
  - lib/active_support/number_helper/number_to_percentage_converter.rb
284
289
  - lib/active_support/number_helper/number_to_phone_converter.rb
285
290
  - lib/active_support/number_helper/number_to_rounded_converter.rb
291
+ - lib/active_support/number_helper/rounding_helper.rb
286
292
  - lib/active_support/option_merger.rb
287
293
  - lib/active_support/ordered_hash.rb
288
294
  - lib/active_support/ordered_options.rb
@@ -290,6 +296,7 @@ files:
290
296
  - lib/active_support/proxy_object.rb
291
297
  - lib/active_support/rails.rb
292
298
  - lib/active_support/railtie.rb
299
+ - lib/active_support/reloader.rb
293
300
  - lib/active_support/rescuable.rb
294
301
  - lib/active_support/security_utils.rb
295
302
  - lib/active_support/string_inquirer.rb
@@ -301,8 +308,11 @@ files:
301
308
  - lib/active_support/testing/constant_lookup.rb
302
309
  - lib/active_support/testing/declarative.rb
303
310
  - lib/active_support/testing/deprecation.rb
311
+ - lib/active_support/testing/file_fixtures.rb
304
312
  - lib/active_support/testing/isolation.rb
313
+ - lib/active_support/testing/method_call_assertions.rb
305
314
  - lib/active_support/testing/setup_and_teardown.rb
315
+ - lib/active_support/testing/stream.rb
306
316
  - lib/active_support/testing/tagged_logging.rb
307
317
  - lib/active_support/testing/time_helpers.rb
308
318
  - lib/active_support/time.rb
@@ -317,10 +327,12 @@ files:
317
327
  - lib/active_support/xml_mini/nokogiri.rb
318
328
  - lib/active_support/xml_mini/nokogirisax.rb
319
329
  - lib/active_support/xml_mini/rexml.rb
320
- homepage: http://www.rubyonrails.org
330
+ homepage: http://rubyonrails.org
321
331
  licenses:
322
332
  - MIT
323
- metadata: {}
333
+ metadata:
334
+ source_code_uri: https://github.com/rails/rails/tree/v5.2.0/activesupport
335
+ changelog_uri: https://github.com/rails/rails/blob/v5.2.0/activesupport/CHANGELOG.md
324
336
  post_install_message:
325
337
  rdoc_options:
326
338
  - "--encoding"
@@ -331,7 +343,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
331
343
  requirements:
332
344
  - - ">="
333
345
  - !ruby/object:Gem::Version
334
- version: 1.9.3
346
+ version: 2.2.2
335
347
  required_rubygems_version: !ruby/object:Gem::Requirement
336
348
  requirements:
337
349
  - - ">="
@@ -339,7 +351,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
339
351
  version: '0'
340
352
  requirements: []
341
353
  rubyforge_project:
342
- rubygems_version: 2.2.2
354
+ rubygems_version: 2.7.6
343
355
  signing_key:
344
356
  specification_version: 4
345
357
  summary: A toolkit of support libraries and Ruby core extensions extracted from the