From 8da30ad6be34339124ba4cb4e36aea260dda12bc Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Fri, 30 Jun 2017 14:00:04 +0900 Subject: [Active Support] require => require_relative --- activesupport/lib/active_support/all.rb | 4 ++-- activesupport/lib/active_support/benchmarkable.rb | 4 ++-- activesupport/lib/active_support/cache.rb | 16 ++++++------- .../lib/active_support/cache/file_store.rb | 6 ++--- .../lib/active_support/cache/mem_cache_store.rb | 4 ++-- .../active_support/cache/strategy/local_cache.rb | 6 ++--- activesupport/lib/active_support/callbacks.rb | 16 ++++++------- activesupport/lib/active_support/configurable.rb | 8 +++---- activesupport/lib/active_support/core_ext/array.rb | 14 ++++++------ .../active_support/core_ext/array/conversions.rb | 12 +++++----- .../lib/active_support/core_ext/array/inquiry.rb | 2 +- .../lib/active_support/core_ext/big_decimal.rb | 2 +- activesupport/lib/active_support/core_ext/class.rb | 4 ++-- .../lib/active_support/core_ext/class/attribute.rb | 6 ++--- .../core_ext/class/attribute_accessors.rb | 2 +- .../active_support/core_ext/class/subclasses.rb | 4 ++-- activesupport/lib/active_support/core_ext/date.rb | 10 ++++----- .../lib/active_support/core_ext/date/acts_like.rb | 2 +- .../active_support/core_ext/date/calculations.rb | 10 ++++----- .../active_support/core_ext/date/conversions.rb | 6 ++--- .../lib/active_support/core_ext/date/zones.rb | 2 +- .../core_ext/date_and_time/calculations.rb | 2 +- .../core_ext/date_and_time/compatibility.rb | 2 +- .../lib/active_support/core_ext/date_time.rb | 10 ++++----- .../active_support/core_ext/date_time/acts_like.rb | 2 +- .../core_ext/date_time/compatibility.rb | 4 ++-- .../core_ext/date_time/conversions.rb | 8 +++---- activesupport/lib/active_support/core_ext/file.rb | 2 +- activesupport/lib/active_support/core_ext/hash.rb | 18 +++++++-------- .../active_support/core_ext/hash/conversions.rb | 18 +++++++-------- .../core_ext/hash/indifferent_access.rb | 2 +- .../lib/active_support/core_ext/integer.rb | 6 ++--- .../active_support/core_ext/integer/inflections.rb | 2 +- .../lib/active_support/core_ext/integer/time.rb | 4 ++-- .../lib/active_support/core_ext/kernel.rb | 8 +++---- .../lib/active_support/core_ext/kernel/concern.rb | 2 +- .../lib/active_support/core_ext/module.rb | 22 +++++++++--------- .../core_ext/module/attribute_accessors.rb | 4 ++-- .../module/attribute_accessors_per_thread.rb | 4 ++-- .../active_support/core_ext/module/concerning.rb | 2 +- .../active_support/core_ext/module/delegation.rb | 2 +- .../core_ext/module/introspection.rb | 2 +- .../active_support/core_ext/module/reachable.rb | 4 ++-- .../lib/active_support/core_ext/numeric.rb | 8 +++---- .../active_support/core_ext/numeric/conversions.rb | 6 ++--- .../lib/active_support/core_ext/numeric/time.rb | 10 ++++----- .../lib/active_support/core_ext/object.rb | 24 ++++++++++---------- .../lib/active_support/core_ext/object/blank.rb | 2 +- .../active_support/core_ext/object/conversions.rb | 8 +++---- .../lib/active_support/core_ext/object/deep_dup.rb | 2 +- .../lib/active_support/core_ext/object/json.rb | 14 ++++++------ .../lib/active_support/core_ext/object/to_param.rb | 2 +- .../active_support/core_ext/object/with_options.rb | 2 +- activesupport/lib/active_support/core_ext/range.rb | 8 +++---- .../lib/active_support/core_ext/string.rb | 26 +++++++++++----------- .../active_support/core_ext/string/conversions.rb | 2 +- .../active_support/core_ext/string/inflections.rb | 4 ++-- .../lib/active_support/core_ext/string/inquiry.rb | 2 +- .../active_support/core_ext/string/multibyte.rb | 2 +- .../core_ext/string/output_safety.rb | 4 ++-- .../lib/active_support/core_ext/string/zones.rb | 4 ++-- activesupport/lib/active_support/core_ext/time.rb | 10 ++++----- .../lib/active_support/core_ext/time/acts_like.rb | 2 +- .../active_support/core_ext/time/calculations.rb | 12 +++++----- .../active_support/core_ext/time/compatibility.rb | 4 ++-- .../active_support/core_ext/time/conversions.rb | 4 ++-- .../lib/active_support/core_ext/time/zones.rb | 6 ++--- activesupport/lib/active_support/dependencies.rb | 22 +++++++++--------- .../lib/active_support/dependencies/autoload.rb | 2 +- .../lib/active_support/dependencies/interlock.rb | 2 +- activesupport/lib/active_support/deprecation.rb | 14 ++++++------ .../lib/active_support/deprecation/behaviors.rb | 4 ++-- .../deprecation/constant_accessor.rb | 2 +- .../deprecation/instance_delegator.rb | 4 ++-- .../active_support/deprecation/method_wrappers.rb | 4 ++-- .../active_support/deprecation/proxy_wrappers.rb | 4 ++-- activesupport/lib/active_support/duration.rb | 10 ++++----- .../lib/active_support/duration/iso8601_parser.rb | 2 +- .../active_support/duration/iso8601_serializer.rb | 4 ++-- .../lib/active_support/execution_wrapper.rb | 2 +- activesupport/lib/active_support/executor.rb | 2 +- .../lib/active_support/file_update_checker.rb | 2 +- .../active_support/hash_with_indifferent_access.rb | 4 ++-- activesupport/lib/active_support/i18n.rb | 8 +++---- activesupport/lib/active_support/i18n_railtie.rb | 4 ++-- activesupport/lib/active_support/inflections.rb | 2 +- activesupport/lib/active_support/inflector.rb | 10 ++++----- .../lib/active_support/inflector/inflections.rb | 6 ++--- .../lib/active_support/inflector/methods.rb | 4 ++-- .../lib/active_support/inflector/transliterate.rb | 4 ++-- activesupport/lib/active_support/json.rb | 4 ++-- activesupport/lib/active_support/json/decoding.rb | 4 ++-- activesupport/lib/active_support/json/encoding.rb | 4 ++-- activesupport/lib/active_support/log_subscriber.rb | 6 ++--- .../active_support/log_subscriber/test_helper.rb | 6 ++--- activesupport/lib/active_support/logger.rb | 4 ++-- activesupport/lib/active_support/logger_silence.rb | 4 ++-- .../lib/active_support/logger_thread_safe_level.rb | 2 +- .../lib/active_support/message_encryptor.rb | 4 ++-- .../lib/active_support/message_verifier.rb | 4 ++-- .../lib/active_support/multibyte/chars.rb | 10 ++++----- activesupport/lib/active_support/notifications.rb | 6 ++--- .../number_helper/number_converter.rb | 10 ++++----- .../number_helper/number_to_currency_converter.rb | 2 +- activesupport/lib/active_support/option_merger.rb | 2 +- .../lib/active_support/ordered_options.rb | 2 +- .../lib/active_support/per_thread_registry.rb | 2 +- activesupport/lib/active_support/rails.rb | 14 ++++++------ activesupport/lib/active_support/railtie.rb | 6 ++--- activesupport/lib/active_support/reloader.rb | 2 +- activesupport/lib/active_support/rescuable.rb | 6 ++--- activesupport/lib/active_support/subscriber.rb | 4 ++-- activesupport/lib/active_support/tagged_logging.rb | 6 ++--- activesupport/lib/active_support/test_case.rb | 20 ++++++++--------- .../lib/active_support/testing/constant_lookup.rb | 4 ++-- .../lib/active_support/testing/deprecation.rb | 4 ++-- .../active_support/testing/setup_and_teardown.rb | 4 ++-- .../lib/active_support/testing/time_helpers.rb | 4 ++-- activesupport/lib/active_support/time.rb | 14 ++++++------ activesupport/lib/active_support/time_with_zone.rb | 8 +++---- .../lib/active_support/values/time_zone.rb | 2 +- activesupport/lib/active_support/xml_mini.rb | 8 +++---- activesupport/lib/active_support/xml_mini/jdom.rb | 2 +- .../lib/active_support/xml_mini/libxml.rb | 2 +- .../lib/active_support/xml_mini/libxmlsax.rb | 2 +- .../lib/active_support/xml_mini/nokogiri.rb | 2 +- .../lib/active_support/xml_mini/nokogirisax.rb | 2 +- activesupport/lib/active_support/xml_mini/rexml.rb | 4 ++-- 128 files changed, 378 insertions(+), 378 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/all.rb b/activesupport/lib/active_support/all.rb index 72a23075af..413314167d 100644 --- a/activesupport/lib/active_support/all.rb +++ b/activesupport/lib/active_support/all.rb @@ -1,3 +1,3 @@ require "active_support" -require "active_support/time" -require "active_support/core_ext" +require_relative "time" +require_relative "core_ext" diff --git a/activesupport/lib/active_support/benchmarkable.rb b/activesupport/lib/active_support/benchmarkable.rb index 70493c8da7..74e39c74e1 100644 --- a/activesupport/lib/active_support/benchmarkable.rb +++ b/activesupport/lib/active_support/benchmarkable.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/benchmark" -require "active_support/core_ext/hash/keys" +require_relative "core_ext/benchmark" +require_relative "core_ext/hash/keys" module ActiveSupport module Benchmarkable diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index 3847d8b7ae..ef659d90ad 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -1,11 +1,11 @@ require "zlib" -require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/array/wrap" -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/numeric/bytes" -require "active_support/core_ext/numeric/time" -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/string/inflections" +require_relative "core_ext/array/extract_options" +require_relative "core_ext/array/wrap" +require_relative "core_ext/module/attribute_accessors" +require_relative "core_ext/numeric/bytes" +require_relative "core_ext/numeric/time" +require_relative "core_ext/object/to_param" +require_relative "core_ext/string/inflections" module ActiveSupport # See ActiveSupport::Cache::Store for documentation. @@ -99,7 +99,7 @@ module ActiveSupport # Obtains the specified cache store class, given the name of the +store+. # Raises an error when the store class cannot be found. def retrieve_store_class(store) - require "active_support/cache/#{store}" + require_relative "cache/#{store}" rescue LoadError => e raise "Could not find cache store adapter for #{store} (#{e})" else diff --git a/activesupport/lib/active_support/cache/file_store.rb b/activesupport/lib/active_support/cache/file_store.rb index 945f50a56e..bb65da2723 100644 --- a/activesupport/lib/active_support/cache/file_store.rb +++ b/activesupport/lib/active_support/cache/file_store.rb @@ -1,6 +1,6 @@ -require "active_support/core_ext/marshal" -require "active_support/core_ext/file/atomic" -require "active_support/core_ext/string/conversions" +require_relative "../core_ext/marshal" +require_relative "../core_ext/file/atomic" +require_relative "../core_ext/string/conversions" require "uri/common" module ActiveSupport diff --git a/activesupport/lib/active_support/cache/mem_cache_store.rb b/activesupport/lib/active_support/cache/mem_cache_store.rb index 06fa9f67ad..7efe6fe3bf 100644 --- a/activesupport/lib/active_support/cache/mem_cache_store.rb +++ b/activesupport/lib/active_support/cache/mem_cache_store.rb @@ -6,8 +6,8 @@ rescue LoadError => e end require "digest/md5" -require "active_support/core_ext/marshal" -require "active_support/core_ext/array/extract_options" +require_relative "../core_ext/marshal" +require_relative "../core_ext/array/extract_options" module ActiveSupport module Cache diff --git a/activesupport/lib/active_support/cache/strategy/local_cache.rb b/activesupport/lib/active_support/cache/strategy/local_cache.rb index 69b3a93a05..2e7e5af0e3 100644 --- a/activesupport/lib/active_support/cache/strategy/local_cache.rb +++ b/activesupport/lib/active_support/cache/strategy/local_cache.rb @@ -1,6 +1,6 @@ -require "active_support/core_ext/object/duplicable" -require "active_support/core_ext/string/inflections" -require "active_support/per_thread_registry" +require_relative "../../core_ext/object/duplicable" +require_relative "../../core_ext/string/inflections" +require_relative "../../per_thread_registry" module ActiveSupport module Cache diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb index df18c35199..34d62ec3a9 100644 --- a/activesupport/lib/active_support/callbacks.rb +++ b/activesupport/lib/active_support/callbacks.rb @@ -1,11 +1,11 @@ -require "active_support/concern" -require "active_support/descendants_tracker" -require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/class/attribute" -require "active_support/core_ext/kernel/reporting" -require "active_support/core_ext/kernel/singleton_class" -require "active_support/core_ext/string/filters" -require "active_support/deprecation" +require_relative "concern" +require_relative "descendants_tracker" +require_relative "core_ext/array/extract_options" +require_relative "core_ext/class/attribute" +require_relative "core_ext/kernel/reporting" +require_relative "core_ext/kernel/singleton_class" +require_relative "core_ext/string/filters" +require_relative "deprecation" require "thread" module ActiveSupport diff --git a/activesupport/lib/active_support/configurable.rb b/activesupport/lib/active_support/configurable.rb index f72a893bcc..ebe4055f91 100644 --- a/activesupport/lib/active_support/configurable.rb +++ b/activesupport/lib/active_support/configurable.rb @@ -1,7 +1,7 @@ -require "active_support/concern" -require "active_support/ordered_options" -require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/regexp" +require_relative "concern" +require_relative "ordered_options" +require_relative "core_ext/array/extract_options" +require_relative "core_ext/regexp" module ActiveSupport # Configurable provides a config method to store and retrieve diff --git a/activesupport/lib/active_support/core_ext/array.rb b/activesupport/lib/active_support/core_ext/array.rb index e908386a1c..3536c7f2bf 100644 --- a/activesupport/lib/active_support/core_ext/array.rb +++ b/activesupport/lib/active_support/core_ext/array.rb @@ -1,7 +1,7 @@ -require "active_support/core_ext/array/wrap" -require "active_support/core_ext/array/access" -require "active_support/core_ext/array/conversions" -require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/array/grouping" -require "active_support/core_ext/array/prepend_and_append" -require "active_support/core_ext/array/inquiry" +require_relative "array/wrap" +require_relative "array/access" +require_relative "array/conversions" +require_relative "array/extract_options" +require_relative "array/grouping" +require_relative "array/prepend_and_append" +require_relative "array/inquiry" diff --git a/activesupport/lib/active_support/core_ext/array/conversions.rb b/activesupport/lib/active_support/core_ext/array/conversions.rb index cac15e1100..57ad32483a 100644 --- a/activesupport/lib/active_support/core_ext/array/conversions.rb +++ b/activesupport/lib/active_support/core_ext/array/conversions.rb @@ -1,8 +1,8 @@ -require "active_support/xml_mini" -require "active_support/core_ext/hash/keys" -require "active_support/core_ext/string/inflections" -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/object/to_query" +require_relative "../../xml_mini" +require_relative "../hash/keys" +require_relative "../string/inflections" +require_relative "../object/to_param" +require_relative "../object/to_query" class Array # Converts the array to a comma-separated sentence where the last element is @@ -179,7 +179,7 @@ class Array # # def to_xml(options = {}) - require "active_support/builder" unless defined?(Builder) + require_relative "../../builder" unless defined?(Builder) options = options.dup options[:indent] ||= 2 diff --git a/activesupport/lib/active_support/core_ext/array/inquiry.rb b/activesupport/lib/active_support/core_ext/array/inquiry.rb index 66fa5fcd0c..c46b01baf0 100644 --- a/activesupport/lib/active_support/core_ext/array/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/array/inquiry.rb @@ -1,4 +1,4 @@ -require "active_support/array_inquirer" +require_relative "../../array_inquirer" class Array # Wraps the array in an +ArrayInquirer+ object, which gives a friendlier way diff --git a/activesupport/lib/active_support/core_ext/big_decimal.rb b/activesupport/lib/active_support/core_ext/big_decimal.rb index 7b4f87f10e..7e396cac3c 100644 --- a/activesupport/lib/active_support/core_ext/big_decimal.rb +++ b/activesupport/lib/active_support/core_ext/big_decimal.rb @@ -1 +1 @@ -require "active_support/core_ext/big_decimal/conversions" +require_relative "big_decimal/conversions" diff --git a/activesupport/lib/active_support/core_ext/class.rb b/activesupport/lib/active_support/core_ext/class.rb index 6a19e862d0..66dd1c939a 100644 --- a/activesupport/lib/active_support/core_ext/class.rb +++ b/activesupport/lib/active_support/core_ext/class.rb @@ -1,2 +1,2 @@ -require "active_support/core_ext/class/attribute" -require "active_support/core_ext/class/subclasses" +require_relative "class/attribute" +require_relative "class/subclasses" diff --git a/activesupport/lib/active_support/core_ext/class/attribute.rb b/activesupport/lib/active_support/core_ext/class/attribute.rb index 8caddcd5c3..26b826b39b 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute.rb @@ -1,6 +1,6 @@ -require "active_support/core_ext/kernel/singleton_class" -require "active_support/core_ext/module/remove_method" -require "active_support/core_ext/array/extract_options" +require_relative "../kernel/singleton_class" +require_relative "../module/remove_method" +require_relative "../array/extract_options" class Class # Declare a class-level attribute whose value is inheritable by subclasses. diff --git a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb index 0f767925ed..eebf2e294a 100644 --- a/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/class/attribute_accessors.rb @@ -1,4 +1,4 @@ # cattr_* became mattr_* aliases in 7dfbd91b0780fbd6a1dd9bfbc176e10894871d2d, # but we keep this around for libraries that directly require it knowing they # want cattr_*. No need to deprecate. -require "active_support/core_ext/module/attribute_accessors" +require_relative "../module/attribute_accessors" diff --git a/activesupport/lib/active_support/core_ext/class/subclasses.rb b/activesupport/lib/active_support/core_ext/class/subclasses.rb index 62397d9508..545ad7fb3e 100644 --- a/activesupport/lib/active_support/core_ext/class/subclasses.rb +++ b/activesupport/lib/active_support/core_ext/class/subclasses.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/module/anonymous" -require "active_support/core_ext/module/reachable" +require_relative "../module/anonymous" +require_relative "../module/reachable" class Class begin diff --git a/activesupport/lib/active_support/core_ext/date.rb b/activesupport/lib/active_support/core_ext/date.rb index 4f66804da2..aba72c732f 100644 --- a/activesupport/lib/active_support/core_ext/date.rb +++ b/activesupport/lib/active_support/core_ext/date.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/date/acts_like" -require "active_support/core_ext/date/blank" -require "active_support/core_ext/date/calculations" -require "active_support/core_ext/date/conversions" -require "active_support/core_ext/date/zones" +require_relative "date/acts_like" +require_relative "date/blank" +require_relative "date/calculations" +require_relative "date/conversions" +require_relative "date/zones" diff --git a/activesupport/lib/active_support/core_ext/date/acts_like.rb b/activesupport/lib/active_support/core_ext/date/acts_like.rb index 46fe99ad47..dfea3e3f09 100644 --- a/activesupport/lib/active_support/core_ext/date/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/date/acts_like.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/object/acts_like" +require_relative "../object/acts_like" class Date # Duck-types as a Date-like class. See Object#acts_like?. diff --git a/activesupport/lib/active_support/core_ext/date/calculations.rb b/activesupport/lib/active_support/core_ext/date/calculations.rb index d6f60cac04..24d3721d48 100644 --- a/activesupport/lib/active_support/core_ext/date/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date/calculations.rb @@ -1,9 +1,9 @@ require "date" -require "active_support/duration" -require "active_support/core_ext/object/acts_like" -require "active_support/core_ext/date/zones" -require "active_support/core_ext/time/zones" -require "active_support/core_ext/date_and_time/calculations" +require_relative "../../duration" +require_relative "../object/acts_like" +require_relative "zones" +require_relative "../time/zones" +require_relative "../date_and_time/calculations" class Date include DateAndTime::Calculations diff --git a/activesupport/lib/active_support/core_ext/date/conversions.rb b/activesupport/lib/active_support/core_ext/date/conversions.rb index 0f59c754fe..7971d39fb7 100644 --- a/activesupport/lib/active_support/core_ext/date/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date/conversions.rb @@ -1,7 +1,7 @@ require "date" -require "active_support/inflector/methods" -require "active_support/core_ext/date/zones" -require "active_support/core_ext/module/remove_method" +require_relative "../../inflector/methods" +require_relative "zones" +require_relative "../module/remove_method" class Date DATE_FORMATS = { diff --git a/activesupport/lib/active_support/core_ext/date/zones.rb b/activesupport/lib/active_support/core_ext/date/zones.rb index da23fe4892..d94c7bcfc2 100644 --- a/activesupport/lib/active_support/core_ext/date/zones.rb +++ b/activesupport/lib/active_support/core_ext/date/zones.rb @@ -1,5 +1,5 @@ require "date" -require "active_support/core_ext/date_and_time/zones" +require_relative "../date_and_time/zones" class Date include DateAndTime::Zones diff --git a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb index e2e1d3e359..cf01a4542f 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/calculations.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/object/try" +require_relative "../object/try" module DateAndTime module Calculations diff --git a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb index 2d45e16546..bb9908df61 100644 --- a/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/date_and_time/compatibility.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/module/attribute_accessors" +require_relative "../module/attribute_accessors" module DateAndTime module Compatibility diff --git a/activesupport/lib/active_support/core_ext/date_time.rb b/activesupport/lib/active_support/core_ext/date_time.rb index 6fd498f864..ce35026a71 100644 --- a/activesupport/lib/active_support/core_ext/date_time.rb +++ b/activesupport/lib/active_support/core_ext/date_time.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/date_time/acts_like" -require "active_support/core_ext/date_time/blank" -require "active_support/core_ext/date_time/calculations" -require "active_support/core_ext/date_time/compatibility" -require "active_support/core_ext/date_time/conversions" +require_relative "date_time/acts_like" +require_relative "date_time/blank" +require_relative "date_time/calculations" +require_relative "date_time/compatibility" +require_relative "date_time/conversions" diff --git a/activesupport/lib/active_support/core_ext/date_time/acts_like.rb b/activesupport/lib/active_support/core_ext/date_time/acts_like.rb index 6f50f55a53..f0356ee6a0 100644 --- a/activesupport/lib/active_support/core_ext/date_time/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/date_time/acts_like.rb @@ -1,5 +1,5 @@ require "date" -require "active_support/core_ext/object/acts_like" +require_relative "../object/acts_like" class DateTime # Duck-types as a Date-like class. See Object#acts_like?. diff --git a/activesupport/lib/active_support/core_ext/date_time/compatibility.rb b/activesupport/lib/active_support/core_ext/date_time/compatibility.rb index 870391aeaa..fe255c087f 100644 --- a/activesupport/lib/active_support/core_ext/date_time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/date_time/compatibility.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/date_and_time/compatibility" -require "active_support/core_ext/module/remove_method" +require_relative "../date_and_time/compatibility" +require_relative "../module/remove_method" class DateTime include DateAndTime::Compatibility diff --git a/activesupport/lib/active_support/core_ext/date_time/conversions.rb b/activesupport/lib/active_support/core_ext/date_time/conversions.rb index d9b3743858..36bfd28f31 100644 --- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb @@ -1,8 +1,8 @@ require "date" -require "active_support/inflector/methods" -require "active_support/core_ext/time/conversions" -require "active_support/core_ext/date_time/calculations" -require "active_support/values/time_zone" +require_relative "../../inflector/methods" +require_relative "../time/conversions" +require_relative "calculations" +require_relative "../../values/time_zone" class DateTime # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. diff --git a/activesupport/lib/active_support/core_ext/file.rb b/activesupport/lib/active_support/core_ext/file.rb index 6d99bad2af..ea3267f5da 100644 --- a/activesupport/lib/active_support/core_ext/file.rb +++ b/activesupport/lib/active_support/core_ext/file.rb @@ -1 +1 @@ -require "active_support/core_ext/file/atomic" +require_relative "file/atomic" diff --git a/activesupport/lib/active_support/core_ext/hash.rb b/activesupport/lib/active_support/core_ext/hash.rb index c819307e8a..6122ac57ba 100644 --- a/activesupport/lib/active_support/core_ext/hash.rb +++ b/activesupport/lib/active_support/core_ext/hash.rb @@ -1,9 +1,9 @@ -require "active_support/core_ext/hash/compact" -require "active_support/core_ext/hash/conversions" -require "active_support/core_ext/hash/deep_merge" -require "active_support/core_ext/hash/except" -require "active_support/core_ext/hash/indifferent_access" -require "active_support/core_ext/hash/keys" -require "active_support/core_ext/hash/reverse_merge" -require "active_support/core_ext/hash/slice" -require "active_support/core_ext/hash/transform_values" +require_relative "hash/compact" +require_relative "hash/conversions" +require_relative "hash/deep_merge" +require_relative "hash/except" +require_relative "hash/indifferent_access" +require_relative "hash/keys" +require_relative "hash/reverse_merge" +require_relative "hash/slice" +require_relative "hash/transform_values" diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 2a58a7f1ca..713711e16a 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -1,11 +1,11 @@ -require "active_support/xml_mini" -require "active_support/time" -require "active_support/core_ext/object/blank" -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/object/to_query" -require "active_support/core_ext/array/wrap" -require "active_support/core_ext/hash/reverse_merge" -require "active_support/core_ext/string/inflections" +require_relative "../../xml_mini" +require_relative "../../time" +require_relative "../object/blank" +require_relative "../object/to_param" +require_relative "../object/to_query" +require_relative "../array/wrap" +require_relative "reverse_merge" +require_relative "../string/inflections" class Hash # Returns a string containing an XML representation of its receiver: @@ -71,7 +71,7 @@ class Hash # configure your own builder with the :builder option. The method also accepts # options like :dasherize and friends, they are forwarded to the builder. def to_xml(options = {}) - require "active_support/builder" unless defined?(Builder) + require_relative "../../builder" unless defined?(Builder) options = options.dup options[:indent] ||= 2 diff --git a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb index 3e1ccecb6c..4b7fe34cc9 100644 --- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb @@ -1,4 +1,4 @@ -require "active_support/hash_with_indifferent_access" +require_relative "../../hash_with_indifferent_access" class Hash # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: diff --git a/activesupport/lib/active_support/core_ext/integer.rb b/activesupport/lib/active_support/core_ext/integer.rb index 8f0c55f9d3..e7c1aae980 100644 --- a/activesupport/lib/active_support/core_ext/integer.rb +++ b/activesupport/lib/active_support/core_ext/integer.rb @@ -1,3 +1,3 @@ -require "active_support/core_ext/integer/multiple" -require "active_support/core_ext/integer/inflections" -require "active_support/core_ext/integer/time" +require_relative "integer/multiple" +require_relative "integer/inflections" +require_relative "integer/time" diff --git a/activesupport/lib/active_support/core_ext/integer/inflections.rb b/activesupport/lib/active_support/core_ext/integer/inflections.rb index bc21b65533..0b2ada8b22 100644 --- a/activesupport/lib/active_support/core_ext/integer/inflections.rb +++ b/activesupport/lib/active_support/core_ext/integer/inflections.rb @@ -1,4 +1,4 @@ -require "active_support/inflector" +require_relative "../../inflector" class Integer # Ordinalize turns a number into an ordinal string used to denote the diff --git a/activesupport/lib/active_support/core_ext/integer/time.rb b/activesupport/lib/active_support/core_ext/integer/time.rb index 74baae3639..d5625dfd1c 100644 --- a/activesupport/lib/active_support/core_ext/integer/time.rb +++ b/activesupport/lib/active_support/core_ext/integer/time.rb @@ -1,5 +1,5 @@ -require "active_support/duration" -require "active_support/core_ext/numeric/time" +require_relative "../../duration" +require_relative "../numeric/time" class Integer # Enables the use of time calculations and declarations, like 45.minutes + diff --git a/activesupport/lib/active_support/core_ext/kernel.rb b/activesupport/lib/active_support/core_ext/kernel.rb index 3d41ff7876..26142b107b 100644 --- a/activesupport/lib/active_support/core_ext/kernel.rb +++ b/activesupport/lib/active_support/core_ext/kernel.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/kernel/agnostics" -require "active_support/core_ext/kernel/concern" -require "active_support/core_ext/kernel/reporting" -require "active_support/core_ext/kernel/singleton_class" +require_relative "kernel/agnostics" +require_relative "kernel/concern" +require_relative "kernel/reporting" +require_relative "kernel/singleton_class" diff --git a/activesupport/lib/active_support/core_ext/kernel/concern.rb b/activesupport/lib/active_support/core_ext/kernel/concern.rb index 307a7f7a63..535f0d21df 100644 --- a/activesupport/lib/active_support/core_ext/kernel/concern.rb +++ b/activesupport/lib/active_support/core_ext/kernel/concern.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/module/concerning" +require_relative "../module/concerning" module Kernel module_function diff --git a/activesupport/lib/active_support/core_ext/module.rb b/activesupport/lib/active_support/core_ext/module.rb index 2930255557..3ee394edd9 100644 --- a/activesupport/lib/active_support/core_ext/module.rb +++ b/activesupport/lib/active_support/core_ext/module.rb @@ -1,11 +1,11 @@ -require "active_support/core_ext/module/aliasing" -require "active_support/core_ext/module/introspection" -require "active_support/core_ext/module/anonymous" -require "active_support/core_ext/module/reachable" -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/module/attribute_accessors_per_thread" -require "active_support/core_ext/module/attr_internal" -require "active_support/core_ext/module/concerning" -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/module/deprecation" -require "active_support/core_ext/module/remove_method" +require_relative "module/aliasing" +require_relative "module/introspection" +require_relative "module/anonymous" +require_relative "module/reachable" +require_relative "module/attribute_accessors" +require_relative "module/attribute_accessors_per_thread" +require_relative "module/attr_internal" +require_relative "module/concerning" +require_relative "module/delegation" +require_relative "module/deprecation" +require_relative "module/remove_method" diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb index 9244cfa157..e978bd41d6 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/regexp" +require_relative "../array/extract_options" +require_relative "../regexp" # Extends the module object with class/module and instance accessors for # class/module attributes, just like the native attr* accessors for instance diff --git a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb index 1e82b4acc2..9ef834fa6f 100644 --- a/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb +++ b/activesupport/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/array/extract_options" -require "active_support/core_ext/regexp" +require_relative "../array/extract_options" +require_relative "../regexp" # Extends the module object with class/module and instance accessors for # class/module attributes, just like the native attr* accessors for instance diff --git a/activesupport/lib/active_support/core_ext/module/concerning.rb b/activesupport/lib/active_support/core_ext/module/concerning.rb index 97b0a382ce..eb821aba60 100644 --- a/activesupport/lib/active_support/core_ext/module/concerning.rb +++ b/activesupport/lib/active_support/core_ext/module/concerning.rb @@ -1,4 +1,4 @@ -require "active_support/concern" +require_relative "../../concern" class Module # = Bite-sized separation of concerns diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb index 13f3894e6c..04f34e553d 100644 --- a/activesupport/lib/active_support/core_ext/module/delegation.rb +++ b/activesupport/lib/active_support/core_ext/module/delegation.rb @@ -1,5 +1,5 @@ require "set" -require "active_support/core_ext/regexp" +require_relative "../regexp" class Module # Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+ diff --git a/activesupport/lib/active_support/core_ext/module/introspection.rb b/activesupport/lib/active_support/core_ext/module/introspection.rb index ca20a6d4c5..4a7930792c 100644 --- a/activesupport/lib/active_support/core_ext/module/introspection.rb +++ b/activesupport/lib/active_support/core_ext/module/introspection.rb @@ -1,4 +1,4 @@ -require "active_support/inflector" +require_relative "../../inflector" class Module # Returns the name of the module containing this one. diff --git a/activesupport/lib/active_support/core_ext/module/reachable.rb b/activesupport/lib/active_support/core_ext/module/reachable.rb index b89a38f26c..0f78999634 100644 --- a/activesupport/lib/active_support/core_ext/module/reachable.rb +++ b/activesupport/lib/active_support/core_ext/module/reachable.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/module/anonymous" -require "active_support/core_ext/string/inflections" +require_relative "anonymous" +require_relative "../string/inflections" class Module def reachable? #:nodoc: diff --git a/activesupport/lib/active_support/core_ext/numeric.rb b/activesupport/lib/active_support/core_ext/numeric.rb index 6062f9e3a8..e10d7708bd 100644 --- a/activesupport/lib/active_support/core_ext/numeric.rb +++ b/activesupport/lib/active_support/core_ext/numeric.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/numeric/bytes" -require "active_support/core_ext/numeric/time" -require "active_support/core_ext/numeric/inquiry" -require "active_support/core_ext/numeric/conversions" +require_relative "numeric/bytes" +require_relative "numeric/time" +require_relative "numeric/inquiry" +require_relative "numeric/conversions" diff --git a/activesupport/lib/active_support/core_ext/numeric/conversions.rb b/activesupport/lib/active_support/core_ext/numeric/conversions.rb index 4f6621693e..397e32ee8e 100644 --- a/activesupport/lib/active_support/core_ext/numeric/conversions.rb +++ b/activesupport/lib/active_support/core_ext/numeric/conversions.rb @@ -1,6 +1,6 @@ -require "active_support/core_ext/big_decimal/conversions" -require "active_support/number_helper" -require "active_support/core_ext/module/deprecation" +require_relative "../big_decimal/conversions" +require_relative "../../number_helper" +require_relative "../module/deprecation" module ActiveSupport::NumericWithFormat # Provides options for converting numbers into formatted strings. diff --git a/activesupport/lib/active_support/core_ext/numeric/time.rb b/activesupport/lib/active_support/core_ext/numeric/time.rb index 2e6c70d418..cf002552fb 100644 --- a/activesupport/lib/active_support/core_ext/numeric/time.rb +++ b/activesupport/lib/active_support/core_ext/numeric/time.rb @@ -1,8 +1,8 @@ -require "active_support/duration" -require "active_support/core_ext/time/calculations" -require "active_support/core_ext/time/acts_like" -require "active_support/core_ext/date/calculations" -require "active_support/core_ext/date/acts_like" +require_relative "../../duration" +require_relative "../time/calculations" +require_relative "../time/acts_like" +require_relative "../date/calculations" +require_relative "../date/acts_like" class Numeric # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index 58bbf78601..993cc6a059 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -1,14 +1,14 @@ -require "active_support/core_ext/object/acts_like" -require "active_support/core_ext/object/blank" -require "active_support/core_ext/object/duplicable" -require "active_support/core_ext/object/deep_dup" -require "active_support/core_ext/object/try" -require "active_support/core_ext/object/inclusion" +require_relative "object/acts_like" +require_relative "object/blank" +require_relative "object/duplicable" +require_relative "object/deep_dup" +require_relative "object/try" +require_relative "object/inclusion" -require "active_support/core_ext/object/conversions" -require "active_support/core_ext/object/instance_variables" +require_relative "object/conversions" +require_relative "object/instance_variables" -require "active_support/core_ext/object/json" -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/object/to_query" -require "active_support/core_ext/object/with_options" +require_relative "object/json" +require_relative "object/to_param" +require_relative "object/to_query" +require_relative "object/with_options" diff --git a/activesupport/lib/active_support/core_ext/object/blank.rb b/activesupport/lib/active_support/core_ext/object/blank.rb index bdb50ee291..c37c2649d6 100644 --- a/activesupport/lib/active_support/core_ext/object/blank.rb +++ b/activesupport/lib/active_support/core_ext/object/blank.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/regexp" +require_relative "../regexp" class Object # An object is blank if it's false, empty, or a whitespace string. diff --git a/activesupport/lib/active_support/core_ext/object/conversions.rb b/activesupport/lib/active_support/core_ext/object/conversions.rb index 918ebcdc9f..9d3bdbc528 100644 --- a/activesupport/lib/active_support/core_ext/object/conversions.rb +++ b/activesupport/lib/active_support/core_ext/object/conversions.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/object/to_param" -require "active_support/core_ext/object/to_query" -require "active_support/core_ext/array/conversions" -require "active_support/core_ext/hash/conversions" +require_relative "to_param" +require_relative "to_query" +require_relative "../array/conversions" +require_relative "../hash/conversions" diff --git a/activesupport/lib/active_support/core_ext/object/deep_dup.rb b/activesupport/lib/active_support/core_ext/object/deep_dup.rb index 5ac649e552..d966a29408 100644 --- a/activesupport/lib/active_support/core_ext/object/deep_dup.rb +++ b/activesupport/lib/active_support/core_ext/object/deep_dup.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/object/duplicable" +require_relative "duplicable" class Object # Returns a deep copy of object if it's duplicable. If it's diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 1c4d181443..d54373d5f2 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -3,14 +3,14 @@ require "json" require "bigdecimal" require "uri/generic" require "pathname" -require "active_support/core_ext/big_decimal/conversions" # for #to_s -require "active_support/core_ext/hash/except" -require "active_support/core_ext/hash/slice" -require "active_support/core_ext/object/instance_variables" +require_relative "../big_decimal/conversions" # for #to_s +require_relative "../hash/except" +require_relative "../hash/slice" +require_relative "instance_variables" require "time" -require "active_support/core_ext/time/conversions" -require "active_support/core_ext/date_time/conversions" -require "active_support/core_ext/date/conversions" +require_relative "../time/conversions" +require_relative "../date_time/conversions" +require_relative "../date/conversions" # The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting # their default behavior. That said, we need to define the basic to_json method in all of them, diff --git a/activesupport/lib/active_support/core_ext/object/to_param.rb b/activesupport/lib/active_support/core_ext/object/to_param.rb index 5eeaf03163..d39727ce00 100644 --- a/activesupport/lib/active_support/core_ext/object/to_param.rb +++ b/activesupport/lib/active_support/core_ext/object/to_param.rb @@ -1 +1 @@ -require "active_support/core_ext/object/to_query" +require_relative "to_query" diff --git a/activesupport/lib/active_support/core_ext/object/with_options.rb b/activesupport/lib/active_support/core_ext/object/with_options.rb index 3a44e08630..68a8da25ff 100644 --- a/activesupport/lib/active_support/core_ext/object/with_options.rb +++ b/activesupport/lib/active_support/core_ext/object/with_options.rb @@ -1,4 +1,4 @@ -require "active_support/option_merger" +require_relative "../../option_merger" class Object # An elegant way to factor duplication out of options passed to a series of diff --git a/activesupport/lib/active_support/core_ext/range.rb b/activesupport/lib/active_support/core_ext/range.rb index 3190e3ff76..3e17780b76 100644 --- a/activesupport/lib/active_support/core_ext/range.rb +++ b/activesupport/lib/active_support/core_ext/range.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/range/conversions" -require "active_support/core_ext/range/include_range" -require "active_support/core_ext/range/overlaps" -require "active_support/core_ext/range/each" +require_relative "range/conversions" +require_relative "range/include_range" +require_relative "range/overlaps" +require_relative "range/each" diff --git a/activesupport/lib/active_support/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb index 4cb3200875..b16b35144e 100644 --- a/activesupport/lib/active_support/core_ext/string.rb +++ b/activesupport/lib/active_support/core_ext/string.rb @@ -1,13 +1,13 @@ -require "active_support/core_ext/string/conversions" -require "active_support/core_ext/string/filters" -require "active_support/core_ext/string/multibyte" -require "active_support/core_ext/string/starts_ends_with" -require "active_support/core_ext/string/inflections" -require "active_support/core_ext/string/access" -require "active_support/core_ext/string/behavior" -require "active_support/core_ext/string/output_safety" -require "active_support/core_ext/string/exclude" -require "active_support/core_ext/string/strip" -require "active_support/core_ext/string/inquiry" -require "active_support/core_ext/string/indent" -require "active_support/core_ext/string/zones" +require_relative "string/conversions" +require_relative "string/filters" +require_relative "string/multibyte" +require_relative "string/starts_ends_with" +require_relative "string/inflections" +require_relative "string/access" +require_relative "string/behavior" +require_relative "string/output_safety" +require_relative "string/exclude" +require_relative "string/strip" +require_relative "string/inquiry" +require_relative "string/indent" +require_relative "string/zones" diff --git a/activesupport/lib/active_support/core_ext/string/conversions.rb b/activesupport/lib/active_support/core_ext/string/conversions.rb index 221b4969cc..383d93e2cd 100644 --- a/activesupport/lib/active_support/core_ext/string/conversions.rb +++ b/activesupport/lib/active_support/core_ext/string/conversions.rb @@ -1,5 +1,5 @@ require "date" -require "active_support/core_ext/time/calculations" +require_relative "../time/calculations" class String # Converts a string to a Time value. diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index b27cfe53f4..70c732ca44 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -1,5 +1,5 @@ -require "active_support/inflector/methods" -require "active_support/inflector/transliterate" +require_relative "../../inflector/methods" +require_relative "../../inflector/transliterate" # String inflections define new methods on the String class to transform names for different purposes. # For instance, you can figure out the name of a table from the name of a class. diff --git a/activesupport/lib/active_support/core_ext/string/inquiry.rb b/activesupport/lib/active_support/core_ext/string/inquiry.rb index c95d83beae..dfa78b2ff8 100644 --- a/activesupport/lib/active_support/core_ext/string/inquiry.rb +++ b/activesupport/lib/active_support/core_ext/string/inquiry.rb @@ -1,4 +1,4 @@ -require "active_support/string_inquirer" +require_relative "../../string_inquirer" class String # Wraps the current string in the ActiveSupport::StringInquirer class, diff --git a/activesupport/lib/active_support/core_ext/string/multibyte.rb b/activesupport/lib/active_support/core_ext/string/multibyte.rb index 1c73182259..56a1cede1a 100644 --- a/activesupport/lib/active_support/core_ext/string/multibyte.rb +++ b/activesupport/lib/active_support/core_ext/string/multibyte.rb @@ -1,4 +1,4 @@ -require "active_support/multibyte" +require_relative "../../multibyte" class String # == Multibyte proxy diff --git a/activesupport/lib/active_support/core_ext/string/output_safety.rb b/activesupport/lib/active_support/core_ext/string/output_safety.rb index 94ce3f6a61..607870237b 100644 --- a/activesupport/lib/active_support/core_ext/string/output_safety.rb +++ b/activesupport/lib/active_support/core_ext/string/output_safety.rb @@ -1,6 +1,6 @@ require "erb" -require "active_support/core_ext/kernel/singleton_class" -require "active_support/multibyte/unicode" +require_relative "../kernel/singleton_class" +require_relative "../../multibyte/unicode" class ERB module Util diff --git a/activesupport/lib/active_support/core_ext/string/zones.rb b/activesupport/lib/active_support/core_ext/string/zones.rb index de5a28e4f7..d8d22a6799 100644 --- a/activesupport/lib/active_support/core_ext/string/zones.rb +++ b/activesupport/lib/active_support/core_ext/string/zones.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/string/conversions" -require "active_support/core_ext/time/zones" +require_relative "conversions" +require_relative "../time/zones" class String # Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default diff --git a/activesupport/lib/active_support/core_ext/time.rb b/activesupport/lib/active_support/core_ext/time.rb index b1ae4a45d9..19d4d91dac 100644 --- a/activesupport/lib/active_support/core_ext/time.rb +++ b/activesupport/lib/active_support/core_ext/time.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/time/acts_like" -require "active_support/core_ext/time/calculations" -require "active_support/core_ext/time/compatibility" -require "active_support/core_ext/time/conversions" -require "active_support/core_ext/time/zones" +require_relative "time/acts_like" +require_relative "time/calculations" +require_relative "time/compatibility" +require_relative "time/conversions" +require_relative "time/zones" diff --git a/activesupport/lib/active_support/core_ext/time/acts_like.rb b/activesupport/lib/active_support/core_ext/time/acts_like.rb index cf4b2539c5..08756a2dae 100644 --- a/activesupport/lib/active_support/core_ext/time/acts_like.rb +++ b/activesupport/lib/active_support/core_ext/time/acts_like.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/object/acts_like" +require_relative "../object/acts_like" class Time # Duck-types as a Time-like class. See Object#acts_like?. diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index d3f23f4663..9ba6bf8fa1 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -1,9 +1,9 @@ -require "active_support/duration" -require "active_support/core_ext/time/conversions" -require "active_support/time_with_zone" -require "active_support/core_ext/time/zones" -require "active_support/core_ext/date_and_time/calculations" -require "active_support/core_ext/date/calculations" +require_relative "../../duration" +require_relative "conversions" +require_relative "../../time_with_zone" +require_relative "zones" +require_relative "../date_and_time/calculations" +require_relative "../date/calculations" class Time include DateAndTime::Calculations diff --git a/activesupport/lib/active_support/core_ext/time/compatibility.rb b/activesupport/lib/active_support/core_ext/time/compatibility.rb index 45e86b77ce..a554e71b74 100644 --- a/activesupport/lib/active_support/core_ext/time/compatibility.rb +++ b/activesupport/lib/active_support/core_ext/time/compatibility.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/date_and_time/compatibility" -require "active_support/core_ext/module/remove_method" +require_relative "../date_and_time/compatibility" +require_relative "../module/remove_method" class Time include DateAndTime::Compatibility diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb index 595bda6b4f..0dbce99ccb 100644 --- a/activesupport/lib/active_support/core_ext/time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/time/conversions.rb @@ -1,5 +1,5 @@ -require "active_support/inflector/methods" -require "active_support/values/time_zone" +require_relative "../../inflector/methods" +require_relative "../../values/time_zone" class Time DATE_FORMATS = { diff --git a/activesupport/lib/active_support/core_ext/time/zones.rb b/activesupport/lib/active_support/core_ext/time/zones.rb index 87b5ad903a..ba8b5b73f8 100644 --- a/activesupport/lib/active_support/core_ext/time/zones.rb +++ b/activesupport/lib/active_support/core_ext/time/zones.rb @@ -1,6 +1,6 @@ -require "active_support/time_with_zone" -require "active_support/core_ext/time/acts_like" -require "active_support/core_ext/date_and_time/zones" +require_relative "../../time_with_zone" +require_relative "acts_like" +require_relative "../date_and_time/zones" class Time include DateAndTime::Zones diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 3cd8f3d0ac..05b9b5b211 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -2,17 +2,17 @@ require "set" require "thread" require "concurrent/map" require "pathname" -require "active_support/core_ext/module/aliasing" -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/module/introspection" -require "active_support/core_ext/module/anonymous" -require "active_support/core_ext/object/blank" -require "active_support/core_ext/kernel/reporting" -require "active_support/core_ext/load_error" -require "active_support/core_ext/name_error" -require "active_support/core_ext/string/starts_ends_with" -require "active_support/dependencies/interlock" -require "active_support/inflector" +require_relative "core_ext/module/aliasing" +require_relative "core_ext/module/attribute_accessors" +require_relative "core_ext/module/introspection" +require_relative "core_ext/module/anonymous" +require_relative "core_ext/object/blank" +require_relative "core_ext/kernel/reporting" +require_relative "core_ext/load_error" +require_relative "core_ext/name_error" +require_relative "core_ext/string/starts_ends_with" +require_relative "dependencies/interlock" +require_relative "inflector" module ActiveSupport #:nodoc: module Dependencies #:nodoc: diff --git a/activesupport/lib/active_support/dependencies/autoload.rb b/activesupport/lib/active_support/dependencies/autoload.rb index 13036d521d..9e4d3b783b 100644 --- a/activesupport/lib/active_support/dependencies/autoload.rb +++ b/activesupport/lib/active_support/dependencies/autoload.rb @@ -1,4 +1,4 @@ -require "active_support/inflector/methods" +require_relative "../inflector/methods" module ActiveSupport # Autoload and eager load conveniences for your library. diff --git a/activesupport/lib/active_support/dependencies/interlock.rb b/activesupport/lib/active_support/dependencies/interlock.rb index e4e18439c5..b88cf08dd2 100644 --- a/activesupport/lib/active_support/dependencies/interlock.rb +++ b/activesupport/lib/active_support/dependencies/interlock.rb @@ -1,4 +1,4 @@ -require "active_support/concurrency/share_lock" +require_relative "../concurrency/share_lock" module ActiveSupport #:nodoc: module Dependencies #:nodoc: diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb index d1e6502669..eaaf198ccb 100644 --- a/activesupport/lib/active_support/deprecation.rb +++ b/activesupport/lib/active_support/deprecation.rb @@ -12,13 +12,13 @@ module ActiveSupport # a circular require warning for active_support/deprecation.rb. # # So, we define the constant first, and load dependencies later. - require "active_support/deprecation/instance_delegator" - require "active_support/deprecation/behaviors" - require "active_support/deprecation/reporting" - require "active_support/deprecation/constant_accessor" - require "active_support/deprecation/method_wrappers" - require "active_support/deprecation/proxy_wrappers" - require "active_support/core_ext/module/deprecation" + require_relative "deprecation/instance_delegator" + require_relative "deprecation/behaviors" + require_relative "deprecation/reporting" + require_relative "deprecation/constant_accessor" + require_relative "deprecation/method_wrappers" + require_relative "deprecation/proxy_wrappers" + require_relative "core_ext/module/deprecation" include Singleton include InstanceDelegator diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index a9a182f212..409f4cf6a6 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -1,4 +1,4 @@ -require "active_support/notifications" +require_relative "../notifications" module ActiveSupport # Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. @@ -25,7 +25,7 @@ module ActiveSupport if defined?(Rails.logger) && Rails.logger Rails.logger else - require "active_support/logger" + require_relative "../logger" ActiveSupport::Logger.new($stderr) end logger.warn message diff --git a/activesupport/lib/active_support/deprecation/constant_accessor.rb b/activesupport/lib/active_support/deprecation/constant_accessor.rb index 2b19de365f..895b23e8ef 100644 --- a/activesupport/lib/active_support/deprecation/constant_accessor.rb +++ b/activesupport/lib/active_support/deprecation/constant_accessor.rb @@ -1,4 +1,4 @@ -require "active_support/inflector/methods" +require_relative "../inflector/methods" module ActiveSupport class Deprecation diff --git a/activesupport/lib/active_support/deprecation/instance_delegator.rb b/activesupport/lib/active_support/deprecation/instance_delegator.rb index 6d390f3b37..23eac0e5d3 100644 --- a/activesupport/lib/active_support/deprecation/instance_delegator.rb +++ b/activesupport/lib/active_support/deprecation/instance_delegator.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/kernel/singleton_class" -require "active_support/core_ext/module/delegation" +require_relative "../core_ext/kernel/singleton_class" +require_relative "../core_ext/module/delegation" module ActiveSupport class Deprecation diff --git a/activesupport/lib/active_support/deprecation/method_wrappers.rb b/activesupport/lib/active_support/deprecation/method_wrappers.rb index 930d71e8d2..ed41e9aaa4 100644 --- a/activesupport/lib/active_support/deprecation/method_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/method_wrappers.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/module/aliasing" -require "active_support/core_ext/array/extract_options" +require_relative "../core_ext/module/aliasing" +require_relative "../core_ext/array/extract_options" module ActiveSupport class Deprecation diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb index ce39e9a232..64aaef3e43 100644 --- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb @@ -1,5 +1,5 @@ -require "active_support/inflector/methods" -require "active_support/core_ext/regexp" +require_relative "../inflector/methods" +require_relative "../core_ext/regexp" module ActiveSupport class Deprecation diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb index 39deb2313f..0ad591e683 100644 --- a/activesupport/lib/active_support/duration.rb +++ b/activesupport/lib/active_support/duration.rb @@ -1,8 +1,8 @@ -require "active_support/core_ext/array/conversions" -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/object/acts_like" -require "active_support/core_ext/string/filters" -require "active_support/deprecation" +require_relative "core_ext/array/conversions" +require_relative "core_ext/module/delegation" +require_relative "core_ext/object/acts_like" +require_relative "core_ext/string/filters" +require_relative "deprecation" module ActiveSupport # Provides accurate date and time measurements using Date#advance and diff --git a/activesupport/lib/active_support/duration/iso8601_parser.rb b/activesupport/lib/active_support/duration/iso8601_parser.rb index e96cb8e883..78a00b5e4f 100644 --- a/activesupport/lib/active_support/duration/iso8601_parser.rb +++ b/activesupport/lib/active_support/duration/iso8601_parser.rb @@ -1,5 +1,5 @@ require "strscan" -require "active_support/core_ext/regexp" +require_relative "../core_ext/regexp" module ActiveSupport class Duration diff --git a/activesupport/lib/active_support/duration/iso8601_serializer.rb b/activesupport/lib/active_support/duration/iso8601_serializer.rb index e5d458b3ab..969e1a46c2 100644 --- a/activesupport/lib/active_support/duration/iso8601_serializer.rb +++ b/activesupport/lib/active_support/duration/iso8601_serializer.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/object/blank" -require "active_support/core_ext/hash/transform_values" +require_relative "../core_ext/object/blank" +require_relative "../core_ext/hash/transform_values" module ActiveSupport class Duration diff --git a/activesupport/lib/active_support/execution_wrapper.rb b/activesupport/lib/active_support/execution_wrapper.rb index ca88e7876b..3513e9023c 100644 --- a/activesupport/lib/active_support/execution_wrapper.rb +++ b/activesupport/lib/active_support/execution_wrapper.rb @@ -1,4 +1,4 @@ -require "active_support/callbacks" +require_relative "callbacks" module ActiveSupport class ExecutionWrapper diff --git a/activesupport/lib/active_support/executor.rb b/activesupport/lib/active_support/executor.rb index a6400cae0a..4a618d9fa2 100644 --- a/activesupport/lib/active_support/executor.rb +++ b/activesupport/lib/active_support/executor.rb @@ -1,4 +1,4 @@ -require "active_support/execution_wrapper" +require_relative "execution_wrapper" module ActiveSupport class Executor < ExecutionWrapper diff --git a/activesupport/lib/active_support/file_update_checker.rb b/activesupport/lib/active_support/file_update_checker.rb index 2b5e3c1350..b9d8740569 100644 --- a/activesupport/lib/active_support/file_update_checker.rb +++ b/activesupport/lib/active_support/file_update_checker.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/time/calculations" +require_relative "core_ext/time/calculations" module ActiveSupport # FileUpdateChecker specifies the API used by Rails to watch files diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index 3b185dd86b..6c98960292 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/hash/keys" -require "active_support/core_ext/hash/reverse_merge" +require_relative "core_ext/hash/keys" +require_relative "core_ext/hash/reverse_merge" module ActiveSupport # Implements a hash where keys :foo and "foo" are considered diff --git a/activesupport/lib/active_support/i18n.rb b/activesupport/lib/active_support/i18n.rb index 1a1f1a1257..3f47da3b38 100644 --- a/activesupport/lib/active_support/i18n.rb +++ b/activesupport/lib/active_support/i18n.rb @@ -1,13 +1,13 @@ -require "active_support/core_ext/hash/deep_merge" -require "active_support/core_ext/hash/except" -require "active_support/core_ext/hash/slice" +require_relative "core_ext/hash/deep_merge" +require_relative "core_ext/hash/except" +require_relative "core_ext/hash/slice" begin require "i18n" rescue LoadError => e $stderr.puts "The i18n gem is not available. Please add it to your Gemfile and run bundle install" raise e end -require "active_support/lazy_load_hooks" +require_relative "lazy_load_hooks" ActiveSupport.run_load_hooks(:i18n) I18n.load_path << File.expand_path("locale/en.yml", __dir__) diff --git a/activesupport/lib/active_support/i18n_railtie.rb b/activesupport/lib/active_support/i18n_railtie.rb index 51fe6f3418..6809a650cf 100644 --- a/activesupport/lib/active_support/i18n_railtie.rb +++ b/activesupport/lib/active_support/i18n_railtie.rb @@ -1,6 +1,6 @@ require "active_support" -require "active_support/file_update_checker" -require "active_support/core_ext/array/wrap" +require_relative "file_update_checker" +require_relative "core_ext/array/wrap" # :enddoc: diff --git a/activesupport/lib/active_support/inflections.rb b/activesupport/lib/active_support/inflections.rb index afa7d1f325..1b94ce9b1b 100644 --- a/activesupport/lib/active_support/inflections.rb +++ b/activesupport/lib/active_support/inflections.rb @@ -1,4 +1,4 @@ -require "active_support/inflector/inflections" +require_relative "inflector/inflections" #-- # Defines the standard inflection rules. These are the starting point for diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index 48631b16a8..a4bd8aaeb4 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -1,7 +1,7 @@ # in case active_support/inflector is required without the rest of active_support -require "active_support/inflector/inflections" -require "active_support/inflector/transliterate" -require "active_support/inflector/methods" +require_relative "inflector/inflections" +require_relative "inflector/transliterate" +require_relative "inflector/methods" -require "active_support/inflections" -require "active_support/core_ext/string/inflections" +require_relative "inflections" +require_relative "core_ext/string/inflections" diff --git a/activesupport/lib/active_support/inflector/inflections.rb b/activesupport/lib/active_support/inflector/inflections.rb index c47a2e34e1..2cb7828968 100644 --- a/activesupport/lib/active_support/inflector/inflections.rb +++ b/activesupport/lib/active_support/inflector/inflections.rb @@ -1,7 +1,7 @@ require "concurrent/map" -require "active_support/core_ext/array/prepend_and_append" -require "active_support/core_ext/regexp" -require "active_support/i18n" +require_relative "../core_ext/array/prepend_and_append" +require_relative "../core_ext/regexp" +require_relative "../i18n" module ActiveSupport module Inflector diff --git a/activesupport/lib/active_support/inflector/methods.rb b/activesupport/lib/active_support/inflector/methods.rb index ff1a0cb8c7..ba85d3bb33 100644 --- a/activesupport/lib/active_support/inflector/methods.rb +++ b/activesupport/lib/active_support/inflector/methods.rb @@ -1,5 +1,5 @@ -require "active_support/inflections" -require "active_support/core_ext/regexp" +require_relative "../inflections" +require_relative "../core_ext/regexp" module ActiveSupport # The Inflector transforms words from singular to plural, class names to table diff --git a/activesupport/lib/active_support/inflector/transliterate.rb b/activesupport/lib/active_support/inflector/transliterate.rb index de6dd2720b..0775ee51bc 100644 --- a/activesupport/lib/active_support/inflector/transliterate.rb +++ b/activesupport/lib/active_support/inflector/transliterate.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/string/multibyte" -require "active_support/i18n" +require_relative "../core_ext/string/multibyte" +require_relative "../i18n" module ActiveSupport module Inflector diff --git a/activesupport/lib/active_support/json.rb b/activesupport/lib/active_support/json.rb index da938d1555..e0a6ab3768 100644 --- a/activesupport/lib/active_support/json.rb +++ b/activesupport/lib/active_support/json.rb @@ -1,2 +1,2 @@ -require "active_support/json/decoding" -require "active_support/json/encoding" +require_relative "json/decoding" +require_relative "json/encoding" diff --git a/activesupport/lib/active_support/json/decoding.rb b/activesupport/lib/active_support/json/decoding.rb index f487fa0c65..c60ebb2795 100644 --- a/activesupport/lib/active_support/json/decoding.rb +++ b/activesupport/lib/active_support/json/decoding.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/module/delegation" +require_relative "../core_ext/module/attribute_accessors" +require_relative "../core_ext/module/delegation" require "json" module ActiveSupport diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index defaf3f395..e7679e4630 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/object/json" -require "active_support/core_ext/module/delegation" +require_relative "../core_ext/object/json" +require_relative "../core_ext/module/delegation" module ActiveSupport class << self diff --git a/activesupport/lib/active_support/log_subscriber.rb b/activesupport/lib/active_support/log_subscriber.rb index a05758d6aa..2b494e6d6c 100644 --- a/activesupport/lib/active_support/log_subscriber.rb +++ b/activesupport/lib/active_support/log_subscriber.rb @@ -1,6 +1,6 @@ -require "active_support/core_ext/module/attribute_accessors" -require "active_support/core_ext/class/attribute" -require "active_support/subscriber" +require_relative "core_ext/module/attribute_accessors" +require_relative "core_ext/class/attribute" +require_relative "subscriber" module ActiveSupport # ActiveSupport::LogSubscriber is an object set to consume diff --git a/activesupport/lib/active_support/log_subscriber/test_helper.rb b/activesupport/lib/active_support/log_subscriber/test_helper.rb index 953ee77c2a..469e6c6bb4 100644 --- a/activesupport/lib/active_support/log_subscriber/test_helper.rb +++ b/activesupport/lib/active_support/log_subscriber/test_helper.rb @@ -1,6 +1,6 @@ -require "active_support/log_subscriber" -require "active_support/logger" -require "active_support/notifications" +require_relative "../log_subscriber" +require_relative "../logger" +require_relative "../notifications" module ActiveSupport class LogSubscriber diff --git a/activesupport/lib/active_support/logger.rb b/activesupport/lib/active_support/logger.rb index ea09d7d2df..677ec8d5bc 100644 --- a/activesupport/lib/active_support/logger.rb +++ b/activesupport/lib/active_support/logger.rb @@ -1,5 +1,5 @@ -require "active_support/logger_silence" -require "active_support/logger_thread_safe_level" +require_relative "logger_silence" +require_relative "logger_thread_safe_level" require "logger" module ActiveSupport diff --git a/activesupport/lib/active_support/logger_silence.rb b/activesupport/lib/active_support/logger_silence.rb index 9c64afaaca..7f85f54542 100644 --- a/activesupport/lib/active_support/logger_silence.rb +++ b/activesupport/lib/active_support/logger_silence.rb @@ -1,5 +1,5 @@ -require "active_support/concern" -require "active_support/core_ext/module/attribute_accessors" +require_relative "concern" +require_relative "core_ext/module/attribute_accessors" require "concurrent" module LoggerSilence diff --git a/activesupport/lib/active_support/logger_thread_safe_level.rb b/activesupport/lib/active_support/logger_thread_safe_level.rb index 7fb175dea6..405bb239cf 100644 --- a/activesupport/lib/active_support/logger_thread_safe_level.rb +++ b/activesupport/lib/active_support/logger_thread_safe_level.rb @@ -1,4 +1,4 @@ -require "active_support/concern" +require_relative "concern" module ActiveSupport module LoggerThreadSafeLevel # :nodoc: diff --git a/activesupport/lib/active_support/message_encryptor.rb b/activesupport/lib/active_support/message_encryptor.rb index e576766c64..2990a3de76 100644 --- a/activesupport/lib/active_support/message_encryptor.rb +++ b/activesupport/lib/active_support/message_encryptor.rb @@ -1,7 +1,7 @@ require "openssl" require "base64" -require "active_support/core_ext/array/extract_options" -require "active_support/message_verifier" +require_relative "core_ext/array/extract_options" +require_relative "message_verifier" module ActiveSupport # MessageEncryptor is a simple way to encrypt values which get stored diff --git a/activesupport/lib/active_support/message_verifier.rb b/activesupport/lib/active_support/message_verifier.rb index 8419e858c6..e71dcd3a5b 100644 --- a/activesupport/lib/active_support/message_verifier.rb +++ b/activesupport/lib/active_support/message_verifier.rb @@ -1,6 +1,6 @@ require "base64" -require "active_support/core_ext/object/blank" -require "active_support/security_utils" +require_relative "core_ext/object/blank" +require_relative "security_utils" module ActiveSupport # +MessageVerifier+ makes it easy to generate and verify messages which are diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 8c58466556..e4c544d1fa 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -1,8 +1,8 @@ -require "active_support/json" -require "active_support/core_ext/string/access" -require "active_support/core_ext/string/behavior" -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/regexp" +require_relative "../json" +require_relative "../core_ext/string/access" +require_relative "../core_ext/string/behavior" +require_relative "../core_ext/module/delegation" +require_relative "../core_ext/regexp" module ActiveSupport #:nodoc: module Multibyte #:nodoc: diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb index 37dfdc0422..10e40e04f9 100644 --- a/activesupport/lib/active_support/notifications.rb +++ b/activesupport/lib/active_support/notifications.rb @@ -1,6 +1,6 @@ -require "active_support/notifications/instrumenter" -require "active_support/notifications/fanout" -require "active_support/per_thread_registry" +require_relative "notifications/instrumenter" +require_relative "notifications/fanout" +require_relative "per_thread_registry" module ActiveSupport # = Notifications diff --git a/activesupport/lib/active_support/number_helper/number_converter.rb b/activesupport/lib/active_support/number_helper/number_converter.rb index ce363287cf..f3fed6e88b 100644 --- a/activesupport/lib/active_support/number_helper/number_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_converter.rb @@ -1,8 +1,8 @@ -require "active_support/core_ext/big_decimal/conversions" -require "active_support/core_ext/object/blank" -require "active_support/core_ext/hash/keys" -require "active_support/i18n" -require "active_support/core_ext/class/attribute" +require_relative "../core_ext/big_decimal/conversions" +require_relative "../core_ext/object/blank" +require_relative "../core_ext/hash/keys" +require_relative "../i18n" +require_relative "../core_ext/class/attribute" module ActiveSupport module NumberHelper diff --git a/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb index 0f9dce722f..7bd2d4869a 100644 --- a/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb +++ b/activesupport/lib/active_support/number_helper/number_to_currency_converter.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/numeric/inquiry" +require_relative "../core_ext/numeric/inquiry" module ActiveSupport module NumberHelper diff --git a/activesupport/lib/active_support/option_merger.rb b/activesupport/lib/active_support/option_merger.rb index 0f2caa98f2..9edb0e6cd8 100644 --- a/activesupport/lib/active_support/option_merger.rb +++ b/activesupport/lib/active_support/option_merger.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/hash/deep_merge" +require_relative "core_ext/hash/deep_merge" module ActiveSupport class OptionMerger #:nodoc: diff --git a/activesupport/lib/active_support/ordered_options.rb b/activesupport/lib/active_support/ordered_options.rb index 04d6dfaf9c..c0f39a392b 100644 --- a/activesupport/lib/active_support/ordered_options.rb +++ b/activesupport/lib/active_support/ordered_options.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/object/blank" +require_relative "core_ext/object/blank" module ActiveSupport # Usually key value pairs are handled something like this: diff --git a/activesupport/lib/active_support/per_thread_registry.rb b/activesupport/lib/active_support/per_thread_registry.rb index 02431704d3..1e0d8345a0 100644 --- a/activesupport/lib/active_support/per_thread_registry.rb +++ b/activesupport/lib/active_support/per_thread_registry.rb @@ -1,4 +1,4 @@ -require "active_support/core_ext/module/delegation" +require_relative "core_ext/module/delegation" module ActiveSupport # NOTE: This approach has been deprecated for end-user code in favor of {thread_mattr_accessor}[rdoc-ref:Module#thread_mattr_accessor] and friends. diff --git a/activesupport/lib/active_support/rails.rb b/activesupport/lib/active_support/rails.rb index f6b018f0d3..656af6dee9 100644 --- a/activesupport/lib/active_support/rails.rb +++ b/activesupport/lib/active_support/rails.rb @@ -9,25 +9,25 @@ # Rails and can change anytime. # Defines Object#blank? and Object#present?. -require "active_support/core_ext/object/blank" +require_relative "core_ext/object/blank" # Rails own autoload, eager_load, etc. -require "active_support/dependencies/autoload" +require_relative "dependencies/autoload" # Support for ClassMethods and the included macro. -require "active_support/concern" +require_relative "concern" # Defines Class#class_attribute. -require "active_support/core_ext/class/attribute" +require_relative "core_ext/class/attribute" # Defines Module#delegate. -require "active_support/core_ext/module/delegation" +require_relative "core_ext/module/delegation" # Defines ActiveSupport::Deprecation. -require "active_support/deprecation" +require_relative "deprecation" # Defines Regexp#match?. # # This should be removed when Rails needs Ruby 2.4 or later, and the require # added where other Regexp extensions are being used (easy to grep). -require "active_support/core_ext/regexp" +require_relative "core_ext/regexp" diff --git a/activesupport/lib/active_support/railtie.rb b/activesupport/lib/active_support/railtie.rb index 45bc51311b..3377748263 100644 --- a/activesupport/lib/active_support/railtie.rb +++ b/activesupport/lib/active_support/railtie.rb @@ -1,5 +1,5 @@ require "active_support" -require "active_support/i18n_railtie" +require_relative "i18n_railtie" module ActiveSupport class Railtie < Rails::Railtie # :nodoc: @@ -34,14 +34,14 @@ module ActiveSupport rescue TZInfo::DataSourceNotFound => e raise e.exception "tzinfo-data is not present. Please add gem 'tzinfo-data' to your Gemfile and run bundle install" end - require "active_support/core_ext/time/zones" + require_relative "core_ext/time/zones" Time.zone_default = Time.find_zone!(app.config.time_zone) end # Sets the default week start # If assigned value is not a valid day symbol (e.g. :sunday, :monday, ...), an exception will be raised. initializer "active_support.initialize_beginning_of_week" do |app| - require "active_support/core_ext/date/calculations" + require_relative "core_ext/date/calculations" beginning_of_week_default = Date.find_beginning_of_week!(app.config.beginning_of_week) Date.beginning_of_week_default = beginning_of_week_default diff --git a/activesupport/lib/active_support/reloader.rb b/activesupport/lib/active_support/reloader.rb index 9558146201..a87c82e68a 100644 --- a/activesupport/lib/active_support/reloader.rb +++ b/activesupport/lib/active_support/reloader.rb @@ -1,4 +1,4 @@ -require "active_support/execution_wrapper" +require_relative "execution_wrapper" module ActiveSupport #-- diff --git a/activesupport/lib/active_support/rescuable.rb b/activesupport/lib/active_support/rescuable.rb index 826832ba7d..06f6a71de4 100644 --- a/activesupport/lib/active_support/rescuable.rb +++ b/activesupport/lib/active_support/rescuable.rb @@ -1,6 +1,6 @@ -require "active_support/concern" -require "active_support/core_ext/class/attribute" -require "active_support/core_ext/string/inflections" +require_relative "concern" +require_relative "core_ext/class/attribute" +require_relative "core_ext/string/inflections" module ActiveSupport # Rescuable module adds support for easier exception handling. diff --git a/activesupport/lib/active_support/subscriber.rb b/activesupport/lib/active_support/subscriber.rb index 2924139755..3a54482c75 100644 --- a/activesupport/lib/active_support/subscriber.rb +++ b/activesupport/lib/active_support/subscriber.rb @@ -1,5 +1,5 @@ -require "active_support/per_thread_registry" -require "active_support/notifications" +require_relative "per_thread_registry" +require_relative "notifications" module ActiveSupport # ActiveSupport::Subscriber is an object set to consume diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index ad134c49b6..90d096c397 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -1,7 +1,7 @@ -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/object/blank" +require_relative "core_ext/module/delegation" +require_relative "core_ext/object/blank" require "logger" -require "active_support/logger" +require_relative "logger" module ActiveSupport # Wraps any standard Logger object to provide tagging capabilities. diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index 3de4ccc1da..f2940a176f 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -1,15 +1,15 @@ gem "minitest" # make sure we get the gem, not stdlib require "minitest" -require "active_support/testing/tagged_logging" -require "active_support/testing/setup_and_teardown" -require "active_support/testing/assertions" -require "active_support/testing/deprecation" -require "active_support/testing/declarative" -require "active_support/testing/isolation" -require "active_support/testing/constant_lookup" -require "active_support/testing/time_helpers" -require "active_support/testing/file_fixtures" -require "active_support/core_ext/kernel/reporting" +require_relative "testing/tagged_logging" +require_relative "testing/setup_and_teardown" +require_relative "testing/assertions" +require_relative "testing/deprecation" +require_relative "testing/declarative" +require_relative "testing/isolation" +require_relative "testing/constant_lookup" +require_relative "testing/time_helpers" +require_relative "testing/file_fixtures" +require_relative "core_ext/kernel/reporting" module ActiveSupport class TestCase < ::Minitest::Test diff --git a/activesupport/lib/active_support/testing/constant_lookup.rb b/activesupport/lib/active_support/testing/constant_lookup.rb index 647395d2b3..c0b58aba96 100644 --- a/activesupport/lib/active_support/testing/constant_lookup.rb +++ b/activesupport/lib/active_support/testing/constant_lookup.rb @@ -1,5 +1,5 @@ -require "active_support/concern" -require "active_support/inflector" +require_relative "../concern" +require_relative "../inflector" module ActiveSupport module Testing diff --git a/activesupport/lib/active_support/testing/deprecation.rb b/activesupport/lib/active_support/testing/deprecation.rb index 58911570e8..6ee49530f0 100644 --- a/activesupport/lib/active_support/testing/deprecation.rb +++ b/activesupport/lib/active_support/testing/deprecation.rb @@ -1,5 +1,5 @@ -require "active_support/deprecation" -require "active_support/core_ext/regexp" +require_relative "../deprecation" +require_relative "../core_ext/regexp" module ActiveSupport module Testing diff --git a/activesupport/lib/active_support/testing/setup_and_teardown.rb b/activesupport/lib/active_support/testing/setup_and_teardown.rb index 358c79c321..c39f3bac2b 100644 --- a/activesupport/lib/active_support/testing/setup_and_teardown.rb +++ b/activesupport/lib/active_support/testing/setup_and_teardown.rb @@ -1,5 +1,5 @@ -require "active_support/concern" -require "active_support/callbacks" +require_relative "../concern" +require_relative "../callbacks" module ActiveSupport module Testing diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb index 3d9ff99729..4db7065ddf 100644 --- a/activesupport/lib/active_support/testing/time_helpers.rb +++ b/activesupport/lib/active_support/testing/time_helpers.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/string/strip" # for strip_heredoc -require "active_support/core_ext/time/calculations" +require_relative "../core_ext/string/strip" # for strip_heredoc +require_relative "../core_ext/time/calculations" require "concurrent/map" module ActiveSupport diff --git a/activesupport/lib/active_support/time.rb b/activesupport/lib/active_support/time.rb index 7658228ca6..bc5f0177e2 100644 --- a/activesupport/lib/active_support/time.rb +++ b/activesupport/lib/active_support/time.rb @@ -7,12 +7,12 @@ end require "date" require "time" -require "active_support/core_ext/time" -require "active_support/core_ext/date" -require "active_support/core_ext/date_time" +require_relative "core_ext/time" +require_relative "core_ext/date" +require_relative "core_ext/date_time" -require "active_support/core_ext/integer/time" -require "active_support/core_ext/numeric/time" +require_relative "core_ext/integer/time" +require_relative "core_ext/numeric/time" -require "active_support/core_ext/string/conversions" -require "active_support/core_ext/string/zones" +require_relative "core_ext/string/conversions" +require_relative "core_ext/string/zones" diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index ecb9fb6785..67d4a8683b 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -1,7 +1,7 @@ -require "active_support/duration" -require "active_support/values/time_zone" -require "active_support/core_ext/object/acts_like" -require "active_support/core_ext/date_and_time/compatibility" +require_relative "duration" +require_relative "values/time_zone" +require_relative "core_ext/object/acts_like" +require_relative "core_ext/date_and_time/compatibility" module ActiveSupport # A Time-like class that can represent a time in any time zone. Necessary diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 96a541a4ef..0659b39981 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -1,6 +1,6 @@ require "tzinfo" require "concurrent/map" -require "active_support/core_ext/object/blank" +require_relative "../core_ext/object/blank" module ActiveSupport # The TimeZone class serves as a wrapper around TZInfo::Timezone instances. diff --git a/activesupport/lib/active_support/xml_mini.rb b/activesupport/lib/active_support/xml_mini.rb index 782fb41288..14725ffd64 100644 --- a/activesupport/lib/active_support/xml_mini.rb +++ b/activesupport/lib/active_support/xml_mini.rb @@ -1,9 +1,9 @@ require "time" require "base64" require "bigdecimal" -require "active_support/core_ext/module/delegation" -require "active_support/core_ext/string/inflections" -require "active_support/core_ext/date_time/calculations" +require_relative "core_ext/module/delegation" +require_relative "core_ext/string/inflections" +require_relative "core_ext/date_time/calculations" module ActiveSupport # = XmlMini @@ -197,7 +197,7 @@ module ActiveSupport if name.is_a?(Module) name else - require "active_support/xml_mini/#{name.downcase}" + require_relative "xml_mini/#{name.downcase}" ActiveSupport.const_get("XmlMini_#{name}") end end diff --git a/activesupport/lib/active_support/xml_mini/jdom.rb b/activesupport/lib/active_support/xml_mini/jdom.rb index a7939b3185..331d9960e7 100644 --- a/activesupport/lib/active_support/xml_mini/jdom.rb +++ b/activesupport/lib/active_support/xml_mini/jdom.rb @@ -3,7 +3,7 @@ raise "JRuby is required to use the JDOM backend for XmlMini" unless RUBY_PLATFO require "jruby" include Java -require "active_support/core_ext/object/blank" +require_relative "../core_ext/object/blank" java_import javax.xml.parsers.DocumentBuilder unless defined? DocumentBuilder java_import javax.xml.parsers.DocumentBuilderFactory unless defined? DocumentBuilderFactory diff --git a/activesupport/lib/active_support/xml_mini/libxml.rb b/activesupport/lib/active_support/xml_mini/libxml.rb index d849cdfa6b..e78f7f7ed4 100644 --- a/activesupport/lib/active_support/xml_mini/libxml.rb +++ b/activesupport/lib/active_support/xml_mini/libxml.rb @@ -1,5 +1,5 @@ require "libxml" -require "active_support/core_ext/object/blank" +require_relative "../core_ext/object/blank" require "stringio" module ActiveSupport diff --git a/activesupport/lib/active_support/xml_mini/libxmlsax.rb b/activesupport/lib/active_support/xml_mini/libxmlsax.rb index f3d485da2f..ab5fd5568d 100644 --- a/activesupport/lib/active_support/xml_mini/libxmlsax.rb +++ b/activesupport/lib/active_support/xml_mini/libxmlsax.rb @@ -1,5 +1,5 @@ require "libxml" -require "active_support/core_ext/object/blank" +require_relative "../core_ext/object/blank" require "stringio" module ActiveSupport diff --git a/activesupport/lib/active_support/xml_mini/nokogiri.rb b/activesupport/lib/active_support/xml_mini/nokogiri.rb index 63466c08b2..7ac11a9a89 100644 --- a/activesupport/lib/active_support/xml_mini/nokogiri.rb +++ b/activesupport/lib/active_support/xml_mini/nokogiri.rb @@ -4,7 +4,7 @@ rescue LoadError => e $stderr.puts "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install" raise e end -require "active_support/core_ext/object/blank" +require_relative "../core_ext/object/blank" require "stringio" module ActiveSupport diff --git a/activesupport/lib/active_support/xml_mini/nokogirisax.rb b/activesupport/lib/active_support/xml_mini/nokogirisax.rb index 54e15e6a5f..804d317033 100644 --- a/activesupport/lib/active_support/xml_mini/nokogirisax.rb +++ b/activesupport/lib/active_support/xml_mini/nokogirisax.rb @@ -4,7 +4,7 @@ rescue LoadError => e $stderr.puts "You don't have nokogiri installed in your application. Please add it to your Gemfile and run bundle install" raise e end -require "active_support/core_ext/object/blank" +require_relative "../core_ext/object/blank" require "stringio" module ActiveSupport diff --git a/activesupport/lib/active_support/xml_mini/rexml.rb b/activesupport/lib/active_support/xml_mini/rexml.rb index 03fa910fa5..8ede0502d3 100644 --- a/activesupport/lib/active_support/xml_mini/rexml.rb +++ b/activesupport/lib/active_support/xml_mini/rexml.rb @@ -1,5 +1,5 @@ -require "active_support/core_ext/kernel/reporting" -require "active_support/core_ext/object/blank" +require_relative "../core_ext/kernel/reporting" +require_relative "../core_ext/object/blank" require "stringio" module ActiveSupport -- cgit v1.2.3