diff options
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core.rb | 7 | ||||
-rw-r--r-- | activesupport/lib/active_support/core/all.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/core/time.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/core/time/autoload.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/values/time_zone.rb | 13 |
5 files changed, 22 insertions, 10 deletions
diff --git a/activesupport/lib/active_support/core.rb b/activesupport/lib/active_support/core.rb new file mode 100644 index 0000000000..ad8db94941 --- /dev/null +++ b/activesupport/lib/active_support/core.rb @@ -0,0 +1,7 @@ +module ActiveSupport + module Core + def self.load_all! + [TimeWithZone] + end + end +end diff --git a/activesupport/lib/active_support/core/all.rb b/activesupport/lib/active_support/core/all.rb new file mode 100644 index 0000000000..06440add20 --- /dev/null +++ b/activesupport/lib/active_support/core/all.rb @@ -0,0 +1,4 @@ +require 'active_support/core' +Dir["#{File.dirname(__FILE__)}/core/*.rb"].sort.each do |path| + require "active_support/core/#{File.basename(path, '.rb')}" +end diff --git a/activesupport/lib/active_support/core/time.rb b/activesupport/lib/active_support/core/time.rb new file mode 100644 index 0000000000..71565ac6c2 --- /dev/null +++ b/activesupport/lib/active_support/core/time.rb @@ -0,0 +1,4 @@ +require 'active_support/core/time/autoload' +require 'active_support/core_ext/time' +require 'active_support/core_ext/date' +require 'active_support/core_ext/datetime' diff --git a/activesupport/lib/active_support/core/time/autoload.rb b/activesupport/lib/active_support/core/time/autoload.rb new file mode 100644 index 0000000000..6970c398c3 --- /dev/null +++ b/activesupport/lib/active_support/core/time/autoload.rb @@ -0,0 +1,4 @@ +module ActiveSupport + autoload :TimeWithZone, 'active_support/time_with_zone' + autoload :TimeZone, 'active_support/values/time_zone' +end diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 531fdb9d31..bfec0711ad 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -1,13 +1,6 @@ -require 'active_support/core_ext/time/publicize_conversion_methods' -require 'active_support/core_ext/time/acts_like' -require 'active_support/core_ext/time/calculations' -require 'active_support/core_ext/time/zones' - -require 'active_support/core_ext/date/acts_like' - -require 'active_support/core_ext/date_time/acts_like' -require 'active_support/core_ext/date_time/calculations' -require 'active_support/core_ext/date_time/zones' +require 'active_support/core_ext/time' +require 'active_support/core_ext/date' +require 'active_support/core_ext/date_time' # The TimeZone class serves as a wrapper around TZInfo::Timezone instances. It allows us to do the following: # |